#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader 901b0093b146535b
// 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 = 2) uniform ufBlock
{
uniform ivec4 uf_remappedPS[3];
uniform vec4 uf_fragCoordScale;
};
#else
uniform ivec4 uf_remappedPS[3];
uniform vec2 uf_fragCoordScale;
#endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
layout(location = 0) in vec4 passParameterSem0;
layout(location = 1) in vec4 passParameterSem1;
layout(location = 2) in vec4 passParameterSem2;
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 R123i = 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(passParameterSem1);
R2i = floatBitsToInt(passParameterSem2);
R1i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.xy)).xyzw);
R2i.xyzw = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R2i.xy)).xyzw);
// 0
PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.x), intBitsToFloat(R2i.w)));
PV0i.y = floatBitsToInt(-(intBitsToFloat(R2i.w)) + 1.0);
R127i.z = uf_remappedPS[0].x & 0x00000080;
PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), intBitsToFloat(R2i.w)));
PS0i = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), intBitsToFloat(R2i.w)));
// 1
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.x),intBitsToFloat(PV0i.y)) + intBitsToFloat(PV0i.x)));
PV1i.x = R123i.x;
PV1i.y = floatBitsToInt(min(intBitsToFloat(R1i.w), intBitsToFloat(R2i.w)));
PV1i.z = floatBitsToInt(max(intBitsToFloat(R1i.w), intBitsToFloat(R2i.w)));
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(PV0i.y)) + intBitsToFloat(PV0i.w)));
PV1i.w = R123i.w;
R127i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.z),intBitsToFloat(PV0i.y)) + intBitsToFloat(PS0i)));
PS1i = R127i.w;
// 2
R123i.x = ((R127i.z == 0)?(PV1i.z):(PV1i.y));
PV0i.x = R123i.x;
R127i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.w),intBitsToFloat(uf_remappedPS[1].y)) + intBitsToFloat(uf_remappedPS[2].y)));
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.x),intBitsToFloat(uf_remappedPS[1].x)) + intBitsToFloat(uf_remappedPS[2].x)));
PV0i.w = R123i.w;
// 3
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),intBitsToFloat(uf_remappedPS[1].w)) + intBitsToFloat(uf_remappedPS[2].w)));
PV1i.x = R123i.x;
R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.w),intBitsToFloat(uf_remappedPS[1].z)) + intBitsToFloat(uf_remappedPS[2].z)));
PV1i.y = R123i.y;
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.x), intBitsToFloat(PV0i.w)));
PS1i = R1i.x;
// 4
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.y), intBitsToFloat(R127i.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)
// Hide left top glowy background
if (textureSize(textureUnitPS0, 0).xy == ivec2(144, 199) && texelFetch(textureUnitPS0, ivec2(28, 154), 0) == vec4(1.0,1.0,1.0,0.0) && texelFetch(textureUnitPS0, ivec2(59, 102), 0) == vec4(1.0,1.0,1.0,1.0) && texelFetch(textureUnitPS0, ivec2(8, 52), 0) == vec4(1.0,1.0,1.0,1.0) && texelFetch(textureUnitPS0, ivec2(78, 2), 0) == vec4(1.0,1.0,1.0,1.0)) {
	R1i.xyzw = ivec4(0);
}

// Hide left top glowy background
if (textureSize(textureUnitPS0, 0).xy == ivec2(135, 188) && texelFetch(textureUnitPS0, ivec2(28, 154), 0) == vec4(1.0,1.0,1.0,0.0) && texelFetch(textureUnitPS0, ivec2(59, 102), 0) == vec4(1.0,1.0,1.0,1.0) && texelFetch(textureUnitPS0, ivec2(8, 52), 0) == vec4(1.0,1.0,1.0,1.0) && texelFetch(textureUnitPS0, ivec2(78, 2), 0) == vec4(1.0,1.0,1.0,1.0)) {
	R1i.xyzw = ivec4(0);
}

// Hide top right glowy background
if (textureSize(textureUnitPS0, 0).xy == ivec2(148, 140) && texelFetch(textureUnitPS0, ivec2(44, 100), 0) == vec4(1.0,1.0,1.0,0.0) && texelFetch(textureUnitPS0, ivec2(42, 100), 0) == vec4(1.0,1.0,1.0,1.0) && texelFetch(textureUnitPS0, ivec2(78, 51), 0) == vec4(1.0,1.0,1.0,0.0) && texelFetch(textureUnitPS0, ivec2(79, 51), 0) == vec4(1.0,1.0,1.0,1.0)) {
	R1i.xyzw = ivec4(0);
}

// Hide top right-center glowy background
if (textureSize(textureUnitPS0, 0).xy == ivec2(58, 171) && texelFetch(textureUnitPS0, ivec2(31, 88), 0) == vec4(1.0,1.0,1.0,0.0) && texelFetch(textureUnitPS0, ivec2(33, 83), 0) == vec4(1.0,1.0,1.0,1.0) && texelFetch(textureUnitPS0, ivec2(5, 78), 0) == vec4(1.0,1.0,1.0,1.0)) {
	R1i.xyzw = ivec4(0);
}

// Hide bottom right glowy background
if (textureSize(textureUnitPS0, 0).xy == ivec2(92, 157) && texelFetch(textureUnitPS0, ivec2(11, 130), 0) == vec4(1.0,1.0,1.0,0.0) && texelFetch(textureUnitPS0, ivec2(87, 79), 0) == vec4(1.0,1.0,1.0,1.0) && texelFetch(textureUnitPS0, ivec2(58, 4), 0) == vec4(1.0,1.0,1.0,1.0)) {
	R1i.xyzw = ivec4(0);
}

// Hide bottom left glowy background
if (textureSize(textureUnitPS0, 0).xy == ivec2(90, 69) && texelFetch(textureUnitPS0, ivec2(37, 30), 0) == vec4(1.0,1.0,1.0,1.0) && texelFetch(textureUnitPS0, ivec2(79, 3), 0) == vec4(1.0,1.0,1.0,0.0) && texelFetch(textureUnitPS0, ivec2(29, 11), 0) == vec4(1.0,1.0,1.0,1.0)) {
	R1i.xyzw = ivec4(0);
}

// Too bothered to actually go through all the work to make texture specific matches for another bloom layer, since I'm also not sure if this is even used.
R1i.xyzw = ivec4(0);

#elif ($hideStamina == 1)
// Hide stamina red bar
//if (textureSize(textureUnitPS0, 0).xy == ivec2(70, 70) && texelFetch(textureUnitPS0, ivec2(13, 19), 0) == vec4(1.0,1.0,1.0,0.0) && (texelFetch(textureUnitPS0, ivec2(79, 3), 0).xyzw).w > 0.0 && texelFetch(textureUnitPS0, ivec2(3, 33), 0) == vec4(1.0,1.0,1.0,1.0)) {
//	R1i.xyzw = ivec4(0);
//}

// Hide stamina red bar
if (textureSize(textureUnitPS0, 0).xy == ivec2(80, 80) && texelFetch(textureUnitPS0, ivec2(6, 36), 0) == vec4(1.0,1.0,1.0,0.0) && (texelFetch(textureUnitPS0, ivec2(5, 36), 0).xyzw).w > 0.0 && texelFetch(textureUnitPS0, ivec2(26, 5), 0) == vec4(1.0,1.0,1.0,1.0)) {
	R1i.xyzw = ivec4(0);
}

// Hide stamina red bar
if (textureSize(textureUnitPS0, 0).xy == ivec2(70, 70) && texelFetch(textureUnitPS0, ivec2(18, 58), 0) == vec4(1.0,1.0,1.0,1.0) && texelFetch(textureUnitPS0, ivec2(18, 14), 0) == vec4(1.0,1.0,1.0,0.0) && (texelFetch(textureUnitPS0, ivec2(18, 13), 0).xyzw).w > 0.0) {
	R1i.xyzw = ivec4(0);
}

// Hide stamina red bar
if (textureSize(textureUnitPS0, 0).xy == ivec2(56, 56) && texelFetch(textureUnitPS0, ivec2(22, 21), 0) == vec4(1.0,1.0,1.0,0.0) && texelFetch(textureUnitPS0, ivec2(16, 52), 0) == vec4(1.0,1.0,1.0,0.0) && (texelFetch(textureUnitPS0, ivec2(16, 51), 0).xyzw).w > 0.0) {
	R1i.xyzw = ivec4(0);
}

#endif

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