cemu_graphic_packs/Quality/TropicalFreeze_1080p/76e37ae2a66fcff2_0000000000001e49_ps_source.txt

123 lines
5.2 KiB
Plaintext
Raw Normal View History

#version 400
#extension GL_ARB_texture_gather : enable
const float overwriteWidth = 1920.0; //overwidth value.0
const float overwriteHeight = 1080.0;
// shader 76e37ae2a66fcff2
uniform ivec4 uf_remappedPS[2];
uniform sampler2D textureUnitPS0;// Tex0 addr 0x19fc6000 res 128x128x1 dim 1 tm: 4 format 0033 compSel: 0 1 2 3 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0
uniform sampler2D textureUnitPS1;// Tex1 addr 0xf4708800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
uniform sampler2D textureUnitPS2;// Tex2 addr 0x19fc2000 res 64x64x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 0 0 0 border: 0
in Vertex2
{
vec4 passG2PParameter0;
vec4 passG2PParameter1;
vec4 passG2PParameter2;
vec4 passG2PParameter3;
} g2p;
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 R4i = ivec4(0);
ivec4 R126i = 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;
R4i = floatBitsToInt(gl_FragCoord.xyzw);
R0i = floatBitsToInt(g2p.passG2PParameter0);
R1i = floatBitsToInt(g2p.passG2PParameter1);
R2i = floatBitsToInt(g2p.passG2PParameter2);
R3i = floatBitsToInt(g2p.passG2PParameter3);
vec2 scaleFactor = vec2(overwriteWidth,overwriteHeight)/vec2(1280.0,720.0); // factor = newResolution / expectedResolution
R4i.xy = floatBitsToInt(intBitsToFloat(R4i.xy) / scaleFactor);
R2i.xy = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R2i.xy)).xy);
R1i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.xy)).xyzw);
// 0
PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), intBitsToFloat(0x437f0000)));
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.x), intBitsToFloat(0x437f0000)));
PV0i.z = R3i.x;
PV0i.z = clampFI32(PV0i.z);
PV0i.w = R3i.y;
PV0i.w = clampFI32(PV0i.w);
R127i.x = floatBitsToInt(1.0 / intBitsToFloat(uf_remappedPS[0].x));
PS0i = R127i.x;
// 1
R126i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(uf_remappedPS[0].z)));
PV1i.x = R126i.x;
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(uf_remappedPS[0].z)));
PV1i.y = R127i.y;
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.y) * intBitsToFloat(0x3b800000));
PV1i.z = floatBitsToInt(intBitsToFloat(PV1i.z) * 2.0);
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.x) * intBitsToFloat(0x3b800000));
PV1i.w = floatBitsToInt(intBitsToFloat(PV1i.w) * 2.0);
PS1i = floatBitsToInt(1.0 / intBitsToFloat(uf_remappedPS[0].y));
// 2
backupReg0i = R0i.x;
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.w) + -(1.0));
PV0i.y = floatBitsToInt(intBitsToFloat(PV1i.z) + -(1.0));
R127i.z = floatBitsToInt(intBitsToFloat(R4i.y) * intBitsToFloat(PS1i));
PV0i.z = R127i.z;
R127i.w = floatBitsToInt(intBitsToFloat(R4i.x) * intBitsToFloat(R127i.x));
PV0i.w = R127i.w;
R2i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(uf_remappedPS[1].x)));
PS0i = R2i.w;
// 3
backupReg0i = R0i.w;
R4i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.y), intBitsToFloat(uf_remappedPS[1].x)));
PV1i.x = R4i.x;
R4i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.z), intBitsToFloat(uf_remappedPS[1].x)));
PV1i.y = R4i.y;
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(R127i.y)));
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R126i.x)));
R3i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(R1i.w)));
PS1i = R3i.w;
// 4
R0i.x = floatBitsToInt(intBitsToFloat(PV1i.z) + intBitsToFloat(R127i.w));
PV0i.x = R0i.x;
PV0i.y = floatBitsToInt(-(intBitsToFloat(PV1i.w)));
// 5
R0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(R127i.z));
PV1i.y = R0i.y;
R0i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R0i.xy)).xyz);
// 0
backupReg0i = R0i.y;
backupReg1i = R0i.x;
PV0i.x = floatBitsToInt(intBitsToFloat(R1i.z) + intBitsToFloat(R0i.z));
PV0i.y = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(backupReg0i));
PV0i.z = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(backupReg1i));
// 1
R3i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.w), intBitsToFloat(PV0i.z)));
PV1i.x = R3i.x;
R3i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
PV1i.y = R3i.y;
R3i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(PV0i.x)));
PV1i.z = R3i.z;
// export
passPixelColor0 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
}