#version 320 es #define FORCE_EARLY_Z layout(early_fragment_tests) in #define ATTRIBUTE_LOCATION(x) #define FRAGMENT_OUTPUT_LOCATION(x) #define FRAGMENT_OUTPUT_LOCATION_INDEXED(x, y) #define UBO_BINDING(packing, x) layout(packing, binding = x) #define SAMPLER_BINDING(x) layout(binding = x) #define SSBO_BINDING(x) layout(binding = x) #define VARYING_LOCATION(x) #extension GL_ANDROID_extension_pack_es31a : enable #extension GL_EXT_shader_framebuffer_fetch: enable #define FB_FETCH_VALUE real_ocol0 #define FRAGMENT_INOUT inout precision highp float; precision highp int; precision highp sampler2DArray; precision highp usamplerBuffer; precision highp sampler2DMS; precision highp image2DArray; #define float2 vec2 #define float3 vec3 #define float4 vec4 #define uint2 uvec2 #define uint3 uvec3 #define uint4 uvec4 #define int2 ivec2 #define int3 ivec3 #define int4 ivec4 #define frac fract #define lerp mix uniform int4 position; uniform float y_scale; uniform float gamma_rcp; uniform float2 clamp_tb; uniform int3 filter_coefficients; #define samp0 samp9 SAMPLER_BINDING(9) uniform sampler2DArray samp0; FRAGMENT_OUTPUT_LOCATION(0) out vec4 ocol0; float4 RGBA8ToRGB8(float4 src) { return float4(src.xyz, 1.0); } float4 RGBA8ToRGBA6(float4 src) { int4 val = int4(roundEven(src * 255.0)) >> 2; return float4(val) / 63.0; } float4 RGBA8ToRGB565(float4 src) { int4 val = int4(roundEven(src * 255.0)); val = int4(val.r >> 3, val.g >> 2, val.b >> 3, 1); return float4(val) / float4(31.0, 63.0, 31.0, 1.0); } float4 SampleEFB(float2 uv, float2 pixel_size, int xoffset) { float4 prev_row = (texture(samp0, float3(uv.x + xoffset * pixel_size.x, clamp(uv.y - float(-1) * pixel_size.y, clamp_tb.x, clamp_tb.y), 0.0))); float4 current_row = (texture(samp0, float3(uv.x + xoffset * pixel_size.x, uv.y, 0.0))); float4 next_row = (texture(samp0, float3(uv.x + xoffset * pixel_size.x, clamp(uv.y - float(1) * pixel_size.y, clamp_tb.x, clamp_tb.y), 0.0))); float3 col = float3(clamp((int3(prev_row.rgb * 255.0) * filter_coefficients[0] + int3(current_row.rgb * 255.0) * filter_coefficients[1] + int3(next_row.rgb * 255.0) * filter_coefficients[2]) >> 6, int3(0, 0, 0), int3(255, 255, 255))) / 255.0; return float4(col, current_row.a); } void main() { int2 sampleUv; int2 uv1 = int2(gl_FragCoord.xy); int x_block_position = (uv1.x >> 3) << 2; int y_block_position = uv1.y << 2; int offset_in_block = uv1.x & 7; int y_offset_in_block = offset_in_block >> 1; int x_offset_in_block = (offset_in_block & 1) << 1; sampleUv.x = x_block_position + x_offset_in_block; sampleUv.y = y_block_position + y_offset_in_block; float2 uv0 = float2(sampleUv); uv0 += float2(0.5, 0.5); uv0 *= float(position.w); uv0 += float2(position.xy); uv0 /= float2(640, 528); uv0 /= float2(1, y_scale); uv0.y = 1.0-uv0.y; float2 pixel_size = position.ww / float2(640, 528); float depth; float3 expanded; depth = SampleEFB(uv0, pixel_size, 0).r; depth *= 16777216.0; expanded.r = floor(depth / (256.0 * 256.0)); depth -= expanded.r * 256.0 * 256.0; expanded.g = floor(depth / 256.0); ocol0.b = expanded.g / 255.0; ocol0.g = expanded.r / 255.0; depth = SampleEFB(uv0, pixel_size, 1).r; depth *= 16777216.0; expanded.r = floor(depth / (256.0 * 256.0)); depth -= expanded.r * 256.0 * 256.0; expanded.g = floor(depth / 256.0); ocol0.r = expanded.g / 255.0; ocol0.a = expanded.r / 255.0; } ERROR: 0:70: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'in int' and a right operand of type 'float' (or there is no acceptable conversion) ERROR: 0:70: '+' : wrong operand types no operation '+' exists that takes a left-hand operand of type 'float' and a right operand of type 'in int' (or there is no acceptable conversion) ERROR: 0:71: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'in int' and a right operand of type 'float' (or there is no acceptable conversion) ERROR: 0:71: '+' : wrong operand types no operation '+' exists that takes a left-hand operand of type 'float' and a right operand of type 'in int' (or there is no acceptable conversion) ERROR: 0:72: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'in int' and a right operand of type 'float' (or there is no acceptable conversion) ERROR: 0:72: '+' : wrong operand types no operation '+' exists that takes a left-hand operand of type 'float' and a right operand of type 'in int' (or there is no acceptable conversion) ERROR: 0:97: '/' : wrong operand types no operation '/' exists that takes a left-hand operand of type '2-component vector of int' and a right operand of type 'const 2-component vector of float' (or there is no acceptable conversion) ERROR: 0:97: '=' : cannot convert from '2-component vector of int' to '2-component vector of float' ERROR: 8 compilation errors. No code generated.