#version 420
#extension GL_ARB_texture_gather : enable
// shader 5307d14d04250e61
// Stars 
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
uniform ivec4 uf_remappedPS[4];
layout(location = 0) in vec4 passParameterSem1;
layout(location = 1) in vec4 passParameterSem2;
layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale;
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()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
vec4 R2f = vec4(0.0);
vec4 R123f = vec4(0.0);
vec4 R125f = vec4(0.0);
vec4 R126f = vec4(0.0);
vec4 R127f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem1;
R1f = passParameterSem2;
// 0
tempf.x = dot(vec4(R1f.x,R1f.y,R1f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
PV0f.x = tempf.x;
PV0f.y = tempf.x;
PV0f.z = tempf.x;
PV0f.w = tempf.x;
R127f.y = tempf.x;
PS0f = abs(R2f.z);
// 1
backupReg0f = R0f.y;
R123f.x = (PS0f * 2.0 + -(1.0));
PV1f.x = R123f.x;
PV1f.y = PV0f.x;
PV1f.y = clamp(PV1f.y, 0.0, 1.0);
R127f.z = mul_nonIEEE(R0f.x, intBitsToFloat(uf_remappedPS[1].w));
PV1f.w = abs(R2f.w);
R125f.w = mul_nonIEEE(backupReg0f, intBitsToFloat(uf_remappedPS[1].w));
PS1f = R125f.w;
// 2
backupReg0f = R127f.y;
PV0f.x = mul_nonIEEE(PV1f.x, PV1f.x);
R127f.y = mul_nonIEEE(R0f.z, intBitsToFloat(uf_remappedPS[1].w));
PV0f.y = R127f.y;
R123f.z = (PV1f.w * 2.0 + -(1.0));
PV0f.z = R123f.z;
R127f.w = (mul_nonIEEE(backupReg0f,intBitsToFloat(uf_remappedPS[1].x)) + intBitsToFloat(uf_remappedPS[1].y));
R127f.w = clamp(R127f.w, 0.0, 1.0);
tempResultf = log2(PV1f.y);
if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F;
PS0f = tempResultf;
// 3
R126f.x = -(PV0f.y) + intBitsToFloat(uf_remappedPS[2].z);
PV1f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].y), PS0f);
R123f.z = (mul_nonIEEE(PV0f.z,PV0f.z) + PV0f.x);
PV1f.z = R123f.z;
R126f.w = -(intBitsToFloat(uf_remappedPS[2].w)) + 0.0;
// 4
R127f.x = -(R127f.z) + intBitsToFloat(uf_remappedPS[2].x);
PV0f.y = -(PV1f.z) + 1.0;
PV0f.y = clamp(PV0f.y, 0.0, 1.0);
R126f.z = -(R125f.w) + intBitsToFloat(uf_remappedPS[2].y);
PS0f = exp2(PV1f.y);
// 5
PV1f.x = mul_nonIEEE(R127f.w, PV0f.y);
R123f.z = (mul_nonIEEE(R126f.w,PS0f) + intBitsToFloat(uf_remappedPS[2].w));
PV1f.z = R123f.z;
// 6
backupReg0f = R0f.w;
R0f.x = (mul_nonIEEE(R127f.x,PV1f.z) + R127f.z);
R0f.y = (mul_nonIEEE(R126f.z,PV1f.z) + R125f.w);
R0f.z = (mul_nonIEEE(R126f.x,PV1f.z) + R127f.y);
R0f.w = mul_nonIEEE(backupReg0f, PV1f.x);
// export
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, 1.0);
}
