cemu_graphic_packs/Quality/TropicalFreeze_2160p/d878b867ab805ffa_0000000000000079_ps_source.txt

106 lines
4.0 KiB
Plaintext
Raw Normal View History

#version 400
#extension GL_ARB_texture_gather : enable
const float overwriteWidth = 3840.0; //overwidth value.0
const float overwriteHeight = 2160.0;
// shader d878b867ab805ffa
uniform ivec4 uf_remappedPS[6];
uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4a8c800 res 1280x720x1 dim 1 tm: 4 format 080e compSel: 0 0 0 0 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
in vec4 passParameter0;
in vec4 passParameter1;
layout(location = 0) out vec4 passPixelColor0;
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 R123i = ivec4(0);
ivec4 R127i = ivec4(0);
int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i;
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
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;
int loopStuckCounter = 0;
vec3 cubeMapSTM;
int cubeMapFaceId;
R1i = floatBitsToInt(gl_FragCoord.xyzw);
R0i = floatBitsToInt(passParameter1);
// 0
vec2 scaleFactor = vec2(overwriteWidth,overwriteHeight)/vec2(1280.0,720.0); // factor = newResolution / expectedResolution
R1i.xy = floatBitsToInt(intBitsToFloat(R1i.xy) / scaleFactor);
backupReg0i = R1i.x;
backupReg1i = R1i.y;
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(uf_remappedPS[0].x)));
PV0i.x = R1i.x;
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg1i), intBitsToFloat(uf_remappedPS[0].y)));
PV0i.y = R1i.y;
R2i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z), 1.0));
PV0i.z = R2i.z;
R1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w), 1.0));
PV0i.w = R1i.w;
R1i.z = floatBitsToInt(1.0 / intBitsToFloat(R0i.z));
PS0i = R1i.z;
R1i.x = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.xy)).x);
// 0
R3i.x = uf_remappedPS[2].x;
PV0i.x = R3i.x;
R123i.y = floatBitsToInt((intBitsToFloat(R1i.x) * intBitsToFloat(0x40000000) + -(1.0)));
PV0i.y = R123i.y;
R127i.z = floatBitsToInt(intBitsToFloat(R0i.y) * intBitsToFloat(R1i.z));
PV0i.z = R127i.z;
R127i.w = floatBitsToInt(intBitsToFloat(R0i.x) * intBitsToFloat(R1i.z));
PV0i.w = R127i.w;
R3i.y = uf_remappedPS[2].y;
PS0i = R3i.y;
// 1
R123i.y = floatBitsToInt((intBitsToFloat(PV0i.y) * intBitsToFloat(uf_remappedPS[3].w) + intBitsToFloat(R1i.w)));
PV1i.y = R123i.y;
R123i.z = floatBitsToInt((intBitsToFloat(PV0i.y) * intBitsToFloat(uf_remappedPS[3].z) + intBitsToFloat(R2i.z)));
PV1i.z = R123i.z;
R3i.z = uf_remappedPS[2].z;
PS1i = R3i.z;
// 2
R123i.x = floatBitsToInt((intBitsToFloat(R127i.z) * intBitsToFloat(uf_remappedPS[4].z) + intBitsToFloat(PV1i.z)));
PV0i.x = R123i.x;
R123i.w = floatBitsToInt((intBitsToFloat(R127i.z) * intBitsToFloat(uf_remappedPS[4].w) + intBitsToFloat(PV1i.y)));
PV0i.w = R123i.w;
// 3
R123i.y = floatBitsToInt((intBitsToFloat(R127i.w) * intBitsToFloat(uf_remappedPS[5].w) + intBitsToFloat(PV0i.w)));
PV1i.y = R123i.y;
R127i.z = floatBitsToInt((intBitsToFloat(R127i.w) * intBitsToFloat(uf_remappedPS[5].z) + intBitsToFloat(PV0i.x)));
PV1i.z = R127i.z;
// 4
PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.y));
// 5
PV1i.w = floatBitsToInt(intBitsToFloat(R127i.z) * intBitsToFloat(PS0i));
// 6
PV0i.z = floatBitsToInt(-(intBitsToFloat(R0i.w)) + -(intBitsToFloat(PV1i.w)));
// 7
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w), intBitsToFloat(PV0i.z)));
PV1i.x = clampFI32(PV1i.x);
PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(uf_remappedPS[2].w)));
PV1i.y = clampFI32(PV1i.y);
// 8
R3i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(PV1i.x)));
PV0i.w = R3i.w;
// export
passPixelColor0 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
}