mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-12-23 08:21:51 +01:00
[Color Splash] AA removal
This commit is contained in:
parent
231ea0aa1d
commit
9062f49c04
@ -0,0 +1,229 @@
|
||||
#version 400
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 5d17c42e049ba5c9
|
||||
uniform ivec4 uf_remappedPS[1];
|
||||
uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4000800 res 1280x720x1 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: 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 R4i = ivec4(0);
|
||||
ivec4 R5i = ivec4(0);
|
||||
ivec4 R123i = ivec4(0);
|
||||
ivec4 R124i = ivec4(0);
|
||||
ivec4 R125i = ivec4(0);
|
||||
ivec4 R126i = 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.xyz = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R0i.zw),0.0).xyz);
|
||||
//R2i.xyz = floatBitsToInt(textureLodOffset(textureUnitPS0, intBitsToFloat(R0i.zw),0.0,ivec2(1,0)).xyz);
|
||||
//R3i.xyz = floatBitsToInt(textureLodOffset(textureUnitPS0, intBitsToFloat(R0i.zw),0.0,ivec2(0,1)).xyz);
|
||||
//R4i.xyz = floatBitsToInt(textureLodOffset(textureUnitPS0, intBitsToFloat(R0i.zw),0.0,ivec2(1,1)).xyz);
|
||||
//R5i.xyz = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R0i.xy),0.0).xyz);
|
||||
// 0
|
||||
tempi.x = floatBitsToInt(intBitsToFloat(R1i.x) * intBitsToFloat(0x3e990afe) + intBitsToFloat(R1i.y) * intBitsToFloat(0x3f162c23) + intBitsToFloat(R1i.z) * intBitsToFloat(0x3dea7371) + intBitsToFloat(0x80000000) * 0.0);
|
||||
PV0i.x = tempi.x;
|
||||
PV0i.y = tempi.x;
|
||||
PV0i.z = tempi.x;
|
||||
PV0i.w = tempi.x;
|
||||
R127i.z = tempi.x;
|
||||
PS0i = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), intBitsToFloat(0x3dea7371)));
|
||||
// 1
|
||||
tempi.x = floatBitsToInt(intBitsToFloat(R2i.x) * intBitsToFloat(0x3e990afe) + intBitsToFloat(R2i.y) * intBitsToFloat(0x3f162c23) + intBitsToFloat(PS0i) * 1.0 + intBitsToFloat(0x80000000) * 0.0);
|
||||
PV1i.x = tempi.x;
|
||||
PV1i.y = tempi.x;
|
||||
PV1i.z = tempi.x;
|
||||
PV1i.w = tempi.x;
|
||||
R127i.y = tempi.x;
|
||||
PS1i = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R3i.z), intBitsToFloat(0x3dea7371)));
|
||||
// 2
|
||||
R125i.x = floatBitsToInt(intBitsToFloat(R3i.x) * intBitsToFloat(0x3e990afe) + intBitsToFloat(R3i.y) * intBitsToFloat(0x3f162c23) + intBitsToFloat(PS1i) * 1.0 + intBitsToFloat(0x80000000) * 0.0);
|
||||
PV0i.x = R125i.x;
|
||||
PV0i.y = R125i.x;
|
||||
PV0i.z = R125i.x;
|
||||
PV0i.w = R125i.x;
|
||||
R126i.x = floatBitsToInt(intBitsToFloat(R127i.z) + intBitsToFloat(PV1i.x));
|
||||
PS0i = R126i.x;
|
||||
// 3
|
||||
tempi.x = floatBitsToInt(intBitsToFloat(R4i.x) * intBitsToFloat(0x3e990afe) + intBitsToFloat(R4i.y) * intBitsToFloat(0x3f162c23) + intBitsToFloat(R4i.z) * intBitsToFloat(0x3dea7371) + intBitsToFloat(0x80000000) * 0.0);
|
||||
PV1i.x = tempi.x;
|
||||
PV1i.y = tempi.x;
|
||||
PV1i.z = tempi.x;
|
||||
PV1i.w = tempi.x;
|
||||
R127i.w = tempi.x;
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(R127i.z) + intBitsToFloat(PV0i.x));
|
||||
PS1i = R127i.x;
|
||||
// 4
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(PV1i.x));
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(R125i.x) + intBitsToFloat(PV1i.x));
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(R125i.x) + intBitsToFloat(R126i.x));
|
||||
R126i.w = floatBitsToInt(min(intBitsToFloat(R127i.z), intBitsToFloat(R127i.y)));
|
||||
PV0i.w = R126i.w;
|
||||
R124i.x = floatBitsToInt(min(intBitsToFloat(R125i.x), intBitsToFloat(PV1i.x)));
|
||||
PS0i = R124i.x;
|
||||
// 5
|
||||
backupReg0i = R127i.z;
|
||||
backupReg1i = R127i.w;
|
||||
PV1i.x = floatBitsToInt(-(intBitsToFloat(PV0i.y)) + intBitsToFloat(R126i.x));
|
||||
PV1i.y = floatBitsToInt(intBitsToFloat(R127i.w) + intBitsToFloat(PV0i.z));
|
||||
R127i.z = floatBitsToInt(max(intBitsToFloat(backupReg0i), intBitsToFloat(R127i.y)));
|
||||
PV1i.z = R127i.z;
|
||||
R127i.w = floatBitsToInt(-(intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.x));
|
||||
PV1i.w = R127i.w;
|
||||
R127i.x = floatBitsToInt(max(intBitsToFloat(R125i.x), intBitsToFloat(backupReg1i)));
|
||||
PS1i = R127i.x;
|
||||
// 6
|
||||
backupReg0i = R126i.w;
|
||||
PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(0x3d000000)));
|
||||
PV0i.y = floatBitsToInt(max(intBitsToFloat(PV1i.w), -(intBitsToFloat(PV1i.w))));
|
||||
PV0i.z = floatBitsToInt(max(-(intBitsToFloat(PV1i.x)), intBitsToFloat(PV1i.x)));
|
||||
R126i.w = floatBitsToInt(-(intBitsToFloat(PV1i.x)));
|
||||
PV0i.w = R126i.w;
|
||||
R125i.w = floatBitsToInt(min(intBitsToFloat(backupReg0i), intBitsToFloat(R124i.x)));
|
||||
PS0i = R125i.w;
|
||||
// 7
|
||||
PV1i.x = floatBitsToInt(min(intBitsToFloat(PV0i.z), intBitsToFloat(PV0i.y)));
|
||||
R127i.y = floatBitsToInt(max(intBitsToFloat(R127i.z), intBitsToFloat(R127i.x)));
|
||||
PV1i.y = R127i.y;
|
||||
PV1i.w = floatBitsToInt(max(intBitsToFloat(PV0i.x), intBitsToFloat(0x3c000000)));
|
||||
PS1i = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.z), intBitsToFloat(0x3dea7371)));
|
||||
// 8
|
||||
R123i.x = floatBitsToInt((intBitsToFloat(R5i.y) * intBitsToFloat(0x3f162c23) + intBitsToFloat(PS1i)));
|
||||
PV0i.x = R123i.x;
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(PV1i.x));
|
||||
// 9
|
||||
R123i.z = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(0x3e990afe) + intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R123i.z;
|
||||
PS1i = floatBitsToInt(1.0 / intBitsToFloat(PV0i.w));
|
||||
// 10
|
||||
PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), intBitsToFloat(PS1i)));
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.w), intBitsToFloat(PS1i)));
|
||||
R2i.z = floatBitsToInt(min(intBitsToFloat(PV1i.z), intBitsToFloat(R125i.w)));
|
||||
PV0i.z = R2i.z;
|
||||
R1i.w = floatBitsToInt(max(intBitsToFloat(PV1i.z), intBitsToFloat(R127i.y)));
|
||||
PV0i.w = R1i.w;
|
||||
// 11
|
||||
PV1i.z = floatBitsToInt(max(intBitsToFloat(PV0i.x), intBitsToFloat(0xc1000000)));
|
||||
PV1i.w = floatBitsToInt(max(intBitsToFloat(PV0i.y), intBitsToFloat(0xc1000000)));
|
||||
// 12
|
||||
PV0i.y = floatBitsToInt(min(intBitsToFloat(PV1i.w), intBitsToFloat(0x41000000)));
|
||||
PV0i.w = floatBitsToInt(min(intBitsToFloat(PV1i.z), intBitsToFloat(0x41000000)));
|
||||
// 13
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(uf_remappedPS[0].x)));
|
||||
PV1i.z = R127i.z;
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(uf_remappedPS[0].y)));
|
||||
PV1i.w = R127i.w;
|
||||
// 14
|
||||
R5i.x = floatBitsToInt((intBitsToFloat(PV1i.z) * intBitsToFloat(0x3e2a9930) + intBitsToFloat(R0i.x)));
|
||||
PV0i.x = R5i.x;
|
||||
R5i.y = floatBitsToInt((intBitsToFloat(PV1i.w) * intBitsToFloat(0x3e2a9930) + intBitsToFloat(R0i.y)));
|
||||
PV0i.y = R5i.y;
|
||||
R5i.z = floatBitsToInt((intBitsToFloat(PV1i.z) * intBitsToFloat(0xbe2ab368) + intBitsToFloat(R0i.x)));
|
||||
PV0i.z = R5i.z;
|
||||
R5i.w = floatBitsToInt((intBitsToFloat(PV1i.w) * intBitsToFloat(0xbe2ab368) + intBitsToFloat(R0i.y)));
|
||||
PV0i.w = R5i.w;
|
||||
R4i.x = floatBitsToInt((intBitsToFloat(PV1i.z) * 0.5 + intBitsToFloat(R0i.x)));
|
||||
PS0i = R4i.x;
|
||||
// 15
|
||||
backupReg0i = R0i.x;
|
||||
R0i.x = floatBitsToInt((-(intBitsToFloat(R127i.z)) * 0.5 + intBitsToFloat(backupReg0i)));
|
||||
PV1i.x = R0i.x;
|
||||
R4i.y = floatBitsToInt((intBitsToFloat(R127i.w) * 0.5 + intBitsToFloat(R0i.y)));
|
||||
PV1i.y = R4i.y;
|
||||
R0i.z = floatBitsToInt((-(intBitsToFloat(R127i.w)) * 0.5 + intBitsToFloat(R0i.y)));
|
||||
PV1i.z = R0i.z;
|
||||
R3i.xyz = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R5i.xy),0.0).xyz);
|
||||
R5i.xyz = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R5i.zw),0.0).xyz);
|
||||
R4i.xyz = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R4i.xy),0.0).xyz);
|
||||
R0i.xyz = floatBitsToInt(textureLod(textureUnitPS0, intBitsToFloat(R0i.xz),0.0).xyz);
|
||||
// 0
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(R3i.z) + intBitsToFloat(R5i.z));
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||
PV0i.x = R127i.x;
|
||||
R126i.z = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(R5i.y));
|
||||
R126i.z = floatBitsToInt(intBitsToFloat(R126i.z) / 2.0);
|
||||
PV0i.z = R126i.z;
|
||||
R127i.w = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(R5i.x));
|
||||
R127i.w = floatBitsToInt(intBitsToFloat(R127i.w) / 2.0);
|
||||
PV0i.w = R127i.w;
|
||||
// 1
|
||||
backupReg0i = R0i.x;
|
||||
backupReg1i = R0i.y;
|
||||
PV1i.x = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(backupReg0i));
|
||||
PV1i.y = PV0i.w;
|
||||
PV1i.y = floatBitsToInt(intBitsToFloat(PV1i.y) / 2.0);
|
||||
R127i.z = floatBitsToInt(intBitsToFloat(R4i.z) + intBitsToFloat(R0i.z));
|
||||
PV1i.z = R127i.z;
|
||||
PV1i.w = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(backupReg1i));
|
||||
PS1i = PV0i.z;
|
||||
PS1i = floatBitsToInt(intBitsToFloat(PS1i) / 2.0);
|
||||
// 2
|
||||
R124i.x = floatBitsToInt((intBitsToFloat(PV1i.x) * intBitsToFloat(0x3e800000) + intBitsToFloat(PV1i.y)));
|
||||
PV0i.x = R124i.x;
|
||||
R127i.y = floatBitsToInt((intBitsToFloat(PV1i.w) * intBitsToFloat(0x3e800000) + intBitsToFloat(PS1i)));
|
||||
PV0i.y = R127i.y;
|
||||
PV0i.w = R127i.x;
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||
// 3
|
||||
backupReg0i = R127i.z;
|
||||
R127i.z = floatBitsToInt((intBitsToFloat(backupReg0i) * intBitsToFloat(0x3e800000) + intBitsToFloat(PV0i.w)));
|
||||
PV1i.z = R127i.z;
|
||||
// 4
|
||||
tempi.x = floatBitsToInt(intBitsToFloat(R124i.x) * intBitsToFloat(0x3e990afe) + intBitsToFloat(R127i.y) * intBitsToFloat(0x3f162c23) + intBitsToFloat(PV1i.z) * intBitsToFloat(0x3dea7371) + intBitsToFloat(0x80000000) * 0.0);
|
||||
PV0i.x = tempi.x;
|
||||
PV0i.y = tempi.x;
|
||||
PV0i.z = tempi.x;
|
||||
PV0i.w = tempi.x;
|
||||
// 5
|
||||
PV1i.x = ((intBitsToFloat(PV0i.x) > intBitsToFloat(R1i.w))?int(0xFFFFFFFF):int(0x0));
|
||||
PV1i.y = ((intBitsToFloat(R2i.z) > intBitsToFloat(PV0i.x))?int(0xFFFFFFFF):int(0x0));
|
||||
// 6
|
||||
R123i.w = ((PV1i.y == 0)?(PV1i.x):(int(-1)));
|
||||
PV0i.w = R123i.w;
|
||||
// 7
|
||||
R123i.x = ((PV0i.w == 0)?(0):(R126i.z));
|
||||
PV1i.x = R123i.x;
|
||||
R123i.y = ((PV0i.w == 0)?(0):(R127i.w));
|
||||
PV1i.y = R123i.y;
|
||||
R123i.z = ((PV0i.w == 0)?(0):(0x3f800000));
|
||||
PV1i.z = R123i.z;
|
||||
R123i.w = ((PV0i.w == 0)?(0):(R127i.x));
|
||||
PV1i.w = R123i.w;
|
||||
// 8
|
||||
R0i.x = ((PV1i.z == 0)?(R124i.x):(PV1i.y));
|
||||
PV0i.x = R0i.x;
|
||||
R0i.y = ((PV1i.z == 0)?(R127i.y):(PV1i.x));
|
||||
PV0i.y = R0i.y;
|
||||
R0i.z = ((PV1i.z == 0)?(R127i.z):(PV1i.w));
|
||||
PV0i.z = R0i.z;
|
||||
// 9
|
||||
R0i.w = 0x3f800000;
|
||||
PV1i.w = R0i.w;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w));
|
||||
}
|
Loading…
Reference in New Issue
Block a user