cemu_graphic_packs/Quality/BreathOfTheWild_2160p/cb0e6e8cbec4502a_0000000000000079_ps.txt

69 lines
2.1 KiB
Plaintext
Raw Normal View History

#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5c7b800 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: 1
layout(location = 0) in vec4 passParameterSem3;
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()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
vec4 R2f = vec4(0.0);
vec4 R3f = vec4(0.0);
vec4 R123f = 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 = passParameterSem3;
const float offset = 0.95;
R0f.z = (R0f.z + 0.00052083333333333 * offset); // horizontal move
R0f.y = (R0f.y - 0.00092592592592593 * offset); // vertical move
R0f.x = (R0f.x - 0.00052083333333333 * offset); // second horizontal move
R0f.w = (R0f.w + 0.00092592592592593 * offset); // second vertical move
R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
R2f.xyz = (texture(textureUnitPS0, R0f.zy).xyz);
R3f.xyz = (texture(textureUnitPS0, R0f.xw).xyz);
R0f.xyz = (texture(textureUnitPS0, R0f.zw).xyz);
// 0
PV0f.x = R1f.x + R2f.x;
PV0f.x /= 2.0;
PV0f.z = R1f.z + R2f.z;
PV0f.z /= 2.0;
PV0f.w = R1f.y + R2f.y;
PV0f.w /= 2.0;
R1f.w = 0.0;
PS0f = R1f.w;
// 1
R123f.x = (R3f.y * 0.5 + PV0f.w);
PV1f.x = R123f.x;
R123f.y = (R3f.x * 0.5 + PV0f.x);
PV1f.y = R123f.y;
R123f.w = (R3f.z * 0.5 + PV0f.z);
PV1f.w = R123f.w;
// 2
R1f.x = (R0f.x * 0.5 + PV1f.y)/2.0;
R1f.y = (R0f.y * 0.5 + PV1f.x)/2.0;
R1f.z = (R0f.z * 0.5 + PV1f.w)/2.0;
// export
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
}