cemu_graphic_packs/Resolutions/Bayonetta2_Resolution/284b1bf9010d4e57_0000000000000079_ps.txt

146 lines
5.7 KiB
Plaintext
Raw Normal View History

#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader 284b1bf9010d4e57
// start of shader inputs/outputs, predetermined by Cemu. Do not touch
#ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation)
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
#else
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
#endif
#ifdef VULKAN
layout(set = 1, binding = 1) uniform ufBlock
{
uniform vec4 uf_fragCoordScale;
};
#else
uniform vec2 uf_fragCoordScale;
#endif
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
layout(location = 0) in vec4 passParameterSem133;
layout(location = 0) out vec4 passPixelColor0;
// end of shader inputs/outputs
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);
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;
bool activeMaskStack[2];
bool activeMaskStackC[3];
activeMaskStack[0] = false;
activeMaskStackC[0] = false;
activeMaskStackC[1] = false;
activeMaskStack[0] = true;
activeMaskStackC[0] = true;
activeMaskStackC[1] = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0i = floatBitsToInt(passParameterSem133);
if( activeMaskStackC[1] == true ) {
// 0
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(0xba4ccccd));
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + 0.0);
R0i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(0x3a4ccccd));
R0i.w = floatBitsToInt(intBitsToFloat(R0i.y) + 0.0);
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + 0.0);
PS0i = R2i.x;
// 1
R3i.x = floatBitsToInt(intBitsToFloat(R0i.x) + 0.0);
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(0xbab60b61));
R3i.zwy = floatBitsToInt(vec3(intBitsToFloat(R0i.y),intBitsToFloat(R0i.x),intBitsToFloat(R0i.y)) + vec3(intBitsToFloat(0x3ab60b61),0.0,0.0));
PS1i = R3i.y;
}
if( activeMaskStackC[1] == true ) {
R1i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.xy)).xyz);
R0i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.zw)).xyz);
R2i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R2i.xy)).xyz);
R4i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R3i.xz)).xyz);
R3i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R3i.wy)).xyz);
}
if( activeMaskStackC[1] == true ) {
activeMaskStack[1] = activeMaskStack[0];
activeMaskStackC[2] = activeMaskStackC[1];
// 0
backupReg0i = R0i.x;
backupReg1i = R0i.z;
PV0i.x = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(R0i.y));
PV0i.y = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(backupReg0i));
PV0i.z = floatBitsToInt(intBitsToFloat(R1i.z) + intBitsToFloat(backupReg1i));
// 1
PV1i.x = floatBitsToInt(intBitsToFloat(R2i.z) + intBitsToFloat(PV0i.z));
PV1i.y = floatBitsToInt(intBitsToFloat(R2i.y) + intBitsToFloat(PV0i.x));
PV1i.w = floatBitsToInt(intBitsToFloat(R2i.x) + intBitsToFloat(PV0i.y));
// 2
PV0i.y = floatBitsToInt(intBitsToFloat(R4i.z) + intBitsToFloat(PV1i.x));
PV0i.z = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(PV1i.w));
PV0i.w = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(PV1i.y));
// 3
R123i.x = floatBitsToInt((-(intBitsToFloat(R3i.x)) * 4.0 + intBitsToFloat(PV0i.z)));
PV1i.x = R123i.x;
R123i.z = floatBitsToInt((-(intBitsToFloat(R3i.y)) * 4.0 + intBitsToFloat(PV0i.w)));
PV1i.z = R123i.z;
R123i.w = floatBitsToInt((-(intBitsToFloat(R3i.z)) * 4.0 + intBitsToFloat(PV0i.y)));
PV1i.w = R123i.w;
// 4
PV0i.x = floatBitsToInt(max(intBitsToFloat(PV1i.x), -(intBitsToFloat(PV1i.x))));
PV0i.x = floatBitsToInt(intBitsToFloat(PV0i.x) * 4.0);
PV0i.y = floatBitsToInt(max(intBitsToFloat(PV1i.z), -(intBitsToFloat(PV1i.z))));
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) * 4.0);
PV0i.z = floatBitsToInt(max(intBitsToFloat(PV1i.w), -(intBitsToFloat(PV1i.w))));
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) * 4.0);
// 5
R0i.x = floatBitsToInt(dot(vec4(intBitsToFloat(PV0i.x),intBitsToFloat(PV0i.y),intBitsToFloat(PV0i.z),-0.0),vec4(intBitsToFloat(0x3eaa7efa),intBitsToFloat(0x3eab020c),intBitsToFloat(0x3eaa7efa),0.0)));
PV1i.x = R0i.x;
PV1i.y = R0i.x;
PV1i.z = R0i.x;
PV1i.w = R0i.x;
// 6
R0i.y = floatBitsToInt(intBitsToFloat(PV1i.x) + -(0.5));
// 7
predResult = (0.0 > intBitsToFloat(R0i.y));
activeMaskStack[1] = predResult;
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
}
else {
activeMaskStack[1] = false;
activeMaskStackC[2] = false;
}
if( activeMaskStackC[2] == true ) {
// 0
if( (0 == 0)) discard;
}
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
if( activeMaskStackC[1] == true ) {
// 0
R3i.w = R0i.x;
}
// export
passPixelColor0 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
}