cemu_graphic_packs/Source/XenobladeX/9ae7833e513d2c25_0000000000000079_ps.txt

61 lines
2.0 KiB
Plaintext
Raw Normal View History

#version 420
#extension GL_ARB_texture_gather : enable
// shader 9ae7833e513d2c25 // bloom sampling scale
const float resScale = ($height/$gameHeight);
uniform ivec4 uf_remappedPS[1];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4f4c800 res 80x46x1 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
layout(location = 0) in vec4 passParameterSem0;
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);
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;
R0f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
// 0
backupReg0f = R0f.y;
backupReg1f = R0f.z;
PV0f.y = backupReg0f + -(intBitsToFloat(uf_remappedPS[0].x)/ resScale);
PV0f.z = R0f.x + -(intBitsToFloat(uf_remappedPS[0].x)/ resScale);
PV0f.w = backupReg1f + -(intBitsToFloat(uf_remappedPS[0].x)/ resScale);
R1f.w = 1.0;
PS0f = R1f.w;
// 1
PV1f.x = max(PV0f.z, 0.0);
PV1f.y = max(PV0f.y, 0.0);
PV1f.z = max(PV0f.w, 0.0);
// 2
tempf.x = dot(vec4(intBitsToFloat(uf_remappedPS[0].y)/resScale,intBitsToFloat(uf_remappedPS[0].y) / resScale,intBitsToFloat(uf_remappedPS[0].y) / resScale,-0.0),vec4(PV1f.x,PV1f.y,PV1f.z,0.0));
PV0f.x = tempf.x;
PV0f.y = tempf.x;
PV0f.z = tempf.x;
PV0f.w = tempf.x;
// 3
R1f.x = R0f.x * PV0f.x;
R1f.y = R0f.y * PV0f.x;
R1f.z = R0f.z * PV0f.x;
// export
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
}