cemu_graphic_packs/Enhancement/TwilightPrincess_AARemoval/34755035276148c0_00000000000003c9_ps_source.txt

152 lines
7.0 KiB
Plaintext
Raw Normal View History

#version 400
#extension GL_ARB_texture_gather : enable
// shader 34755035276148c0 // AA removal Twlight princess
uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4001000 res 1920x1080x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5187000 res 1920x1080x1 dim 1 tm: 4 format 0011 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
in vec4 passParameter0;
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;
R0i = floatBitsToInt(passParameter0);
R1i.xyzw = floatBitsToInt(textureGather(textureUnitPS1, intBitsToFloat(R0i.xy)).wzxy);
R2i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).xyzw);
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
/*
R0i.w = floatBitsToInt(textureGather(textureUnitPS1, intBitsToFloat(R0i.xy)).y);
// 0
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(0xba088889));
PV0i.x = R1i.x;
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(0xba72b9d6));
PV0i.y = R1i.y;
R2i.z = R0i.x;
PV0i.z = R2i.z;
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(0xba72b9d6));
PS0i = R2i.y;
// 1
R3i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(0xba088889));
PV1i.x = R3i.x;
R3i.y = R0i.y;
PV1i.y = R3i.y;
R1i.xyzw = floatBitsToInt(textureGather(textureUnitPS1, intBitsToFloat(R1i.xy)).xyzw);
R2i.yz = floatBitsToInt(textureGather(textureUnitPS1, intBitsToFloat(R2i.zy)).yz);
R3i.xy = floatBitsToInt(textureGather(textureUnitPS1, intBitsToFloat(R3i.xy)).xy);
// 0
PV0i.x = floatBitsToInt(intBitsToFloat(R2i.z) + intBitsToFloat(R3i.x));
PV0i.y = floatBitsToInt(intBitsToFloat(R1i.w) + intBitsToFloat(R0i.w));
PV0i.z = floatBitsToInt(intBitsToFloat(R1i.z) + intBitsToFloat(R3i.y));
PV0i.w = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(R2i.y));
// 1
R123i.x = floatBitsToInt((intBitsToFloat(R1i.y) * intBitsToFloat(0x40000000) + -(intBitsToFloat(PV0i.x))));
PV1i.x = R123i.x;
R123i.y = floatBitsToInt((intBitsToFloat(R1i.y) * intBitsToFloat(0x40000000) + -(intBitsToFloat(PV0i.y))));
PV1i.y = R123i.y;
R123i.z = floatBitsToInt((intBitsToFloat(R1i.y) * intBitsToFloat(0x40000000) + -(intBitsToFloat(PV0i.z))));
PV1i.z = R123i.z;
R123i.w = floatBitsToInt((intBitsToFloat(R1i.y) * intBitsToFloat(0x40000000) + -(intBitsToFloat(PV0i.w))));
PV1i.w = R123i.w;
// 2
PV0i.x = floatBitsToInt(max(intBitsToFloat(PV1i.x), -(intBitsToFloat(PV1i.x))));
PV0i.y = floatBitsToInt(max(intBitsToFloat(PV1i.y), -(intBitsToFloat(PV1i.y))));
PV0i.z = floatBitsToInt(max(intBitsToFloat(PV1i.z), -(intBitsToFloat(PV1i.z))));
PV0i.w = floatBitsToInt(max(intBitsToFloat(PV1i.w), -(intBitsToFloat(PV1i.w))));
// 3
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(0xb400d959));
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(0xb400d959));
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(0xb400d959));
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(0xb400d959));
// 4
R123i.x = ((intBitsToFloat(PV1i.w) >= 0.0)?(floatBitsToInt(1.0)):(0));
PV0i.x = R123i.x;
R123i.y = ((intBitsToFloat(PV1i.z) >= 0.0)?(floatBitsToInt(1.0)):(0));
PV0i.y = R123i.y;
R123i.z = ((intBitsToFloat(PV1i.y) >= 0.0)?(floatBitsToInt(1.0)):(0));
PV0i.z = R123i.z;
R123i.w = ((intBitsToFloat(PV1i.x) >= 0.0)?(floatBitsToInt(1.0)):(0));
PV0i.w = R123i.w;
// 5
tempi.x = floatBitsToInt(intBitsToFloat(PV0i.x) * intBitsToFloat(0x3e800000) + intBitsToFloat(PV0i.y) * intBitsToFloat(0x3e800000) + intBitsToFloat(PV0i.z) * intBitsToFloat(0x3e800000) + intBitsToFloat(PV0i.w) * intBitsToFloat(0x3e800000));
PV1i.x = tempi.x;
PV1i.y = tempi.x;
PV1i.z = tempi.x;
PV1i.w = tempi.x;
// 6
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(0x3f400000)));
PV0i.z = R127i.z;
// 7
R1i.x = floatBitsToInt((intBitsToFloat(PV0i.z) * intBitsToFloat(0xba088889) + intBitsToFloat(R0i.x)));
PV1i.x = R1i.x;
R1i.y = R0i.y;
PV1i.y = R1i.y;
R2i.z = R0i.x;
PV1i.z = R2i.z;
R2i.y = floatBitsToInt((intBitsToFloat(PV0i.z) * intBitsToFloat(0xba72b9d6) + intBitsToFloat(R0i.y)));
PS1i = R2i.y;
// 8
R3i.x = floatBitsToInt((intBitsToFloat(R127i.z) * intBitsToFloat(0x3a088889) + intBitsToFloat(R0i.x)));
PV0i.x = R3i.x;
R3i.y = R0i.y;
PV0i.y = R3i.y;
R0i.w = floatBitsToInt((intBitsToFloat(R127i.z) * intBitsToFloat(0x3a72b9d6) + intBitsToFloat(R0i.y)));
PV0i.w = R0i.w;
R1i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.xy)).xyzw);
R2i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R2i.zy)).xyzw);
R3i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R3i.xy)).xyzw);
R0i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xw)).xyzw);
// 0
PV0i.x = floatBitsToInt(intBitsToFloat(R1i.w) + intBitsToFloat(R2i.w));
PV0i.y = floatBitsToInt(intBitsToFloat(R1i.z) + intBitsToFloat(R2i.z));
PV0i.z = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(R2i.y));
PV0i.w = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(R2i.x));
// 1
PV1i.x = floatBitsToInt(intBitsToFloat(R3i.w) + intBitsToFloat(PV0i.x));
PV1i.y = floatBitsToInt(intBitsToFloat(R3i.z) + intBitsToFloat(PV0i.y));
PV1i.z = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(PV0i.z));
PV1i.w = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(PV0i.w));
// 2
backupReg0i = R0i.y;
backupReg1i = R0i.x;
PV0i.x = floatBitsToInt(intBitsToFloat(R0i.w) + intBitsToFloat(PV1i.x));
PV0i.y = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(PV1i.y));
PV0i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(PV1i.z));
PV0i.w = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(PV1i.w));
// 3
R0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(0x3e800000)));
PV1i.x = R0i.x;
R0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(0x3e800000)));
PV1i.y = R0i.y;
R0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(0x3e800000)));
PV1i.z = R0i.z;
R0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(0x3e800000)));
PV1i.w = R0i.w;
// export
passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w)); */
}