mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-26 19:44:14 +01:00
175568dd28
FIX Half transparant water ADD Boss and in game cutscenes, roller coaster
139 lines
4.5 KiB
Plaintext
139 lines
4.5 KiB
Plaintext
#version 400
|
|
#extension GL_ARB_texture_gather : enable
|
|
const float overwriteWidth = 3200.0; //overwidth value.0
|
|
const float overwriteHeight = 1800.0;
|
|
// shader 51b861378e483368 //Cutscene fixes
|
|
uniform ivec4 uf_remappedPS[9];
|
|
uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4a8c800 res 1280x720x1 dim 1 tm: 4 format 080e compSel: 0 0 0 0 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
|
in vec4 passParameter0;
|
|
in vec4 passParameter1;
|
|
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()
|
|
{
|
|
vec4 R0f = vec4(0.0);
|
|
vec4 R1f = vec4(0.0);
|
|
vec4 R2f = 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;
|
|
R1f = gl_FragCoord.xyzw;
|
|
R0f = passParameter1;
|
|
// 0
|
|
vec2 scaleFactor = vec2(overwriteWidth,overwriteHeight)/vec2(1280.0,720.0);
|
|
R1f.xy = R1f.xy / scaleFactor;
|
|
backupReg0f = R1f.x;
|
|
backupReg1f = R1f.y;
|
|
R1f.x = mul_nonIEEE(backupReg0f, intBitsToFloat(uf_remappedPS[0].x));
|
|
PV0f.x = R1f.x;
|
|
R1f.y = mul_nonIEEE(backupReg1f, intBitsToFloat(uf_remappedPS[0].y));
|
|
PV0f.y = R1f.y;
|
|
R2f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w), 1.0);
|
|
PV0f.z = R2f.z;
|
|
R1f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z), 1.0);
|
|
PV0f.w = R1f.w;
|
|
R1f.z = 1.0 / R0f.z;
|
|
PS0f = R1f.z;
|
|
R1f.x = (texture(textureUnitPS0, R1f.xy).x);
|
|
// 0
|
|
backupReg0f = R0f.x;
|
|
PV0f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x), 1.0);
|
|
R123f.y = (R1f.x * intBitsToFloat(0x40000000) + -(1.0));
|
|
PV0f.y = R123f.y;
|
|
R127f.z = R0f.y * R1f.z;
|
|
PV0f.z = R127f.z;
|
|
PV0f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y), 1.0);
|
|
R127f.w = backupReg0f * R1f.z;
|
|
PS0f = R127f.w;
|
|
// 1
|
|
R123f.x = (PV0f.y * intBitsToFloat(uf_remappedPS[2].x) + PV0f.x);
|
|
PV1f.x = R123f.x;
|
|
R123f.y = (PV0f.y * intBitsToFloat(uf_remappedPS[2].w) + R2f.z);
|
|
PV1f.y = R123f.y;
|
|
R123f.z = (PV0f.y * intBitsToFloat(uf_remappedPS[2].z) + R1f.w);
|
|
PV1f.z = R123f.z;
|
|
R123f.w = (PV0f.y * intBitsToFloat(uf_remappedPS[2].y) + PV0f.w);
|
|
PV1f.w = R123f.w;
|
|
// 2
|
|
R123f.x = (R127f.z * intBitsToFloat(uf_remappedPS[3].x) + PV1f.x);
|
|
PV0f.x = R123f.x;
|
|
R123f.y = (R127f.z * intBitsToFloat(uf_remappedPS[3].w) + PV1f.y);
|
|
PV0f.y = R123f.y;
|
|
R123f.z = (R127f.z * intBitsToFloat(uf_remappedPS[3].z) + PV1f.z);
|
|
PV0f.z = R123f.z;
|
|
R123f.w = (R127f.z * intBitsToFloat(uf_remappedPS[3].y) + PV1f.w);
|
|
PV0f.w = R123f.w;
|
|
// 3
|
|
backupReg0f = R127f.w;
|
|
R127f.x = (R127f.w * intBitsToFloat(uf_remappedPS[4].x) + PV0f.x);
|
|
PV1f.x = R127f.x;
|
|
R123f.y = (R127f.w * intBitsToFloat(uf_remappedPS[4].w) + PV0f.y);
|
|
PV1f.y = R123f.y;
|
|
R127f.z = (R127f.w * intBitsToFloat(uf_remappedPS[4].z) + PV0f.z);
|
|
PV1f.z = R127f.z;
|
|
R127f.w = (backupReg0f * intBitsToFloat(uf_remappedPS[4].y) + PV0f.w);
|
|
PV1f.w = R127f.w;
|
|
// 4
|
|
R126f.y = -(intBitsToFloat(uf_remappedPS[5].y)) + intBitsToFloat(uf_remappedPS[6].y);
|
|
PV0f.y = R126f.y;
|
|
R126f.z = -(intBitsToFloat(uf_remappedPS[5].x)) + intBitsToFloat(uf_remappedPS[6].x);
|
|
PV0f.z = R126f.z;
|
|
PS0f = 1.0 / PV1f.y;
|
|
// 5
|
|
backupReg0f = R127f.x;
|
|
R127f.x = -(intBitsToFloat(uf_remappedPS[5].z)) + intBitsToFloat(uf_remappedPS[6].z);
|
|
PV1f.x = R127f.x;
|
|
R127f.y = R127f.z * PS0f;
|
|
PV1f.y = R127f.y;
|
|
R127f.z = R127f.w * PS0f;
|
|
PV1f.z = R127f.z;
|
|
PV1f.w = backupReg0f * PS0f;
|
|
// 6
|
|
PV0f.x = mul_nonIEEE(PV1f.w, intBitsToFloat(uf_remappedPS[7].x));
|
|
R125f.y = -(R0f.w) + -(PV1f.y);
|
|
PV0f.y = R125f.y;
|
|
// 7
|
|
R123f.w = (R127f.z * intBitsToFloat(uf_remappedPS[7].y) + PV0f.x);
|
|
PV1f.w = R123f.w;
|
|
// 8
|
|
R123f.z = (R127f.y * intBitsToFloat(uf_remappedPS[7].z) + PV1f.w);
|
|
PV0f.z = R123f.z;
|
|
// 9
|
|
PV1f.y = -(intBitsToFloat(uf_remappedPS[7].w)) + PV0f.z;
|
|
// 10
|
|
PV0f.w = mul_nonIEEE(PV1f.y, intBitsToFloat(uf_remappedPS[6].w));
|
|
PV0f.w = clamp(PV0f.w, 0.0, 1.0);
|
|
// 11
|
|
R0f.x = (R126f.z * PV0f.w + intBitsToFloat(uf_remappedPS[5].x));
|
|
PV1f.x = R0f.x;
|
|
R0f.y = (R126f.y * PV0f.w + intBitsToFloat(uf_remappedPS[5].y));
|
|
PV1f.y = R0f.y;
|
|
R0f.z = (R127f.x * PV0f.w + intBitsToFloat(uf_remappedPS[5].z));
|
|
PV1f.z = R0f.z;
|
|
// 12
|
|
R0f.w = (R125f.y * intBitsToFloat(uf_remappedPS[5].w) + intBitsToFloat(uf_remappedPS[8].w));
|
|
R0f.w = clamp(R0f.w, 0.0, 1.0);
|
|
PV0f.w = R0f.w;
|
|
// export
|
|
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
|
|
}
|