From 6fb42060aea676a0e36edef2939dccfd40d17388 Mon Sep 17 00:00:00 2001 From: Crementif Date: Sat, 25 Nov 2017 13:24:48 +0100 Subject: [PATCH] [CTTT] Add experimental glitter fix --- .../83f42767ee584d5a_000000000007fffd_ps.txt | 234 +++++++++++++++ .../cc5b29e8cb801fb8_000000000007fff9_ps.txt | 195 +++++++++++++ .../d6228044a83341ca_000000000007fffd_ps.txt | 269 ++++++++++++++++++ 3 files changed, 698 insertions(+) create mode 100644 Source/CaptainToad/83f42767ee584d5a_000000000007fffd_ps.txt create mode 100644 Source/CaptainToad/cc5b29e8cb801fb8_000000000007fff9_ps.txt create mode 100644 Source/CaptainToad/d6228044a83341ca_000000000007fffd_ps.txt diff --git a/Source/CaptainToad/83f42767ee584d5a_000000000007fffd_ps.txt b/Source/CaptainToad/83f42767ee584d5a_000000000007fffd_ps.txt new file mode 100644 index 00000000..ddd44acc --- /dev/null +++ b/Source/CaptainToad/83f42767ee584d5a_000000000007fffd_ps.txt @@ -0,0 +1,234 @@ + +#version 420 +#extension GL_ARB_texture_gather : enable +// shader 83f42767ee584d5a +// Used for: Third glitter bloom pass +const float resXScale = ; +const float resYScale = ; + +uniform ivec4 uf_remappedPS[5]; +layout(binding = 1) uniform sampler2DArray textureUnitPS1;// Tex1 addr 0xf4fb1000 res 320x180x6 dim 5 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x6) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 +layout(location = 0) in vec4 passParameterSem0; +layout(location = 0) out vec4 passPixelColor0; +layout(location = 1) out vec4 passPixelColor1; +layout(location = 2) out vec4 passPixelColor2; +layout(location = 3) out vec4 passPixelColor3; +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() +{ +vec4 R0f = vec4(0.0); +vec4 R1f = vec4(0.0); +vec4 R2f = vec4(0.0); +vec4 R3f = vec4(0.0); +vec4 R4f = vec4(0.0); +vec4 R5f = vec4(0.0); +vec4 R6f = vec4(0.0); +vec4 R7f = vec4(0.0); +vec4 R8f = vec4(0.0); +vec4 R9f = vec4(0.0); +vec4 R10f = vec4(0.0); +vec4 R11f = vec4(0.0); +vec4 R122f = vec4(0.0); +vec4 R123f = 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 = passParameterSem0; +// 0 +R1f.x = (intBitsToFloat(uf_remappedPS[0].x)/resXScale * 1.0 + R0f.x); +R1f.y = (intBitsToFloat(uf_remappedPS[0].y)/resYScale * 1.0 + R0f.y); +R0f.z = roundEven(0.0); +PV0f.z = R0f.z; +R1f.w = intBitsToFloat(uf_remappedPS[1].y)/resYScale * intBitsToFloat(uf_remappedPS[1].y); +PV0f.w = R1f.w; +R2f.x = (intBitsToFloat(uf_remappedPS[0].x)/resXScale * 2.0 + R0f.x); +PS0f = R2f.x; +// 1 +R3f.x = (intBitsToFloat(uf_remappedPS[0].x)/resXScale * intBitsToFloat(0x40400000) + R0f.x); +R2f.y = (intBitsToFloat(uf_remappedPS[0].y)/resYScale * 2.0 + R0f.y); +R1f.z = PV0f.z; +R2f.w = intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV0f.w; +R2f.z = PV0f.z; +PS1f = R2f.z; +// 2 +R5f.x = (intBitsToFloat(uf_remappedPS[2].x)/resXScale * 1.0 + R0f.x); +R3f.y = (intBitsToFloat(uf_remappedPS[0].y)/resYScale * intBitsToFloat(0x40400000) + R0f.y); +R3f.z = R0f.z; +R5f.w = (intBitsToFloat(uf_remappedPS[2].y)/resYScale * 1.0 + R0f.y); +R6f.x = (intBitsToFloat(uf_remappedPS[2].x)/resXScale * 2.0 + R0f.x); +PS0f = R6f.x; +R4f.xyz = (texture(textureUnitPS1, vec3(R0f.x,R0f.y,R0f.z)).xyz); +R1f.xyz = (texture(textureUnitPS1, vec3(R1f.x,R1f.y,R1f.z)).xyz); +R2f.xyz = (texture(textureUnitPS1, vec3(R2f.x,R2f.y,R2f.z)).xyz); +R3f.xyz = (texture(textureUnitPS1, vec3(R3f.x,R3f.y,R3f.z)).xyz); +// 0 +backupReg0f = R1f.x; +R1f.x = (intBitsToFloat(uf_remappedPS[2].x)/resXScale * intBitsToFloat(0x40400000) + R0f.x); +R123f.y = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * R1f.y + R4f.y); +PV0f.y = R123f.y; +R123f.z = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * backupReg0f + R4f.x); +PV0f.z = R123f.z; +R123f.w = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * R1f.z + R4f.z); +PV0f.w = R123f.w; +R0f.z = roundEven(1.0); +PS0f = R0f.z; +// 1 +R123f.x = (R1f.w * R2f.x + PV0f.z); +PV1f.x = R123f.x; +R123f.y = (R1f.w * R2f.z + PV0f.w); +PV1f.y = R123f.y; +R5f.z = PS0f; +R123f.w = (R1f.w * R2f.y + PV0f.y); +PV1f.w = R123f.w; +R6f.y = (intBitsToFloat(uf_remappedPS[2].y)/resYScale * 2.0 + R0f.y); +PS1f = R6f.y; +// 2 +R11f.x = (R2f.w * R3f.x + PV1f.x); +R11f.y = (R2f.w * R3f.y + PV1f.w); +R11f.z = (R2f.w * R3f.z + PV1f.y); +R6f.w = R0f.z; +R1f.y = (intBitsToFloat(uf_remappedPS[2].y)/resYScale * intBitsToFloat(0x40400000) + R0f.y); +PS0f = R1f.y; +// 3 +R2f.x = (intBitsToFloat(uf_remappedPS[3].x)/resXScale * 1.0 + R0f.x); +R2f.y = (intBitsToFloat(uf_remappedPS[3].y)/resYScale * 1.0 + R0f.y); +R1f.z = R0f.z; +R4f.w = (intBitsToFloat(uf_remappedPS[3].x)/resXScale * 2.0 + R0f.x); +R8f.z = roundEven(2.0); +PS1f = R8f.z; +// 4 +R8f.x = R0f.x; +R8f.y = R0f.y; +R2f.z = PS1f; +R9f.w = R0f.y; +R9f.z = roundEven(intBitsToFloat(0x40400000)); +PS0f = R9f.z; +// 5 +R9f.x = R0f.x; +R3f.xyz = (texture(textureUnitPS1, vec3(R0f.x,R0f.y,R0f.z)).xyz); +R7f.xyz = (texture(textureUnitPS1, vec3(R8f.x,R8f.y,R8f.z)).xyz); +R10f.xyz = (texture(textureUnitPS1, vec3(R9f.x,R9f.w,R9f.z)).xyz); +R5f.xyz = (texture(textureUnitPS1, vec3(R5f.x,R5f.w,R5f.z)).xyz); +// 0 +backupReg0f = R3f.x; +R3f.x = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * R5f.z + R3f.z); +R4f.y = (intBitsToFloat(uf_remappedPS[3].y)/resYScale * 2.0 + R0f.y); +R3f.z = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * R5f.y + R3f.y); +R5f.w = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * R5f.x + backupReg0f); +R4f.z = R8f.z; +PS0f = R4f.z; +R6f.xyz = (texture(textureUnitPS1, vec3(R6f.x,R6f.y,R6f.w)).xyz); +R1f.xyz = (texture(textureUnitPS1, vec3(R1f.x,R1f.y,R1f.z)).xyz); +R2f.xyz = (texture(textureUnitPS1, vec3(R2f.x,R2f.y,R2f.z)).xyz); +R4f.xyz = (texture(textureUnitPS1, vec3(R4f.w,R4f.y,R4f.z)).xyz); +// 0 +R123f.x = (R1f.w * R6f.y + R3f.z); +PV0f.x = R123f.x; +R123f.y = (R1f.w * R6f.z + R3f.x); +PV0f.y = R123f.y; +R127f.z = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * R2f.y + R7f.y); +R123f.w = (R1f.w * R6f.x + R5f.w); +PV0f.w = R123f.w; +R3f.x = (intBitsToFloat(uf_remappedPS[3].x)/resXScale * intBitsToFloat(0x40400000) + R0f.x); +PS0f = R3f.x; +// 1 +backupReg0f = R2f.x; +backupReg1f = R2f.z; +R2f.x = (R2f.w * R1f.x + PV0f.w); +R2f.y = (R2f.w * R1f.y + PV0f.x); +R2f.z = (R2f.w * R1f.z + PV0f.y); +R123f.w = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * backupReg0f + R7f.x); +PV1f.w = R123f.w; +R122f.x = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * backupReg1f + R7f.z); +PS1f = R122f.x; +// 2 +R8f.x = (R1f.w * R4f.y + R127f.z); +R1f.y = (R1f.w * R4f.z + PS1f); +R3f.z = R8f.z; +R5f.w = (R1f.w * R4f.x + PV1f.w); +R3f.y = (intBitsToFloat(uf_remappedPS[3].y)/resYScale * intBitsToFloat(0x40400000) + R0f.y); +PS0f = R3f.y; +// 3 +R4f.x = (intBitsToFloat(uf_remappedPS[4].x)/resXScale * 1.0 + R0f.x); +R4f.y = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * 1.0 + R0f.y); +R4f.z = R9f.z; +R8f.w = (intBitsToFloat(uf_remappedPS[4].x)/resXScale * 2.0 + R0f.x); +R8f.y = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * 2.0 + R0f.y); +PS1f = R8f.y; +// 4 +backupReg0f = R0f.x; +backupReg1f = R0f.y; +R0f.x = (intBitsToFloat(uf_remappedPS[4].x)/resXScale * intBitsToFloat(0x40400000) + backupReg0f); +R0f.y = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * intBitsToFloat(0x40400000) + backupReg1f); +R8f.z = R9f.z; +R0f.w = R9f.z; +R3f.xyz = (texture(textureUnitPS1, vec3(R3f.x,R3f.y,R3f.z)).xyz); +R4f.xyz = (texture(textureUnitPS1, vec3(R4f.x,R4f.y,R4f.z)).xyz); +R9f.xyz = (texture(textureUnitPS1, vec3(R8f.w,R8f.y,R8f.z)).xyz); +R0f.xyz = (texture(textureUnitPS1, vec3(R0f.x,R0f.y,R0f.w)).xyz); +// 0 +backupReg0f = R1f.y; +R1f.x = (R2f.w * R3f.x + R5f.w); +R1f.y = (R2f.w * R3f.y + R8f.x); +R1f.z = (R2f.w * R3f.z + backupReg0f); +R123f.w = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * R4f.z + R10f.z); +PV0f.w = R123f.w; +// 1 +R123f.y = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * R4f.y + R10f.y); +PV1f.y = R123f.y; +R123f.z = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * R4f.x + R10f.x); +PV1f.z = R123f.z; +R123f.w = (R1f.w * R9f.z + PV0f.w); +PV1f.w = R123f.w; +// 2 +R123f.x = (R1f.w * R9f.x + PV1f.z); +PV0f.x = R123f.x; +R9f.z = (R2f.w * R0f.z + PV1f.w); +R123f.w = (R1f.w * R9f.y + PV1f.y); +PV0f.w = R123f.w; +// 3 +R9f.x = (R2f.w * R0f.x + PV0f.x); +PV1f.x = R9f.x; +R9f.y = (R2f.w * R0f.y + PV0f.w); +PV1f.y = R9f.y; +// 4 +R6f.xyz = vec3(PV1f.x,PV1f.y,R9f.z); +R6f.w = R9f.w; +// 5 +R5f.xyz = vec3(R1f.x,R1f.y,R1f.z); +R5f.w = R1f.w; +// 6 +R4f.xyz = vec3(R2f.x,R2f.y,R2f.z); +R4f.w = R2f.w; +// 7 +R3f.xyz = vec3(R11f.x,R11f.y,R11f.z); +R3f.w = R11f.w; +// export +passPixelColor0 = vec4(R3f.x, R3f.y, R3f.z, R3f.w); +passPixelColor1 = vec4(R4f.x, R4f.y, R4f.z, R4f.w); +passPixelColor2 = vec4(R5f.x, R5f.y, R5f.z, R5f.w); +passPixelColor3 = vec4(R6f.x, R6f.y, R6f.z, R6f.w); +} diff --git a/Source/CaptainToad/cc5b29e8cb801fb8_000000000007fff9_ps.txt b/Source/CaptainToad/cc5b29e8cb801fb8_000000000007fff9_ps.txt new file mode 100644 index 00000000..3f036e7e --- /dev/null +++ b/Source/CaptainToad/cc5b29e8cb801fb8_000000000007fff9_ps.txt @@ -0,0 +1,195 @@ + +#version 420 +#extension GL_ARB_texture_gather : enable +// shader cc5b29e8cb801fb8 +// Used for: First glitter bloom pass +const float resXScale = ; +const float resYScale = ; + +uniform ivec4 uf_remappedPS[5]; +layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e0c000 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 +layout(location = 0) in vec4 passParameterSem0; +layout(location = 0) out vec4 passPixelColor0; +layout(location = 1) out vec4 passPixelColor1; +layout(location = 2) out vec4 passPixelColor2; +layout(location = 3) out vec4 passPixelColor3; +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() +{ +vec4 R0f = vec4(0.0); +vec4 R1f = vec4(0.0); +vec4 R2f = vec4(0.0); +vec4 R3f = vec4(0.0); +vec4 R4f = vec4(0.0); +vec4 R5f = vec4(0.0); +vec4 R6f = vec4(0.0); +vec4 R7f = vec4(0.0); +vec4 R8f = vec4(0.0); +vec4 R9f = vec4(0.0); +vec4 R10f = vec4(0.0); +vec4 R11f = vec4(0.0); +vec4 R12f = vec4(0.0); +vec4 R123f = vec4(0.0); +vec4 R124f = 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 = passParameterSem0; +R10f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); +// 0 +R1f.x = (intBitsToFloat(uf_remappedPS[0].x)/resXScale* 1.0 + R0f.x); +R1f.y = (intBitsToFloat(uf_remappedPS[0].y)/resYScale * 1.0 + R0f.y); +R0f.z = (intBitsToFloat(uf_remappedPS[1].x)/resXScale * 1.0 + R0f.x); +R0f.w = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * 1.0 + R0f.y); +R3f.x = (intBitsToFloat(uf_remappedPS[0].x)/resXScale * 2.0 + R0f.x); +PS0f = R3f.x; +// 1 +R2f.x = (intBitsToFloat(uf_remappedPS[2].x)/resXScale * 1.0 + R0f.x); +R2f.y = (intBitsToFloat(uf_remappedPS[2].y)/resYScale * 1.0 + R0f.y); +R1f.z = (intBitsToFloat(uf_remappedPS[3].x)/resXScale * 1.0 + R0f.x); +R1f.w = (intBitsToFloat(uf_remappedPS[3].y)/resYScale * 1.0 + R0f.y); +R5f.x = (intBitsToFloat(uf_remappedPS[2].x)/resXScale * 2.0 + R0f.x); +PS1f = R5f.x; +// 2 +R4f.x = (intBitsToFloat(uf_remappedPS[1].x)/resXScale * 2.0 + R0f.x); +R3f.y = (intBitsToFloat(uf_remappedPS[0].y)/resYScale * 2.0 + R0f.y); +R4f.z = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * 2.0 + R0f.y); +R4f.w = (intBitsToFloat(uf_remappedPS[0].x)/resXScale * intBitsToFloat(0x40400000) + R0f.x); +R4f.y = (intBitsToFloat(uf_remappedPS[0].y)/resYScale * intBitsToFloat(0x40400000) + R0f.y); +PS0f = R4f.y; +// 3 +R6f.x = (intBitsToFloat(uf_remappedPS[3].x)/resXScale * 2.0 + R0f.x); +R5f.y = (intBitsToFloat(uf_remappedPS[2].y)/resYScale * 2.0 + R0f.y); +R6f.z = (intBitsToFloat(uf_remappedPS[3].y)/resYScale * 2.0 + R0f.y); +R6f.w = (intBitsToFloat(uf_remappedPS[2].x)/resXScale * intBitsToFloat(0x40400000) + R0f.x); +R6f.y = (intBitsToFloat(uf_remappedPS[2].y)/resYScale * intBitsToFloat(0x40400000) + R0f.y); +PS1f = R6f.y; +R7f.xyz = (texture(textureUnitPS0, R1f.xy).xyz); +R8f.xyz = (texture(textureUnitPS0, R0f.zw).xyz); +R2f.xyz = (texture(textureUnitPS0, R2f.xy).xyz); +R9f.xyz = (texture(textureUnitPS0, R1f.zw).xyz); +R3f.xyz = (texture(textureUnitPS0, R3f.xy).xyz); +R11f.xyz = (texture(textureUnitPS0, R4f.xz).xyz); +R5f.xyz = (texture(textureUnitPS0, R5f.xy).xyz); +R12f.xyz = (texture(textureUnitPS0, R6f.xz).xyz); +// 0 +backupReg0f = R0f.x; +backupReg1f = R0f.y; +backupReg0f = R0f.x; +backupReg1f = R0f.y; +R0f.x = (intBitsToFloat(uf_remappedPS[1].x)/resXScale * intBitsToFloat(0x40400000) + backupReg0f); +R0f.y = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * intBitsToFloat(0x40400000) + backupReg1f); +R1f.z = (intBitsToFloat(uf_remappedPS[3].x)/resXScale * intBitsToFloat(0x40400000) + backupReg0f); +R1f.w = (intBitsToFloat(uf_remappedPS[3].y)/resYScale * intBitsToFloat(0x40400000) + backupReg1f); +// 1 +backupReg0f = R7f.x; +backupReg1f = R7f.y; +backupReg2f = R7f.z; +R7f.x = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * backupReg0f + R10f.x); +R7f.y = intBitsToFloat(uf_remappedPS[4].y)/resYScale * intBitsToFloat(uf_remappedPS[4].y); +R7f.z = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * backupReg1f + R10f.y); +R0f.w = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * backupReg2f + R10f.z); +R2f.w = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * R8f.x + R10f.x); +PS1f = R2f.w; +R4f.xyz = (texture(textureUnitPS0, R4f.wy).xyz); +R0f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); +R6f.xyz = (texture(textureUnitPS0, R6f.wy).xyz); +R1f.xyz = (texture(textureUnitPS0, R1f.zw).xyz); +// 0 +R127f.x = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * R2f.x + R10f.x); +R127f.y = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * R2f.y + R10f.y); +R127f.z = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * R8f.y + R10f.y); +R127f.w = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * R8f.z + R10f.z); +R126f.w = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * R2f.z + R10f.z); +PS0f = R126f.w; +// 1 +R126f.x = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * R9f.y + R10f.y); +R126f.y = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * R9f.x + R10f.x); +R126f.z = (R7f.y * R3f.z + R0f.w); +R125f.w = (intBitsToFloat(uf_remappedPS[4].y)/resYScale * R9f.z + R10f.z); +R124f.w = (R7f.y * R11f.x + R2f.w); +PS1f = R124f.w; +// 2 +backupReg0f = R127f.w; +R125f.x = (R7f.y * R11f.y + R127f.z); +R125f.y = intBitsToFloat(uf_remappedPS[4].y)/resYScale * R7f.y; +PV0f.y = R125f.y; +R127f.z = (R7f.y * R3f.y + R7f.z); +R123f.w = (R7f.y * R3f.x + R7f.x); +PV0f.w = R123f.w; +R127f.w = (R7f.y * R11f.z + backupReg0f); +PS0f = R127f.w; +// 3 +backupReg0f = R127f.y; +backupReg1f = R127f.x; +R127f.x = (R7f.y * R5f.z + R126f.w); +R127f.y = (R7f.y * R12f.z + R125f.w); +R125f.z = (R7f.y * R5f.y + backupReg0f); +R126f.w = (R7f.y * R5f.x + backupReg1f); +R5f.x = (PV0f.y * R4f.x + PV0f.w); +PS1f = R5f.x; +// 4 +R124f.z = (R7f.y * R12f.y + R126f.x); +R123f.w = (R7f.y * R12f.x + R126f.y); +PV0f.w = R123f.w; +// 5 +R7f.x = (R125f.y * R0f.x + R124f.w); +R5f.y = (R125f.y * R4f.y + R127f.z); +R5f.z = (R125f.y * R4f.z + R126f.z); +R12f.w = (R125f.y * R6f.x + R126f.w); +R4f.x = (R125f.y * R1f.x + PV0f.w); +PS1f = R4f.x; +// 6 +R12f.x = (R125f.y * R6f.y + R125f.z); +R7f.y = (R125f.y * R0f.y + R125f.x); +R7f.z = (R125f.y * R0f.z + R127f.w); +R12f.z = (R125f.y * R6f.z + R127f.x); +PS0f = R12f.z; +// 7 +R4f.y = (R125f.y * R1f.y + R124f.z); +PV1f.y = R4f.y; +R4f.z = (R125f.y * R1f.z + R127f.y); +PV1f.z = R4f.z; +// 8 +R3f.xyz = vec3(R4f.x,PV1f.y,PV1f.z); +R3f.w = R4f.w; +// 9 +R2f.xyz = vec3(R12f.w,R12f.x,R12f.z); +R2f.w = R12f.w; +// 10 +R1f.xyz = vec3(R7f.x,R7f.y,R7f.z); +R1f.w = R7f.w; +// 11 +R0f.xyz = vec3(R5f.x,R5f.y,R5f.z); +R0f.w = R5f.w; +// export +passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); +passPixelColor1 = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +passPixelColor2 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); +passPixelColor3 = vec4(R3f.x, R3f.y, R3f.z, R3f.w); +} diff --git a/Source/CaptainToad/d6228044a83341ca_000000000007fffd_ps.txt b/Source/CaptainToad/d6228044a83341ca_000000000007fffd_ps.txt new file mode 100644 index 00000000..9adb1876 --- /dev/null +++ b/Source/CaptainToad/d6228044a83341ca_000000000007fffd_ps.txt @@ -0,0 +1,269 @@ + +#version 420 +#extension GL_ARB_texture_gather : enable +// shader d6228044a83341ca +// Used for: Second glitter bloom pass +const float resXScale = ; +const float resYScale = ; + +uniform ivec4 uf_remappedPS[8]; +layout(binding = 1) uniform sampler2DArray textureUnitPS1;// Tex1 addr 0xf4e48800 res 320x180x6 dim 5 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x6) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 +layout(location = 0) in vec4 passParameterSem0; +layout(location = 0) out vec4 passPixelColor0; +layout(location = 1) out vec4 passPixelColor1; +layout(location = 2) out vec4 passPixelColor2; +layout(location = 3) out vec4 passPixelColor3; +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() +{ +vec4 R0f = vec4(0.0); +vec4 R1f = vec4(0.0); +vec4 R2f = vec4(0.0); +vec4 R3f = vec4(0.0); +vec4 R4f = vec4(0.0); +vec4 R5f = vec4(0.0); +vec4 R6f = vec4(0.0); +vec4 R7f = vec4(0.0); +vec4 R8f = vec4(0.0); +vec4 R9f = vec4(0.0); +vec4 R10f = vec4(0.0); +vec4 R11f = vec4(0.0); +vec4 R123f = 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 = passParameterSem0; +// 0 +R1f.x = (intBitsToFloat(uf_remappedPS[0].x)/resXScale * 1.0 + R0f.x); +R1f.y = (intBitsToFloat(uf_remappedPS[0].y)/resYScale * 1.0 + R0f.y); +R0f.z = roundEven(0.0); +PV0f.z = R0f.z; +R1f.w = intBitsToFloat(uf_remappedPS[1].y)/resYScale * intBitsToFloat(uf_remappedPS[1].y); +PV0f.w = R1f.w; +R2f.x = (intBitsToFloat(uf_remappedPS[0].x)/resXScale * 2.0 + R0f.x); +PS0f = R2f.x; +// 1 +R3f.x = (intBitsToFloat(uf_remappedPS[0].x)/resXScale * intBitsToFloat(0x40400000) + R0f.x); +R2f.y = (intBitsToFloat(uf_remappedPS[0].y)/resYScale * 2.0 + R0f.y); +R1f.z = PV0f.z; +R2f.w = intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV0f.w; +R2f.z = PV0f.z; +PS1f = R2f.z; +// 2 +R5f.x = (intBitsToFloat(uf_remappedPS[2].x)/resXScale * 1.0 + R0f.x); +R3f.y = (intBitsToFloat(uf_remappedPS[0].y)/resYScale * intBitsToFloat(0x40400000) + R0f.y); +R3f.z = R0f.z; +R5f.w = (intBitsToFloat(uf_remappedPS[2].y)/resYScale * 1.0 + R0f.y); +R6f.x = (intBitsToFloat(uf_remappedPS[2].x)/resXScale * 2.0 + R0f.x); +PS0f = R6f.x; +R4f.xyz = (texture(textureUnitPS1, vec3(R0f.x,R0f.y,R0f.z)).xyz); +R1f.xyz = (texture(textureUnitPS1, vec3(R1f.x,R1f.y,R1f.z)).xyz); +R2f.xyz = (texture(textureUnitPS1, vec3(R2f.x,R2f.y,R2f.z)).xyz); +R3f.xyz = (texture(textureUnitPS1, vec3(R3f.x,R3f.y,R3f.z)).xyz); +// 0 +PV0f.x = R1f.x * intBitsToFloat(uf_remappedPS[3].x)/resXScale; +PV0f.y = R1f.y * intBitsToFloat(uf_remappedPS[3].y)/resYScale; +R0f.z = roundEven(1.0); +PV0f.w = R1f.z * intBitsToFloat(uf_remappedPS[3].z)/resXScale; +// 1 +R127f.x = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV0f.w + R4f.z); +PV1f.y = R2f.x * intBitsToFloat(uf_remappedPS[4].x)/resXScale; +R123f.z = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV0f.y + R4f.y); +PV1f.z = R123f.z; +R123f.w = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV0f.x + R4f.x); +PV1f.w = R123f.w; +PS1f = R2f.y * intBitsToFloat(uf_remappedPS[4].y)/resYScale; +// 2 +PV0f.x = R3f.x * intBitsToFloat(uf_remappedPS[5].x)/resXScale; +R123f.y = (R1f.w * PS1f + PV1f.z); +PV0f.y = R123f.y; +R123f.z = (R1f.w * PV1f.y + PV1f.w); +PV0f.z = R123f.z; +PV0f.w = R2f.z * intBitsToFloat(uf_remappedPS[4].z)/resXScale; +PS0f = R3f.y * intBitsToFloat(uf_remappedPS[5].y)/resYScale; +// 3 +backupReg0f = R0f.z; +R11f.x = (R2f.w * PV0f.x + PV0f.z); +R11f.y = (R2f.w * PS0f + PV0f.y); +PV1f.z = R3f.z * intBitsToFloat(uf_remappedPS[5].z)/resXScale; +R123f.w = (R1f.w * PV0f.w + R127f.x); +PV1f.w = R123f.w; +R5f.z = backupReg0f; +PS1f = R5f.z; +// 4 +R1f.x = R0f.x; +R6f.y = (intBitsToFloat(uf_remappedPS[2].y)/resYScale * 2.0 + R0f.y); +R11f.z = (R2f.w * PV1f.z + PV1f.w); +R6f.w = R0f.z; +R1f.z = roundEven(2.0); +PS0f = R1f.z; +// 5 +R9f.x = R0f.x; +R1f.y = R0f.y; +R9f.z = roundEven(intBitsToFloat(0x40400000)); +R9f.w = R0f.y; +R3f.xyz = (texture(textureUnitPS1, vec3(R0f.x,R0f.y,R0f.z)).xyz); +R7f.xyz = (texture(textureUnitPS1, vec3(R1f.x,R1f.y,R1f.z)).xyz); +R10f.xyz = (texture(textureUnitPS1, vec3(R9f.x,R9f.w,R9f.z)).xyz); +R5f.xyz = (texture(textureUnitPS1, vec3(R5f.x,R5f.w,R5f.z)).xyz); +// 0 +backupReg0f = R0f.z; +PV0f.x = intBitsToFloat(uf_remappedPS[3].z)/resXScale * R5f.z; +PV0f.y = intBitsToFloat(uf_remappedPS[3].y)/resYScale * R5f.y; +PV0f.z = intBitsToFloat(uf_remappedPS[3].x)/resXScale * R5f.x; +R5f.w = backupReg0f; +R2f.z = R1f.z; +PS0f = R2f.z; +// 1 +backupReg0f = R3f.x; +R3f.x = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV0f.x + R3f.z); +R5f.y = (intBitsToFloat(uf_remappedPS[2].y)/resYScale * intBitsToFloat(0x40400000) + R0f.y); +R5f.z = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV0f.y + R3f.y); +R0f.w = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV0f.z + backupReg0f); +R5f.x = (intBitsToFloat(uf_remappedPS[2].x)/resXScale * intBitsToFloat(0x40400000) + R0f.x); +PS1f = R5f.x; +// 2 +R2f.x = (intBitsToFloat(uf_remappedPS[6].x)/resXScale * 1.0 + R0f.x); +R2f.y = (intBitsToFloat(uf_remappedPS[6].y)/resYScale * 1.0 + R0f.y); +R3f.z = R1f.z; +R3f.w = (intBitsToFloat(uf_remappedPS[6].x)/resXScale * 2.0 + R0f.x); +R3f.y = (intBitsToFloat(uf_remappedPS[6].y)/resYScale * 2.0 + R0f.y); +PS0f = R3f.y; +R6f.xyz = (texture(textureUnitPS1, vec3(R6f.x,R6f.y,R6f.w)).xyz); +R4f.xyz = (texture(textureUnitPS1, vec3(R5f.x,R5f.y,R5f.w)).xyz); +R2f.xyz = (texture(textureUnitPS1, vec3(R2f.x,R2f.y,R2f.z)).xyz); +R8f.xyz = (texture(textureUnitPS1, vec3(R3f.w,R3f.y,R3f.z)).xyz); +// 0 +PV0f.x = intBitsToFloat(uf_remappedPS[4].y)/resYScale * R6f.y; +PV0f.y = intBitsToFloat(uf_remappedPS[4].x)/resXScale * R6f.x; +R127f.z = intBitsToFloat(uf_remappedPS[4].x)/resXScale * R8f.x; +PV0f.w = intBitsToFloat(uf_remappedPS[4].z)/resXScale * R6f.z; +R127f.y = intBitsToFloat(uf_remappedPS[4].y)/resYScale * R8f.y; +PS0f = R127f.y; +// 1 +PV1f.x = intBitsToFloat(uf_remappedPS[5].x)/resXScale * R4f.x; +R123f.y = (R1f.w * PV0f.x + R5f.z); +PV1f.y = R123f.y; +R123f.z = (R1f.w * PV0f.y + R0f.w); +PV1f.z = R123f.z; +R127f.w = (R1f.w * PV0f.w + R3f.x); +PS1f = intBitsToFloat(uf_remappedPS[5].y)/resYScale * R4f.y; +// 2 +R3f.x = (R2f.w * PV1f.x + PV1f.z); +R3f.y = (R2f.w * PS1f + PV1f.y); +PV0f.z = intBitsToFloat(uf_remappedPS[3].x)/resXScale * R2f.x; +PV0f.w = intBitsToFloat(uf_remappedPS[5].z)/resXScale * R4f.z; +PS0f = intBitsToFloat(uf_remappedPS[3].y)/resYScale * R2f.y; +// 3 +R123f.x = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV0f.z + R7f.x); +PV1f.x = R123f.x; +PV1f.y = intBitsToFloat(uf_remappedPS[3].z)/resXScale * R2f.z; +R3f.z = (R2f.w * PV0f.w + R127f.w); +R123f.w = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PS0f + R7f.y); +PV1f.w = R123f.w; +// 4 +R4f.x = (R1f.w * R127f.z + PV1f.x); +PV0f.y = intBitsToFloat(uf_remappedPS[4].z)/resXScale * R8f.z; +R4f.z = (R1f.w * R127f.y + PV1f.w); +R123f.w = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV1f.y + R7f.z); +PV0f.w = R123f.w; +// 5 +R1f.x = (intBitsToFloat(uf_remappedPS[6].x)/resXScale * intBitsToFloat(0x40400000) + R0f.x); +R1f.y = (intBitsToFloat(uf_remappedPS[6].y)/resYScale * intBitsToFloat(0x40400000) + R0f.y); +R7f.z = R9f.z; +R0f.w = (R1f.w * PV0f.y + PV0f.w); +R7f.x = (intBitsToFloat(uf_remappedPS[7].x)/resXScale * 1.0 + R0f.x); +PS1f = R7f.x; +// 6 +R8f.x = (intBitsToFloat(uf_remappedPS[7].x)/resXScale * 2.0 + R0f.x); +R7f.y = (intBitsToFloat(uf_remappedPS[7].y)/resYScale * 1.0 + R0f.y); +R8f.z = R9f.z; +R8f.w = (intBitsToFloat(uf_remappedPS[7].y)/resYScale * 2.0 + R0f.y); +R2f.x = (intBitsToFloat(uf_remappedPS[7].x)/resXScale * intBitsToFloat(0x40400000) + R0f.x); +PS0f = R2f.x; +// 7 +R2f.y = (intBitsToFloat(uf_remappedPS[7].y)/resYScale * intBitsToFloat(0x40400000) + R0f.y); +R2f.z = R9f.z; +R1f.xyz = (texture(textureUnitPS1, vec3(R1f.x,R1f.y,R1f.z)).xyz); +R7f.xyz = (texture(textureUnitPS1, vec3(R7f.x,R7f.y,R7f.z)).xyz); +R8f.xyz = (texture(textureUnitPS1, vec3(R8f.x,R8f.w,R8f.z)).xyz); +R2f.xyz = (texture(textureUnitPS1, vec3(R2f.x,R2f.y,R2f.z)).xyz); +// 0 +PV0f.x = intBitsToFloat(uf_remappedPS[5].y)/resYScale * R1f.y; +PV0f.y = intBitsToFloat(uf_remappedPS[5].x)/resXScale * R1f.x; +R127f.z = intBitsToFloat(uf_remappedPS[5].x)/resXScale * R2f.x; +PV0f.w = intBitsToFloat(uf_remappedPS[5].z)/resXScale * R1f.z; +R126f.x = intBitsToFloat(uf_remappedPS[5].y)/resYScale * R2f.y; +PS0f = R126f.x; +// 1 +backupReg0f = R4f.x; +R4f.x = (R2f.w * PV0f.y + backupReg0f); +R4f.y = (R2f.w * PV0f.x + R4f.z); +R4f.z = (R2f.w * PV0f.w + R0f.w); +PV1f.w = intBitsToFloat(uf_remappedPS[3].x)/resXScale * R7f.x; +PS1f = intBitsToFloat(uf_remappedPS[3].y)/resYScale * R7f.y; +// 2 +R127f.x = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV1f.w + R10f.x); +PV0f.y = intBitsToFloat(uf_remappedPS[3].z)/resXScale * R7f.z; +R127f.w = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PS1f + R10f.y); +// 3 +PV1f.y = intBitsToFloat(uf_remappedPS[4].y)/resYScale * R8f.y; +PV1f.z = intBitsToFloat(uf_remappedPS[4].x)/resXScale * R8f.x; +R126f.w = (intBitsToFloat(uf_remappedPS[1].y)/resYScale * PV0f.y + R10f.z); +// 4 +PV0f.x = intBitsToFloat(uf_remappedPS[4].z)/resXScale * R8f.z; +R127f.y = intBitsToFloat(uf_remappedPS[5].z)/resXScale * R2f.z; +R123f.z = (R1f.w * PV1f.y + R127f.w); +PV0f.z = R123f.z; +R123f.w = (R1f.w * PV1f.z + R127f.x); +PV0f.w = R123f.w; +// 5 +R2f.x = (R2f.w * R127f.z + PV0f.w); +R2f.y = (R2f.w * R126f.x + PV0f.z); +R123f.w = (R1f.w * PV0f.x + R126f.w); +PV1f.w = R123f.w; +// 6 +R2f.z = (R2f.w * R127f.y + PV1f.w); +PV0f.z = R2f.z; +// 7 +R8f.xyz = vec3(R2f.x,R2f.y,PV0f.z); +R8f.w = R2f.w; +// 8 +R7f.xyz = vec3(R4f.x,R4f.y,R4f.z); +R7f.w = R4f.w; +// 9 +R6f.xyz = vec3(R3f.x,R3f.y,R3f.z); +R6f.w = R3f.w; +// 10 +R5f.xyz = vec3(R11f.x,R11f.y,R11f.z); +R5f.w = R11f.w; +// export +passPixelColor0 = vec4(R5f.x, R5f.y, R5f.z, R5f.w); +passPixelColor1 = vec4(R6f.x, R6f.y, R6f.z, R6f.w); +passPixelColor2 = vec4(R7f.x, R7f.y, R7f.z, R7f.w); +passPixelColor3 = vec4(R8f.x, R8f.y, R8f.z, R8f.w); +} \ No newline at end of file