#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader 47db0898f798fd1b
// start of shader inputs/outputs, predetermined by Cemu. Do not touch
#ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation)
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
#else
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) 
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif
#ifdef VULKAN
layout(set = 1, binding = 3) uniform ufBlock
{
uniform ivec4 uf_remappedPS[5];
uniform vec4 uf_fragCoordScale;
};
#else
uniform ivec4 uf_remappedPS[5];
uniform vec2 uf_fragCoordScale;
#endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2;
layout(location = 0) in vec4 passParameterSem0;
layout(location = 1) in vec4 passParameterSem2;
layout(location = 2) in vec4 passParameterSem1;
layout(location = 3) in vec4 passParameterSem3;
layout(location = 0) out vec4 passPixelColor0;
// end of shader inputs/outputs
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
	return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
	return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
void main()
{
ivec4 R0i = ivec4(0);
ivec4 R1i = ivec4(0);
ivec4 R2i = ivec4(0);
ivec4 R3i = ivec4(0);
ivec4 R4i = ivec4(0);
ivec4 R5i = ivec4(0);
ivec4 R123i = ivec4(0);
ivec4 R125i = ivec4(0);
ivec4 R126i = ivec4(0);
ivec4 R127i = ivec4(0);
int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i;
ivec4 PV0i = ivec4(0), PV1i = ivec4(0);
int PS0i = 0, PS1i = 0;
ivec4 tempi = ivec4(0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0i = floatBitsToInt(passParameterSem0);
R1i = floatBitsToInt(passParameterSem2);
R2i = floatBitsToInt(passParameterSem1);
R3i = floatBitsToInt(passParameterSem3);
R4i.xyzw = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.xy)).xyzw);
R5i.xyzw = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R3i.xy)).xyzw);
// 0
R1i.xyz = floatBitsToInt(vec3(-(intBitsToFloat(R5i.x)),-(intBitsToFloat(R5i.y)),-(intBitsToFloat(R5i.z))) + vec3(1.0,1.0,1.0));
R127i.w = 0x3f800000;
PV0i.w = R127i.w;
R1i.w = uf_remappedPS[0].x & 0x00008000;
PS0i = R1i.w;
// 1
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R4i.x),intBitsToFloat(R4i.y),intBitsToFloat(R4i.z),intBitsToFloat(PV0i.w)),vec4(intBitsToFloat(uf_remappedPS[1].x),intBitsToFloat(uf_remappedPS[1].y),intBitsToFloat(uf_remappedPS[1].z),intBitsToFloat(uf_remappedPS[1].w))));
PV1i.x = tempi.x;
PV1i.y = tempi.x;
PV1i.z = tempi.x;
PV1i.w = tempi.x;
// 2
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R4i.x),intBitsToFloat(R4i.y),intBitsToFloat(R4i.z),intBitsToFloat(R127i.w)),vec4(intBitsToFloat(uf_remappedPS[2].x),intBitsToFloat(uf_remappedPS[2].y),intBitsToFloat(uf_remappedPS[2].z),intBitsToFloat(uf_remappedPS[2].w))));
PV0i.x = tempi.x;
PV0i.y = tempi.x;
PV0i.z = tempi.x;
PV0i.w = tempi.x;
R3i.x = floatBitsToInt(intBitsToFloat(R2i.x) + intBitsToFloat(PV1i.x));
PS0i = R3i.x;
// 3
R3i.y = floatBitsToInt(intBitsToFloat(R2i.y) + intBitsToFloat(PV0i.x));
R3i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R3i.xy)).xyzw);
// 0
PV0i.x = floatBitsToInt(-(intBitsToFloat(R3i.x)) + 1.0);
PV0i.x = floatBitsToInt(intBitsToFloat(PV0i.x) * 2.0);
PV0i.y = R3i.y;
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) * 2.0);
PV0i.z = R3i.x;
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) * 2.0);
PV0i.w = floatBitsToInt(-(intBitsToFloat(R3i.y)) + 1.0);
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) * 2.0);
R127i.x = R3i.z;
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) * 2.0);
PS0i = R127i.x;
// 1
R126i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.x)),intBitsToFloat(PV0i.x)) + 1.0));
R127i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.y)),intBitsToFloat(PV0i.w)) + 1.0));
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.y), intBitsToFloat(PV0i.y)));
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.x), intBitsToFloat(PV0i.z)));
PS1i = floatBitsToInt(-(intBitsToFloat(R3i.z)) + 1.0);
PS1i = floatBitsToInt(intBitsToFloat(PS1i) * 2.0);
// 2
backupReg0i = R127i.x;
R127i.x = floatBitsToInt(min(intBitsToFloat(R4i.w), intBitsToFloat(R3i.w)));
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.z), intBitsToFloat(backupReg0i)));
R125i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.z)),intBitsToFloat(PS1i)) + 1.0));
PV0i.w = ((0.5 > intBitsToFloat(R3i.x))?int(0xFFFFFFFF):int(0x0));
R126i.z = ((0.5 > intBitsToFloat(R3i.y))?int(0xFFFFFFFF):int(0x0));
PS0i = R126i.z;
// 3
backupReg0i = R127i.y;
R123i.x = ((PV0i.w == 0)?(R126i.x):(R127i.w));
PV1i.x = R123i.x;
R127i.y = ((0.5 > intBitsToFloat(R3i.z))?int(0xFFFFFFFF):int(0x0));
PV1i.z = backupReg0i;
PV1i.w = R127i.z;
R127i.w = PV0i.y;
PS1i = R127i.w;
// 4
R123i.x = ((R126i.z == 0)?(PV1i.z):(PV1i.w));
PV0i.x = R123i.x;
R123i.y = ((R126i.z == 0)?(PV1i.x):(PV1i.x));
PV0i.y = R123i.y;
PV0i.z = R125i.z;
PV0i.w = floatBitsToInt(max(intBitsToFloat(R127i.x), intBitsToFloat(R5i.w)));
PS0i = floatBitsToInt(min(intBitsToFloat(R127i.x), intBitsToFloat(R5i.w)));
// 5
backupReg0i = R127i.w;
R127i.x = ((R1i.w == 0)?(PV0i.w):(PS0i));
R123i.y = ((R127i.y == 0)?(PV0i.y):(PV0i.y));
PV1i.y = R123i.y;
R123i.z = ((R127i.y == 0)?(PV0i.x):(PV0i.x));
PV1i.z = R123i.z;
R127i.w = ((R127i.y == 0)?(PV0i.z):(backupReg0i));
// 6
R126i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.z),intBitsToFloat(uf_remappedPS[3].y)) + intBitsToFloat(uf_remappedPS[4].y)));
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.y),intBitsToFloat(uf_remappedPS[3].x)) + intBitsToFloat(uf_remappedPS[4].x)));
PV0i.w = R123i.w;
// 7
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.x),intBitsToFloat(uf_remappedPS[3].w)) + intBitsToFloat(uf_remappedPS[4].w)));
PV1i.x = R123i.x;
R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.w),intBitsToFloat(uf_remappedPS[3].z)) + intBitsToFloat(uf_remappedPS[4].z)));
PV1i.y = R123i.y;
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.x), intBitsToFloat(PV0i.w)));
PS1i = R1i.x;
// 8
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.y), intBitsToFloat(R126i.z)));
R1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.z), intBitsToFloat(PV1i.y)));
R1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.w), intBitsToFloat(PV1i.x)));


#if ($hideCameraGUI == 1)
// Disable stripes
if (textureSize(textureUnitPS2, 0).xy == ivec2(13, 305) && texelFetch(textureUnitPS2, ivec2(11, 8), 0) == vec4(1.0,1.0,1.0,0.0) && texelFetch(textureUnitPS2, ivec2(7, 11), 0) == vec4(1.0,1.0,1.0,1.0) && texelFetch(textureUnitPS2, ivec2(3, 139), 0) == vec4(1.0,1.0,1.0,0.0) && texelFetch(textureUnitPS2, ivec2(7, 284), 0) == vec4(1.0,1.0,1.0,0.0)) {
	R1i.xyzw = ivec4(0);
}
#endif

// export
passPixelColor0 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
}
