mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-12-25 17:31:51 +01:00
94 lines
4.1 KiB
Plaintext
94 lines
4.1 KiB
Plaintext
|
#version 420
|
||
|
#extension GL_ARB_texture_gather : enable
|
||
|
// shader cb83a22cf0961e1a
|
||
|
// Used for: Zoom Text
|
||
|
uniform ivec4 uf_remappedPS[4];
|
||
|
layout(binding = 0) uniform sampler2DArray textureUnitPS0;// Tex0 addr 0x20340000 res 1024x1024x1 dim 5 tm: 4 format 0001 compSel: 5 5 5 0 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0
|
||
|
layout(location = 0) in vec4 passParameterSem0;
|
||
|
layout(location = 1) in vec4 passParameterSem1;
|
||
|
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){ 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 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(passParameterSem0);
|
||
|
R1i = floatBitsToInt(passParameterSem1);
|
||
|
// 0
|
||
|
backupReg0i = R1i.z;
|
||
|
R2i.x = ((intBitsToFloat(R0i.w) > 0.0)?int(0xFFFFFFFF):int(0x0));
|
||
|
R1i.z = floatBitsToInt(roundEven(intBitsToFloat(backupReg0i)));
|
||
|
R1i.w = floatBitsToInt(texture(textureUnitPS0, vec3(intBitsToFloat(R1i.x),intBitsToFloat(R1i.y),intBitsToFloat(R1i.z))).w);
|
||
|
// 0
|
||
|
PV0i.x = R1i.w;
|
||
|
PV0i.x = floatBitsToInt(intBitsToFloat(PV0i.x) * 2.0);
|
||
|
PV0i.y = ((intBitsToFloat(0x3f0a3d71) > intBitsToFloat(R1i.w))?int(0xFFFFFFFF):int(0x0));
|
||
|
PV0i.w = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) * 2.0);
|
||
|
// 1
|
||
|
R127i.y = ((PV0i.y == 0)?(0x3f800000):(PV0i.x));
|
||
|
R127i.z = ((PV0i.y == 0)?(PV0i.w):(0));
|
||
|
PV1i.z = R127i.z;
|
||
|
// 2
|
||
|
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.z),intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[1].y)));
|
||
|
PV0i.z = R123i.z;
|
||
|
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.z),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||
|
PV0i.w = R123i.w;
|
||
|
// 3
|
||
|
backupReg0i = R0i.x;
|
||
|
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), intBitsToFloat(uf_remappedPS[0].w)));
|
||
|
R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(uf_remappedPS[0].z)) + intBitsToFloat(uf_remappedPS[1].z)));
|
||
|
PV1i.y = R123i.y;
|
||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(PV0i.w)));
|
||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.y), intBitsToFloat(PV0i.z)));
|
||
|
// 4
|
||
|
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.z), intBitsToFloat(PV1i.y)));
|
||
|
R126i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.w), intBitsToFloat(PV1i.x)));
|
||
|
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(uf_remappedPS[2].y)) + intBitsToFloat(uf_remappedPS[3].y)));
|
||
|
PV0i.z = R123i.z;
|
||
|
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(uf_remappedPS[2].x)) + intBitsToFloat(uf_remappedPS[3].x)));
|
||
|
PV0i.w = R123i.w;
|
||
|
// 5
|
||
|
backupReg0i = R0i.x;
|
||
|
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), intBitsToFloat(uf_remappedPS[2].w)));
|
||
|
R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(uf_remappedPS[2].z)) + intBitsToFloat(uf_remappedPS[3].z)));
|
||
|
PV1i.y = R123i.y;
|
||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(PV0i.w)));
|
||
|
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.y), intBitsToFloat(PV0i.z)));
|
||
|
// 6
|
||
|
backupReg0i = R0i.z;
|
||
|
PV0i.x = floatBitsToInt(mul_nonIEEE(-(intBitsToFloat(R0i.w)), intBitsToFloat(PV1i.x)));
|
||
|
R0i.y = ((R2i.x == 0)?(PV1i.w):(R127i.w));
|
||
|
PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(PV1i.y)));
|
||
|
R0i.x = ((R2i.x == 0)?(PV1i.z):(R126i.z));
|
||
|
PS0i = R0i.x;
|
||
|
// 7
|
||
|
R0i.z = ((R2i.x == 0)?(PV0i.z):(R127i.x));
|
||
|
R0i.w = ((R2i.x == 0)?(PV0i.x):(R126i.y));
|
||
|
// export
|
||
|
passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), 0.0);
|
||
|
}
|