cemu_graphic_packs/Workaround/BreathOfTheWild_SmokeDirection/c85a3a407d055ff0_0000000000003849_ps.txt
NAVras-Z 15b1ff9522 [BotW] so many smoke shaders...
added the smoke shaders of guardian explosion this time, although tbh might not need all of them to workaround the bug, just in case... (too lazy to check xD
2017-10-12 03:45:04 +08:00

180 lines
5.9 KiB
Plaintext

#version 420
#extension GL_ARB_texture_gather : enable
// shader c85a3a407d055ff0 // guardian explosion fire ps
uniform ivec4 uf_remappedPS[1];
uniform float uf_alphaTestRef;
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x2115a000 res 128x64x1 dim 1 tm: 4 format 0031 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 2 0 border: 0
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x2105e800 res 256x256x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 1 2 0 border: 0
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x21156000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 0 0 0 border: 0
layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0
layout(location = 0) in vec4 passParameterSem0;
layout(location = 1) in vec4 passParameterSem1;
layout(location = 2) in vec4 passParameterSem3;
layout(location = 3) in vec4 passParameterSem4;
layout(location = 4) in vec4 passParameterSem8;
layout(location = 5) in vec4 passParameterSem9;
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()
{
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 R123f = 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;
R1f = passParameterSem1;
R2f = passParameterSem3;
R3f = passParameterSem4;
R4f = passParameterSem8;
R5f = passParameterSem9;
R6f.xw = (texture(textureUnitPS0, R4f.xy).xw);
// 0
PV0f.x = R3f.y * 1.5;
PV0f.y = R3f.y;
PV0f.y /= 2.0;
R123f.z = (R6f.w * 2.0 + -(1.0));
PV0f.z = R123f.z;
R123f.w = (R6f.x * 2.0 + -(1.0));
PV0f.w = R123f.w;
R3f.z = 1.0 / R2f.w;
PS0f = R3f.z;
// 1
PV1f.x = mul_nonIEEE(PV0f.w, PV0f.y);
PV1f.y = mul_nonIEEE(PV0f.z, PV0f.y);
PV1f.z = mul_nonIEEE(PV0f.z, PV0f.x);
PV1f.w = mul_nonIEEE(PV0f.w, PV0f.x);
R6f.x = mul_nonIEEE(R2f.x, PS0f);
PS1f = R6f.x;
// 2
backupReg0f = R4f.z;
backupReg1f = R4f.w;
R4f.xyz = vec3(R5f.x,R5f.y,backupReg0f) + vec3(PV1f.w,PV1f.z,PV1f.x);
R4f.w = backupReg1f + PV1f.y;
R6f.y = mul_nonIEEE(R2f.y, R3f.z);
PS0f = R6f.y;
R4f.x = (texture(textureUnitPS2, R4f.xy).w);
R6f.x = (texture(textureUnitPS4, R6f.xy).x);
R5f.xyzw = (texture(textureUnitPS1, R4f.zw).xyzw);
// 0
R123f.x = (mul_nonIEEE(R6f.x,intBitsToFloat(uf_remappedPS[0].w)) + intBitsToFloat(uf_remappedPS[0].x));
PV0f.x = R123f.x;
R123f.y = (R0f.w * 2.0 + -(1.0));
PV0f.y = R123f.y;
PV0f.z = R2f.z * R3f.z;
PV0f.w = -(R5f.z) + 1.0;
R127f.z = R1f.x + R1f.x;
PS0f = R127f.z;
// 1
R127f.x = (-(PV0f.w) * intBitsToFloat(0x40c00000) + PV0f.x);
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),PV0f.z) + -(intBitsToFloat(uf_remappedPS[0].y)));
PV1f.y = R123f.y;
R126f.z = R1f.y + R1f.y;
PV1f.z = R126f.z;
R127f.w = R4f.x + PV0f.y;
PV1f.w = R127f.w;
R126f.y = R1f.z + R1f.z;
PS1f = R126f.y;
// 2
R125f.x = -(R1f.x) + R127f.z;
R127f.y = -(R1f.y) + PV1f.z;
PV0f.z = max(PV1f.w, intBitsToFloat(0x3e4ccccd));
R126f.w = -(R1f.z) + PS1f;
PS0f = 1.0 / PV1f.y;
// 3
PV1f.x = min(PV0f.z, intBitsToFloat(0x3e99999a));
PV1f.y = R5f.z + R4f.x;
PV1f.y /= 2.0;
PV1f.z = -(R0f.w) + 1.0;
PV1f.w = -(intBitsToFloat(uf_remappedPS[0].z)) * PS0f;
PS1f = mul_nonIEEE(R5f.w, R127f.w);
// 4
R126f.x = mul_nonIEEE(R1f.w, PS1f);
R126f.x = clamp(R126f.x, 0.0, 1.0);
PV0f.y = PV1f.x + intBitsToFloat(0xbe4ccccd);
PV0f.z = R127f.x + -(PV1f.w);
R127f.w = PV1f.y + intBitsToFloat(0xbecccccd);
R127f.w *= 4.0;
R127f.x = mul_nonIEEE(PV1f.z, PV1f.z);
R127f.x *= 4.0;
PS0f = R127f.x;
// 5
PV1f.x = PV0f.z;
PV1f.x *= 2.0;
PV1f.x = clamp(PV1f.x, 0.0, 1.0);
R123f.y = (PV0f.z * intBitsToFloat(0x3d08888a) + intBitsToFloat(0xbe2aaaad));
R123f.y = clamp(R123f.y, 0.0, 1.0);
PV1f.y = R123f.y;
PV1f.w = PV0f.y * intBitsToFloat(0x411fffff);
// 6
backupReg0f = R127f.w;
PV0f.x = mul_nonIEEE(PV1f.y, PV1f.y);
PV0f.y = mul_nonIEEE(R126f.x, PV1f.x);
PV0f.y = clamp(PV0f.y, 0.0, 1.0);
PV0f.z = mul_nonIEEE(R5f.x, PV1f.w);
R127f.w = (mul_nonIEEE(PV1f.w,backupReg0f) + -(R127f.x));
R127f.w = clamp(R127f.w, 0.0, 1.0);
// 7
R123f.x = (mul_nonIEEE(R127f.y,PV0f.z) + R1f.y);
PV1f.x = R123f.x;
R123f.y = (mul_nonIEEE(R126f.w,PV0f.z) + R1f.z);
PV1f.y = R123f.y;
R123f.z = (mul_nonIEEE(R125f.x,PV0f.z) + R1f.x);
PV1f.z = R123f.z;
R126f.w = (0.5 * PV0f.x + 0.5);
R1f.w = mul_nonIEEE(R3f.x, PV0f.y);
PS1f = R1f.w;
// 8
R123f.x = (mul_nonIEEE(R126f.y,R5f.y) + PV1f.y);
PV0f.x = R123f.x;
R123f.z = (mul_nonIEEE(R126f.z,R5f.y) + PV1f.x);
PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(R127f.z,R5f.y) + PV1f.z);
PV0f.w = R123f.w;
// 9
R125f.x = mul_nonIEEE(PV0f.x, R126f.w);
PV1f.x = R125f.x;
R126f.y = mul_nonIEEE(PV0f.z, R126f.w);
PV1f.y = R126f.y;
R127f.z = mul_nonIEEE(PV0f.w, R126f.w);
PV1f.z = R127f.z;
// 10
backupReg0f = R0f.y;
backupReg1f = R0f.x;
PV0f.x = R0f.z + -(PV1f.x);
PV0f.y = backupReg0f + -(PV1f.y);
PV0f.z = backupReg1f + -(PV1f.z);
// 11
R1f.x = (mul_nonIEEE(PV0f.z,R127f.w) + R127f.z);
R1f.y = (mul_nonIEEE(PV0f.y,R127f.w) + R126f.y);
R1f.z = (mul_nonIEEE(PV0f.x,R127f.w) + R125f.x);
// export
if( ((vec4(R1f.x, R1f.y, R1f.z, R1f.w)).a > uf_alphaTestRef) == false) discard;
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
}