mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-22 17:49:17 +01:00
0e035ae902
Breaks many menu's but it's good enough for HUD-less recording I suppose.
109 lines
4.5 KiB
Plaintext
109 lines
4.5 KiB
Plaintext
#version 420
|
|
#extension GL_ARB_texture_gather : enable
|
|
#extension GL_ARB_separate_shader_objects : enable
|
|
#ifdef VULKAN
|
|
#else
|
|
#endif
|
|
// shader 50612bab4e50d820
|
|
// Used for: Removing the item icon from the HUD
|
|
|
|
uniform ivec4 uf_remappedPS[5];
|
|
uniform vec2 uf_fragCoordScale;
|
|
layout(binding = 0) uniform sampler2D textureUnitPS0;
|
|
layout(binding = 1) uniform sampler2D textureUnitPS1;
|
|
layout(binding = 2) uniform sampler2D textureUnitPS2;
|
|
layout(location = 0) in vec4 passParameterSem2;
|
|
layout(location = 1) in vec4 passParameterSem1;
|
|
layout(location = 2) in vec4 passParameterSem0;
|
|
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 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;
|
|
vec3 cubeMapSTM;
|
|
int cubeMapFaceId;
|
|
R0i = floatBitsToInt(passParameterSem2);
|
|
R1i = floatBitsToInt(passParameterSem1);
|
|
R2i = floatBitsToInt(passParameterSem0);
|
|
R0i.xyzw = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).xyzw);
|
|
R3i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R2i.xy)).xyzw);
|
|
// 0
|
|
R4i.x = uf_remappedPS[0].x & 0x00000080;
|
|
R127i.w = 0x3f800000;
|
|
PV0i.w = R127i.w;
|
|
// 1
|
|
backupReg0i = R0i.x;
|
|
backupReg1i = R0i.y;
|
|
backupReg2i = R0i.z;
|
|
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(backupReg0i),intBitsToFloat(backupReg1i),intBitsToFloat(backupReg2i),intBitsToFloat(PV0i.w)),vec4(intBitsToFloat(uf_remappedPS[1].x),intBitsToFloat(uf_remappedPS[1].y),intBitsToFloat(uf_remappedPS[1].z),intBitsToFloat(uf_remappedPS[1].w))));
|
|
PV1i.x = tempi.x;
|
|
PV1i.y = tempi.x;
|
|
PV1i.z = tempi.x;
|
|
PV1i.w = tempi.x;
|
|
// 2
|
|
backupReg0i = R0i.x;
|
|
backupReg1i = R0i.y;
|
|
backupReg2i = R0i.z;
|
|
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(backupReg0i),intBitsToFloat(backupReg1i),intBitsToFloat(backupReg2i),intBitsToFloat(R127i.w)),vec4(intBitsToFloat(uf_remappedPS[2].x),intBitsToFloat(uf_remappedPS[2].y),intBitsToFloat(uf_remappedPS[2].z),intBitsToFloat(uf_remappedPS[2].w))));
|
|
PV0i.x = tempi.x;
|
|
PV0i.y = tempi.x;
|
|
PV0i.z = tempi.x;
|
|
PV0i.w = tempi.x;
|
|
R2i.x = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(PV1i.x));
|
|
PS0i = R2i.x;
|
|
// 3
|
|
R2i.y = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(PV0i.x));
|
|
R2i.xyzw = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R2i.xy)).xyzw);
|
|
// 0
|
|
R127i.z = floatBitsToInt(min(intBitsToFloat(R0i.w), intBitsToFloat(R2i.w)));
|
|
PV0i.z = R127i.z;
|
|
// 1
|
|
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.x), intBitsToFloat(PV0i.z)));
|
|
PV1i.y = floatBitsToInt(-(intBitsToFloat(PV0i.z)) + 1.0);
|
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), intBitsToFloat(PV0i.z)));
|
|
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), intBitsToFloat(PV0i.z)));
|
|
R126i.z = floatBitsToInt(max(intBitsToFloat(PV0i.z), intBitsToFloat(R3i.w)));
|
|
PS1i = R126i.z;
|
|
// 2
|
|
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R3i.x),intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.x)));
|
|
PV0i.x = R123i.x;
|
|
PV0i.y = floatBitsToInt(min(intBitsToFloat(R127i.z), intBitsToFloat(R3i.w)));
|
|
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R3i.y),intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.w)));
|
|
PV0i.z = R123i.z;
|
|
R127i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R3i.z),intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.z)));
|
|
// 3
|
|
R123i.x = ((R4i.x == 0)?(R126i.z):(PV0i.y));
|
|
PV1i.x = R123i.x;
|
|
R4i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.z),intBitsToFloat(uf_remappedPS[3].y)) + intBitsToFloat(uf_remappedPS[4].y)));
|
|
R4i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),intBitsToFloat(uf_remappedPS[3].x)) + intBitsToFloat(uf_remappedPS[4].x)));
|
|
PS1i = R4i.x;
|
|
// 4
|
|
R4i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.w),intBitsToFloat(uf_remappedPS[3].z)) + intBitsToFloat(uf_remappedPS[4].z)));
|
|
R4i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.x),intBitsToFloat(uf_remappedPS[3].w)) + intBitsToFloat(uf_remappedPS[4].w)));
|
|
// export
|
|
passPixelColor0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), 0.0);
|
|
}
|