mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-27 03:54:15 +01:00
b54dd4c4e3
0x806 and sub 32x32 resolutions really don't work well.
582 lines
28 KiB
Plaintext
582 lines
28 KiB
Plaintext
|
|
#version 420
|
|
#extension GL_ARB_texture_gather : enable
|
|
// shader af7acf7fb6dca1be
|
|
//cutscene shadow scaling
|
|
//to do - extra edge smooth pass,
|
|
const float resScaleDetail = (intBitsToFloat($height)/intBitsToFloat($gameHeight));
|
|
const float resScale = (intBitsToFloat($height)/intBitsToFloat($gameHeight));
|
|
//const float resScaleDetail = 2.0;
|
|
//const float resScale = 3.0;
|
|
const float shadowExposure = 0.85; //By truncating shadow, we decrease overall exposure during day only.
|
|
uniform ivec4 uf_remappedPS[31];
|
|
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4386000 res 1280x720x1 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
|
|
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf599a000 res 1024x1024x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 6 6 6 border: 2
|
|
layout(binding = 2) uniform sampler2DShadow textureUnitPS2;// Tex2 addr 0xf551a000 res 1024x1024x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 6 6 6 border: 2
|
|
layout(binding = 3) uniform sampler2DShadow textureUnitPS3;// Tex3 addr 0xf571a000 res 1024x1024x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 6 6 6 border: 2
|
|
layout(binding = 4) uniform sampler2DShadow textureUnitPS4;// Tex4 addr 0xf591a000 res 512x512x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 6 6 6 border: 2
|
|
layout(location = 0) in vec4 passParameterSem0;
|
|
layout(location = 1) in vec4 passParameterSem1;
|
|
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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
|
|
void main()
|
|
{
|
|
ivec4 R0i = ivec4(0);
|
|
ivec4 R1i = ivec4(0);
|
|
ivec4 R2i = ivec4(0);
|
|
ivec4 R3i = ivec4(0);
|
|
ivec4 R4i = ivec4(0);
|
|
ivec4 R5i = ivec4(0);
|
|
ivec4 R6i = ivec4(0);
|
|
ivec4 R7i = ivec4(0);
|
|
ivec4 R8i = ivec4(0);
|
|
ivec4 R9i = ivec4(0);
|
|
ivec4 R10i = ivec4(0);
|
|
ivec4 R123i = ivec4(0);
|
|
ivec4 R126i = 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;
|
|
bool activeMaskStack[4];
|
|
bool activeMaskStackC[5];
|
|
activeMaskStack[0] = false;
|
|
activeMaskStack[1] = false;
|
|
activeMaskStack[2] = false;
|
|
activeMaskStackC[0] = false;
|
|
activeMaskStackC[1] = false;
|
|
activeMaskStackC[2] = false;
|
|
activeMaskStackC[3] = false;
|
|
activeMaskStack[0] = true;
|
|
activeMaskStackC[0] = true;
|
|
activeMaskStackC[1] = true;
|
|
vec3 cubeMapSTM;
|
|
int cubeMapFaceId;
|
|
R0i = floatBitsToInt(passParameterSem0);
|
|
R1i = floatBitsToInt(passParameterSem1);
|
|
if( activeMaskStackC[1] == true ) {
|
|
R1i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.xy)).xyz);
|
|
}
|
|
if( activeMaskStackC[1] == true ) {
|
|
// 0
|
|
backupReg0i = R0i.z;
|
|
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),-0.0),vec4(intBitsToFloat(R1i.x),intBitsToFloat(R1i.y),intBitsToFloat(R1i.z),0.0)));
|
|
PV0i.x = tempi.x;
|
|
PV0i.y = tempi.x;
|
|
PV0i.z = tempi.x;
|
|
PV0i.w = tempi.x;
|
|
R5i.w = tempi.x;
|
|
PS0i = floatBitsToInt(1.0 / intBitsToFloat(backupReg0i));
|
|
// 1
|
|
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.x) * intBitsToFloat(PS0i));
|
|
R5i.y = floatBitsToInt(intBitsToFloat(uf_remappedPS[1].y) * 1.0);
|
|
R127i.z = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) * 1.0);
|
|
R127i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].x) * 1.0);
|
|
R4i.x = floatBitsToInt(intBitsToFloat(uf_remappedPS[1].x) * 1.0);
|
|
PS1i = R4i.x;
|
|
// 2
|
|
R5i.x = floatBitsToInt(intBitsToFloat(R0i.x) * intBitsToFloat(PV1i.x));
|
|
R6i.y = floatBitsToInt(intBitsToFloat(R0i.y) * intBitsToFloat(PV1i.x));
|
|
R5i.z = floatBitsToInt(intBitsToFloat(uf_remappedPS[1].z) * 1.0);
|
|
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].z) * 1.0);
|
|
// 3
|
|
backupReg0i = R127i.z;
|
|
R123i.x = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[3].x) + intBitsToFloat(R127i.w)));
|
|
PV1i.x = R123i.x;
|
|
R127i.z = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[3].z) + intBitsToFloat(PV0i.w)));
|
|
R123i.w = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[3].y) + intBitsToFloat(backupReg0i)));
|
|
PV1i.w = R123i.w;
|
|
// 4
|
|
R127i.x = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[4].y) + intBitsToFloat(PV1i.w)));
|
|
R127i.y = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[4].x) + intBitsToFloat(PV1i.x)));
|
|
R126i.z = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[5].x) + intBitsToFloat(R4i.x)));
|
|
R127i.w = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[5].y) + intBitsToFloat(R5i.y)));
|
|
// 5
|
|
R126i.y = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[5].z) + intBitsToFloat(R5i.z)));
|
|
R126i.w = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[4].z) + intBitsToFloat(R127i.z)));
|
|
// 6
|
|
backupReg0i = R127i.x;
|
|
backupReg1i = R127i.y;
|
|
backupReg2i = R127i.w;
|
|
R127i.x = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[6].x) + intBitsToFloat(R126i.z)));
|
|
R127i.y = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[7].y) + intBitsToFloat(backupReg0i)));
|
|
PV0i.y = R127i.y;
|
|
R126i.z = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[7].x) + intBitsToFloat(backupReg1i)));
|
|
PV0i.z = R126i.z;
|
|
R127i.w = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[6].y) + intBitsToFloat(backupReg2i)));
|
|
// 7
|
|
backupReg0i = R126i.y;
|
|
backupReg1i = R126i.w;
|
|
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.z) + -(0.5));
|
|
R126i.y = floatBitsToInt(intBitsToFloat(PV0i.y) + -(0.5));
|
|
R123i.z = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[6].z) + intBitsToFloat(backupReg0i)));
|
|
PV1i.z = R123i.z;
|
|
R126i.w = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[7].z) + intBitsToFloat(backupReg1i)));
|
|
// 8
|
|
R6i.x = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[8].x) + intBitsToFloat(R127i.x)));
|
|
R0i.y = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[8].y) + intBitsToFloat(R127i.w)));
|
|
R0i.z = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[8].z) + intBitsToFloat(PV1i.z)));
|
|
R2i.x = floatBitsToInt(max(intBitsToFloat(PV1i.x), -(intBitsToFloat(PV1i.x))));
|
|
PS0i = R2i.x;
|
|
// 9
|
|
R127i.x = ((0.5 > intBitsToFloat(PS0i))?int(0xFFFFFFFF):int(0x0));
|
|
PV1i.y = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[9].z)/resScaleDetail); //close details
|
|
PV1i.z = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[10].z)/resScaleDetail);//but less smooth lod transition
|
|
R7i.y = floatBitsToInt(max(intBitsToFloat(R126i.y), -(intBitsToFloat(R126i.y))));
|
|
PS1i = R7i.y;
|
|
// 10
|
|
R126i.x = ((0.5 > intBitsToFloat(PS1i))?int(0xFFFFFFFF):int(0x0));
|
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[11].z)/resScaleDetail);//close details
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[12].z)/resScaleDetail);//close details
|
|
R0i.w = PV1i.y;
|
|
R0i.w = clampFI32(R0i.w);
|
|
R1i.w = PV1i.z;
|
|
R1i.w = clampFI32(R1i.w);
|
|
PS0i = R1i.w;
|
|
// 11
|
|
R0i.x = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[9].x) / resScale);
|
|
PV1i.y = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[13].z)/resScale);
|
|
R0i.z = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[9].y) / resScale);
|
|
R2i.w = PV0i.z;
|
|
R2i.w = clampFI32(R2i.w);
|
|
R3i.w = PV0i.y;
|
|
R3i.w = clampFI32(R3i.w);
|
|
PS1i = R3i.w;
|
|
// 12
|
|
R1i.x = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[10].x) / resScale);
|
|
R1i.y = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[10].y) / resScale);
|
|
R2i.z = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[12].x) / resScale);
|
|
R4i.w = PV1i.y;
|
|
R4i.w = clampFI32(R4i.w);
|
|
R2i.y = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[12].y) / resScale);
|
|
PS0i = R2i.y;
|
|
// 13
|
|
R3i.x = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[11].x) / resScale);
|
|
R3i.y = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[11].y) / resScale);
|
|
R4i.z = floatBitsToInt(intBitsToFloat(R6i.x) + intBitsToFloat(uf_remappedPS[13].x) / resScale);
|
|
R6i.w = ((R127i.x == 0)?(0):(R126i.x));
|
|
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(uf_remappedPS[13].y) / resScale);
|
|
PS1i = R4i.y;
|
|
}
|
|
if( activeMaskStackC[1] == true ) {
|
|
R7i.x = floatBitsToInt(texture(textureUnitPS2, vec3(intBitsToFloat(R0i.xz), intBitsToFloat(R0i.w))));
|
|
R1i.x = floatBitsToInt(texture(textureUnitPS2, vec3(intBitsToFloat(R1i.xy), intBitsToFloat(R1i.w))));
|
|
R9i.x = floatBitsToInt(texture(textureUnitPS2, vec3(intBitsToFloat(R2i.zy), intBitsToFloat(R2i.w))));
|
|
R10i.x = floatBitsToInt(texture(textureUnitPS2, vec3(intBitsToFloat(R3i.xy), intBitsToFloat(R3i.w))));
|
|
R0i.x = floatBitsToInt(texture(textureUnitPS4, vec3(intBitsToFloat(R4i.zy), intBitsToFloat(R4i.w))));
|
|
}
|
|
if( activeMaskStackC[1] == true ) {
|
|
activeMaskStack[1] = activeMaskStack[0];
|
|
activeMaskStackC[2] = activeMaskStackC[1];
|
|
// 0
|
|
R8i.x = floatBitsToInt(intBitsToFloat(uf_remappedPS[14].x) * 1.0);
|
|
PV0i.x = R8i.x;
|
|
R4i.y = floatBitsToInt(intBitsToFloat(uf_remappedPS[14].y) * 1.0);
|
|
PV0i.y = R4i.y;
|
|
R2i.z = floatBitsToInt(intBitsToFloat(uf_remappedPS[14].z) * 1.0);
|
|
PV0i.z = R2i.z;
|
|
// 1
|
|
R123i.x = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[15].z) + intBitsToFloat(PV0i.z)));
|
|
PV1i.x = R123i.x;
|
|
R123i.z = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[15].y) + intBitsToFloat(PV0i.y)));
|
|
PV1i.z = R123i.z;
|
|
R123i.w = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[15].x) + intBitsToFloat(PV0i.x)));
|
|
PV1i.w = R123i.w;
|
|
// 2
|
|
R123i.y = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[16].x) + intBitsToFloat(PV1i.w)));
|
|
PV0i.y = R123i.y;
|
|
R123i.z = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[16].z) + intBitsToFloat(PV1i.x)));
|
|
PV0i.z = R123i.z;
|
|
R123i.w = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[16].y) + intBitsToFloat(PV1i.z)));
|
|
PV0i.w = R123i.w;
|
|
// 3
|
|
R3i.x = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[17].x) + intBitsToFloat(PV0i.y)));
|
|
R3i.y = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[17].y) + intBitsToFloat(PV0i.w)));
|
|
R0i.z = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[17].z) + intBitsToFloat(PV0i.z)));
|
|
// 4
|
|
predResult = (R6i.w != 0);
|
|
activeMaskStack[1] = predResult;
|
|
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
|
}
|
|
else {
|
|
activeMaskStack[1] = false;
|
|
activeMaskStackC[2] = false;
|
|
}
|
|
if( activeMaskStackC[2] == true ) {
|
|
activeMaskStack[2] = activeMaskStack[1];
|
|
activeMaskStackC[3] = activeMaskStackC[2];
|
|
// 0
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(R7i.x) + intBitsToFloat(R1i.x));
|
|
R0i.w = floatBitsToInt(max(intBitsToFloat(R2i.x), intBitsToFloat(R7i.y)));
|
|
// 1
|
|
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R9i.x));
|
|
// 2
|
|
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(R10i.x));
|
|
// 3
|
|
R6i.w = floatBitsToInt(intBitsToFloat(PV0i.x) * 0.25);
|
|
// 4
|
|
predResult = (intBitsToFloat(R0i.w) > intBitsToFloat(0x3eae147b));
|
|
activeMaskStack[2] = predResult;
|
|
activeMaskStackC[3] = predResult == true && activeMaskStackC[2] == true;
|
|
}
|
|
else {
|
|
activeMaskStack[2] = false;
|
|
activeMaskStackC[3] = false;
|
|
}
|
|
if( activeMaskStackC[3] == true ) {
|
|
// 0
|
|
R1i.xyz = floatBitsToInt(vec3(intBitsToFloat(R3i.x),intBitsToFloat(R3i.y),intBitsToFloat(R0i.z)) + vec3(intBitsToFloat(uf_remappedPS[18].x)/ resScale,intBitsToFloat(uf_remappedPS[18].y)/ resScale,intBitsToFloat(uf_remappedPS[18].z)/ resScale));
|
|
PV0i.z = R1i.z;
|
|
// 1
|
|
R7i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[19].x)/ resScale);
|
|
R7i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[19].y)/ resScale);
|
|
R1i.z = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[19].z)/ resScale);
|
|
PV1i.z = R1i.z;
|
|
R1i.w = PV0i.z;
|
|
R1i.w = clampFI32(R1i.w);
|
|
// 2
|
|
R2i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[20].x)/ resScale);
|
|
R2i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[20].y)/ resScale);
|
|
R1i.z = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[20].z)/ resScale);
|
|
PV0i.z = R1i.z;
|
|
R7i.w = PV1i.z;
|
|
R7i.w = clampFI32(R7i.w);
|
|
// 3
|
|
backupReg0i = R3i.x;
|
|
backupReg1i = R3i.y;
|
|
R3i.x = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(uf_remappedPS[21].x)/ resScale);
|
|
R3i.y = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(uf_remappedPS[21].y)/ resScale);
|
|
R1i.z = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[21].z)/ resScale);
|
|
PV1i.z = R1i.z;
|
|
R2i.w = PV0i.z;
|
|
R2i.w = clampFI32(R2i.w);
|
|
// 4
|
|
R3i.w = PV1i.z;
|
|
R3i.w = clampFI32(R3i.w);
|
|
}
|
|
if( activeMaskStackC[3] == true ) {
|
|
R1i.x = floatBitsToInt(texture(textureUnitPS3, vec3(intBitsToFloat(R1i.xy), intBitsToFloat(R1i.w))));
|
|
R0i.x = floatBitsToInt(texture(textureUnitPS3, vec3(intBitsToFloat(R7i.xy), intBitsToFloat(R7i.w))));
|
|
R2i.x = floatBitsToInt(texture(textureUnitPS3, vec3(intBitsToFloat(R2i.xy), intBitsToFloat(R2i.w))));
|
|
R3i.x = floatBitsToInt(texture(textureUnitPS3, vec3(intBitsToFloat(R3i.xy), intBitsToFloat(R3i.w))));
|
|
}
|
|
if( activeMaskStackC[3] == true ) {
|
|
// 0
|
|
PV0i.y = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(R1i.x));
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(R0i.w) + -(intBitsToFloat(0x3eae147b)));
|
|
// 1
|
|
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(R2i.x));
|
|
R127i.y = floatBitsToInt(intBitsToFloat(PV0i.z) * intBitsToFloat(0x40c80000));
|
|
// 2
|
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R3i.x));
|
|
// 3
|
|
R123i.x = floatBitsToInt((intBitsToFloat(PV0i.w) * 0.25 + -(intBitsToFloat(R6i.w))));
|
|
PV1i.x = R123i.x;
|
|
// 4
|
|
backupReg0i = R6i.w;
|
|
R6i.w = floatBitsToInt((intBitsToFloat(PV1i.x) * intBitsToFloat(R127i.y) + intBitsToFloat(backupReg0i)));
|
|
}
|
|
activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true;
|
|
activeMaskStack[1] = activeMaskStack[1] == false;
|
|
activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true;
|
|
if( activeMaskStackC[2] == true ) {
|
|
activeMaskStack[2] = activeMaskStack[1];
|
|
activeMaskStackC[3] = activeMaskStackC[2];
|
|
// 0
|
|
R123i.y = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[15].z) + intBitsToFloat(R2i.z)));
|
|
PV0i.y = R123i.y;
|
|
R123i.z = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[15].y) + intBitsToFloat(R4i.y)));
|
|
PV0i.z = R123i.z;
|
|
R123i.w = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[15].x) + intBitsToFloat(R8i.x)));
|
|
PV0i.w = R123i.w;
|
|
// 1
|
|
R123i.x = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[16].x) + intBitsToFloat(PV0i.w)));
|
|
PV1i.x = R123i.x;
|
|
R123i.z = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[16].z) + intBitsToFloat(PV0i.y)));
|
|
PV1i.z = R123i.z;
|
|
R123i.w = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[16].y) + intBitsToFloat(PV0i.z)));
|
|
PV1i.w = R123i.w;
|
|
// 2
|
|
R1i.x = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[17].x) + intBitsToFloat(PV1i.x)));
|
|
PV0i.x = R1i.x;
|
|
R3i.y = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[17].y) + intBitsToFloat(PV1i.w)));
|
|
PV0i.y = R3i.y;
|
|
R0i.z = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[17].z) + intBitsToFloat(PV1i.z)));
|
|
// 3
|
|
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.y) + -(0.5));
|
|
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.x) + -(0.5));
|
|
// 4
|
|
R2i.x = floatBitsToInt(max(intBitsToFloat(PV1i.w), -(intBitsToFloat(PV1i.w))));
|
|
PV0i.x = R2i.x;
|
|
R1i.y = floatBitsToInt(max(intBitsToFloat(PV1i.z), -(intBitsToFloat(PV1i.z))));
|
|
PV0i.y = R1i.y;
|
|
// 5
|
|
PV1i.x = ((0.5 > intBitsToFloat(PV0i.y))?int(0xFFFFFFFF):int(0x0));
|
|
PV1i.y = ((0.5 > intBitsToFloat(PV0i.x))?int(0xFFFFFFFF):int(0x0));
|
|
// 6
|
|
R0i.w = ((PV1i.y == 0)?(0):(PV1i.x));
|
|
// 7
|
|
predResult = (R0i.w != 0);
|
|
activeMaskStack[2] = predResult;
|
|
activeMaskStackC[3] = predResult == true && activeMaskStackC[2] == true;
|
|
}
|
|
else {
|
|
activeMaskStack[2] = false;
|
|
activeMaskStackC[3] = false;
|
|
}
|
|
if( activeMaskStackC[3] == true ) {
|
|
// 0
|
|
backupReg0i = R0i.z;
|
|
R127i.x = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[18].z)/ resScale);
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(uf_remappedPS[19].z)/ resScale);
|
|
R7i.w = floatBitsToInt(max(intBitsToFloat(R2i.x), intBitsToFloat(R1i.y)));
|
|
// 1
|
|
R0i.x = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(uf_remappedPS[19].x)/ resScale);
|
|
R0i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[19].y)/ resScale);
|
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(uf_remappedPS[18].x)/ resScale);
|
|
R0i.w = PV0i.z;
|
|
R0i.w = clampFI32(R0i.w);
|
|
R1i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[18].y)/ resScale);
|
|
PS1i = R1i.y;
|
|
// 2
|
|
backupReg0i = R0i.z;
|
|
R2i.x = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(uf_remappedPS[20].x)/ resScale);
|
|
R2i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[20].y)/ resScale);
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(uf_remappedPS[20].z)/ resScale);
|
|
R1i.w = R127i.x;
|
|
R1i.w = clampFI32(R1i.w);
|
|
// 3
|
|
R3i.x = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(uf_remappedPS[21].x)/ resScale);
|
|
PV1i.y = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[21].z)/ resScale);
|
|
R3i.z = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[21].y)/ resScale);
|
|
R2i.w = PV0i.z;
|
|
R2i.w = clampFI32(R2i.w);
|
|
// 4
|
|
R3i.w = PV1i.y;
|
|
R3i.w = clampFI32(R3i.w);
|
|
}
|
|
if( activeMaskStackC[3] == true ) {
|
|
R0i.x = floatBitsToInt(texture(textureUnitPS3, vec3(intBitsToFloat(R0i.xy), intBitsToFloat(R0i.w))));
|
|
R1i.x = floatBitsToInt(texture(textureUnitPS3, vec3(intBitsToFloat(R1i.zy), intBitsToFloat(R1i.w))));
|
|
R2i.x = floatBitsToInt(texture(textureUnitPS3, vec3(intBitsToFloat(R2i.xy), intBitsToFloat(R2i.w))));
|
|
R3i.x = floatBitsToInt(texture(textureUnitPS3, vec3(intBitsToFloat(R3i.xz), intBitsToFloat(R3i.w))));
|
|
}
|
|
if( activeMaskStackC[3] == true ) {
|
|
activeMaskStack[3] = activeMaskStack[2];
|
|
activeMaskStackC[4] = activeMaskStackC[3];
|
|
// 0
|
|
PV0i.y = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(R1i.x));
|
|
// 1
|
|
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(R2i.x));
|
|
// 2
|
|
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.z) + intBitsToFloat(R3i.x));
|
|
// 3
|
|
R6i.w = floatBitsToInt(intBitsToFloat(PV0i.x) * 0.25);
|
|
// 4
|
|
predResult = (intBitsToFloat(R7i.w) > intBitsToFloat(0x3eae147b));
|
|
activeMaskStack[3] = predResult;
|
|
activeMaskStackC[4] = predResult == true && activeMaskStackC[3] == true;
|
|
}
|
|
else {
|
|
activeMaskStack[3] = false;
|
|
activeMaskStackC[4] = false;
|
|
}
|
|
if( activeMaskStackC[4] == true ) {
|
|
// 0
|
|
backupReg0i = R4i.x;
|
|
R4i.x = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[5].x) + intBitsToFloat(backupReg0i)));
|
|
PV0i.x = R4i.x;
|
|
R4i.y = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[5].y) + intBitsToFloat(R5i.y)));
|
|
PV0i.y = R4i.y;
|
|
R0i.z = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[5].z) + intBitsToFloat(R5i.z)));
|
|
PV0i.z = R0i.z;
|
|
// 1
|
|
R4i.x = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[6].x) + intBitsToFloat(PV0i.x)));
|
|
PV1i.x = R4i.x;
|
|
R4i.y = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[6].y) + intBitsToFloat(PV0i.y)));
|
|
PV1i.y = R4i.y;
|
|
R0i.z = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[6].z) + intBitsToFloat(PV0i.z)));
|
|
PV1i.z = R0i.z;
|
|
// 2
|
|
R4i.x = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[8].x) + intBitsToFloat(PV1i.x)));
|
|
PV0i.x = R4i.x;
|
|
R4i.y = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[8].y) + intBitsToFloat(PV1i.y)));
|
|
PV0i.y = R4i.y;
|
|
R0i.z = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[8].z) + intBitsToFloat(PV1i.z)));
|
|
PV0i.z = R0i.z;
|
|
// 3
|
|
R4i.x = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(uf_remappedPS[13].x)/ resScale);
|
|
R4i.y = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(uf_remappedPS[13].y)/ resScale);
|
|
R0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(uf_remappedPS[13].z)/ resScale);
|
|
PV1i.z = R0i.z;
|
|
// 4
|
|
R4i.w = PV1i.z;
|
|
R4i.w = clampFI32(R4i.w);
|
|
}
|
|
if( activeMaskStackC[4] == true ) {
|
|
R0i.x = floatBitsToInt(texture(textureUnitPS4, vec3(intBitsToFloat(R4i.xy), intBitsToFloat(R4i.w))));
|
|
}
|
|
if( activeMaskStackC[4] == true ) {
|
|
// 0
|
|
R127i.x = floatBitsToInt(-(intBitsToFloat(R6i.w)) + intBitsToFloat(R0i.x));
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(R7i.w) + -(intBitsToFloat(0x3eae147b)));
|
|
// 1
|
|
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.z) * intBitsToFloat(0x40c80000));
|
|
// 2
|
|
backupReg0i = R6i.w;
|
|
R6i.w = floatBitsToInt((intBitsToFloat(R127i.x) * intBitsToFloat(PV1i.y) + intBitsToFloat(backupReg0i)));
|
|
}
|
|
activeMaskStackC[3] = activeMaskStack[2] == true && activeMaskStackC[2] == true;
|
|
activeMaskStack[2] = activeMaskStack[2] == false;
|
|
activeMaskStackC[3] = activeMaskStack[2] == true && activeMaskStackC[2] == true;
|
|
if( activeMaskStackC[3] == true ) {
|
|
// 0
|
|
R127i.x = floatBitsToInt(-(intBitsToFloat(R0i.x)) + 1.0);
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(R0i.y) + -(0.5));
|
|
PV0i.w = floatBitsToInt(intBitsToFloat(R6i.x) + -(0.5));
|
|
// 1
|
|
PV1i.x = floatBitsToInt(max(intBitsToFloat(PV0i.z), -(intBitsToFloat(PV0i.z))));
|
|
PV1i.y = floatBitsToInt(max(intBitsToFloat(PV0i.w), -(intBitsToFloat(PV0i.w))));
|
|
// 2
|
|
PV0i.w = floatBitsToInt(max(intBitsToFloat(PV1i.y), intBitsToFloat(PV1i.x)));
|
|
// 3
|
|
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.w) + -(intBitsToFloat(0x3ecccccd)));
|
|
// 4
|
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV1i.z) * intBitsToFloat(0x41200000));
|
|
PV0i.y = clampFI32(PV0i.y);
|
|
// 5
|
|
R6i.w = floatBitsToInt((intBitsToFloat(R127i.x) * intBitsToFloat(PV0i.y) + intBitsToFloat(R0i.x)));
|
|
}
|
|
activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true;
|
|
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
|
if( activeMaskStackC[1] == true ) {
|
|
activeMaskStack[1] = activeMaskStack[0];
|
|
activeMaskStackC[2] = activeMaskStackC[1];
|
|
// 0
|
|
PV0i.x = floatBitsToInt(intBitsToFloat(uf_remappedPS[22].z) * 1.0);
|
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedPS[22].y) * 1.0);
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(uf_remappedPS[22].x) * 1.0);
|
|
// 1
|
|
R123i.y = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[23].z) + intBitsToFloat(PV0i.x)));
|
|
PV1i.y = R123i.y;
|
|
R123i.z = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[23].y) + intBitsToFloat(PV0i.y)));
|
|
PV1i.z = R123i.z;
|
|
R123i.w = floatBitsToInt((intBitsToFloat(R5i.w) * intBitsToFloat(uf_remappedPS[23].x) + intBitsToFloat(PV0i.z)));
|
|
PV1i.w = R123i.w;
|
|
// 2
|
|
R123i.x = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[24].x) + intBitsToFloat(PV1i.w)));
|
|
PV0i.x = R123i.x;
|
|
R123i.z = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[24].z) + intBitsToFloat(PV1i.y)));
|
|
PV0i.z = R123i.z;
|
|
R123i.w = floatBitsToInt((intBitsToFloat(R6i.y) * intBitsToFloat(uf_remappedPS[24].y) + intBitsToFloat(PV1i.z)));
|
|
PV0i.w = R123i.w;
|
|
// 3
|
|
R1i.x = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[25].x) + intBitsToFloat(PV0i.x)));
|
|
PV1i.x = R1i.x;
|
|
R1i.y = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[25].y) + intBitsToFloat(PV0i.w)));
|
|
PV1i.y = R1i.y;
|
|
R2i.z = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[25].z) + intBitsToFloat(PV0i.z)));
|
|
// 4
|
|
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV1i.x) + -(0.5));
|
|
// 5
|
|
PV1i.z = floatBitsToInt(max(intBitsToFloat(PV0i.x), -(intBitsToFloat(PV0i.x))));
|
|
PV1i.w = floatBitsToInt(max(intBitsToFloat(PV0i.y), -(intBitsToFloat(PV0i.y))));
|
|
// 6
|
|
PV0i.x = ((0.5 > intBitsToFloat(PV1i.z))?int(0xFFFFFFFF):int(0x0));
|
|
PV0i.y = ((0.5 > intBitsToFloat(PV1i.w))?int(0xFFFFFFFF):int(0x0));
|
|
// 7
|
|
R0i.w = ((PV0i.y == 0)?(0):(PV0i.x));
|
|
// 8
|
|
predResult = (R0i.w != 0);
|
|
activeMaskStack[1] = predResult;
|
|
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
|
}
|
|
else {
|
|
activeMaskStack[1] = false;
|
|
activeMaskStackC[2] = false;
|
|
}
|
|
if( activeMaskStackC[2] == true ) {
|
|
// 0
|
|
R0i.xyz = floatBitsToInt(vec3(intBitsToFloat(R1i.x),intBitsToFloat(R1i.y),intBitsToFloat(R1i.x)) + vec3(intBitsToFloat(uf_remappedPS[26].x) / resScale,intBitsToFloat(uf_remappedPS[26].y) / resScale,intBitsToFloat(uf_remappedPS[27].x) / resScale));
|
|
R0i.w = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(uf_remappedPS[27].y)/ resScale); //
|
|
// 1
|
|
backupReg0i = R1i.x;
|
|
backupReg1i = R1i.y;
|
|
backupReg0i = R1i.x;
|
|
backupReg1i = R1i.y;
|
|
R1i.xyz = floatBitsToInt(vec3(intBitsToFloat(backupReg0i),intBitsToFloat(backupReg1i),intBitsToFloat(backupReg0i)) + vec3(intBitsToFloat(uf_remappedPS[28].x) / resScale,intBitsToFloat(uf_remappedPS[28].y) / resScale,intBitsToFloat(uf_remappedPS[29].x) / resScale));
|
|
R1i.w = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(uf_remappedPS[29].y) / resScale); //
|
|
}
|
|
if( activeMaskStackC[2] == true ) {
|
|
R0i.x = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R0i.xy)).x);
|
|
R2i.x = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R0i.zw)).x);
|
|
R1i.x = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.xy)).x);
|
|
R3i.x = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.zw)).x);
|
|
}
|
|
if( activeMaskStackC[2] == true ) {
|
|
// 0
|
|
backupReg0i = R0i.x;
|
|
PV0i.x = floatBitsToInt(intBitsToFloat(R2i.z) + -(intBitsToFloat(R1i.x)));
|
|
PV0i.y = floatBitsToInt(intBitsToFloat(R2i.z) + -(intBitsToFloat(backupReg0i)));
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(R2i.z) + -(intBitsToFloat(R2i.x)));
|
|
// 1
|
|
PV1i.x = floatBitsToInt(intBitsToFloat(R2i.z) + -(intBitsToFloat(R3i.x)));
|
|
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.z) * intBitsToFloat(uf_remappedPS[26].w));
|
|
PV1i.y = clampFI32(PV1i.y);
|
|
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.y) * intBitsToFloat(uf_remappedPS[26].w));
|
|
PV1i.z = clampFI32(PV1i.z);
|
|
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.x) * intBitsToFloat(uf_remappedPS[26].w));
|
|
PV1i.w = clampFI32(PV1i.w);
|
|
// 2
|
|
PV0i.x = floatBitsToInt(-(intBitsToFloat(PV1i.y)) + 1.0);
|
|
R127i.y = floatBitsToInt(-(intBitsToFloat(PV1i.w)) + 1.0);
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV1i.x) * intBitsToFloat(uf_remappedPS[26].w));
|
|
PV0i.z = clampFI32(PV0i.z);
|
|
PV0i.w = floatBitsToInt(-(intBitsToFloat(PV1i.z)) + 1.0);
|
|
// 3
|
|
R126i.y = floatBitsToInt(-(intBitsToFloat(PV0i.z)) + 1.0);
|
|
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(PV0i.x));
|
|
// 4
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV1i.z) + intBitsToFloat(R127i.y));
|
|
// 5
|
|
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R126i.y));
|
|
// 6
|
|
R0i.w = floatBitsToInt(intBitsToFloat(PV1i.x) * 0.25);
|
|
}
|
|
activeMaskStack[1] = activeMaskStack[1] == false;
|
|
activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true;
|
|
if( activeMaskStackC[2] == true ) {
|
|
// 0
|
|
R0i.w = 0x3f800000;
|
|
}
|
|
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
|
if( activeMaskStackC[1] == true ) {
|
|
// 0
|
|
PV0i.x = R6i.w;
|
|
PV0i.y = R0i.w;
|
|
PV0i.z = floatBitsToInt(intBitsToFloat(R6i.w) * intBitsToFloat(R0i.w));
|
|
R0i.w = 0;
|
|
// 1
|
|
R0i.x = floatBitsToInt((intBitsToFloat(PV0i.z) * intBitsToFloat(uf_remappedPS[30].x) + intBitsToFloat(uf_remappedPS[30].y)));
|
|
R0i.y = floatBitsToInt((intBitsToFloat(PV0i.y) * intBitsToFloat(uf_remappedPS[30].x) + intBitsToFloat(uf_remappedPS[30].y)));
|
|
R0i.z = floatBitsToInt((intBitsToFloat(PV0i.x) * intBitsToFloat(uf_remappedPS[30].x) + intBitsToFloat(uf_remappedPS[30].y)));
|
|
}
|
|
// export
|
|
passPixelColor0 = vec4(intBitsToFloat(R0i.x)*shadowExposure, intBitsToFloat(R0i.y)*shadowExposure, intBitsToFloat(R0i.z)*shadowExposure, intBitsToFloat(R0i.w));
|
|
}
|