mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-12-18 14:11:48 +01:00
f3d35c75dc
Didn't update the docs (will do that tomorrow), but I manually checked (didn't verify things, but I basically checked if it contained "uf_windowSpaceToClipSpaceTransform" and if the shader was made after a certain Cemu change was made due to how they're left out) to see if any graphic pack in here was *probably* safe. I also didn't convert 5 graphic packs since they contained signs that needed to be manually checked or at least examined more: - \Enhancements\TwilightPrincessHD_Bicubic - \Resolutions\DevilsThird_Resolution - \Resolutions\TwilightPrincessHD_Resolution (this one just needs to be fully verified since it's popular enough and has like 27 shaders) - \Resolutions\LegoStarWars_Resolution - \Resolutions\TokyoMirage_Resolution (this one could also be manually verified) I hope I didn't make too many mistakes with this one.
547 lines
17 KiB
Plaintext
547 lines
17 KiB
Plaintext
#version 420
|
|
#extension GL_ARB_texture_gather : enable
|
|
#extension GL_ARB_separate_shader_objects : enable
|
|
#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 SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0
|
|
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
|
|
#define gl_VertexID gl_VertexIndex
|
|
#define gl_InstanceID gl_InstanceIndex
|
|
#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 SET_POSITION(_v) gl_Position = _v
|
|
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
|
|
#endif
|
|
// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL.
|
|
|
|
// shader 9d1d7119cc2a1bc5
|
|
//film simulation blur
|
|
const float resScale = float($height)/float($gameHeight);
|
|
#ifdef VULKAN
|
|
layout(set = 1, binding = 2) uniform ufBlock
|
|
{
|
|
uniform ivec4 uf_remappedPS[3];
|
|
uniform vec4 uf_fragCoordScale;
|
|
};
|
|
#else
|
|
uniform ivec4 uf_remappedPS[3];
|
|
uniform vec2 uf_fragCoordScale;
|
|
#endif
|
|
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
|
|
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
|
|
layout(location = 0) in vec4 passParameterSem128;
|
|
layout(location = 0) out vec4 passPixelColor0;
|
|
// uf_fragCoordScale was moved to the ufBlock
|
|
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 R4f = vec4(0.0);
|
|
vec4 R5f = vec4(0.0);
|
|
vec4 R6f = vec4(0.0);
|
|
vec4 R7f = vec4(0.0);
|
|
vec4 R8f = vec4(0.0);
|
|
vec4 R9f = vec4(0.0);
|
|
vec4 R10f = vec4(0.0);
|
|
vec4 R11f = vec4(0.0);
|
|
vec4 R12f = vec4(0.0);
|
|
vec4 R13f = vec4(0.0);
|
|
vec4 R14f = vec4(0.0);
|
|
vec4 R15f = vec4(0.0);
|
|
vec4 R16f = vec4(0.0);
|
|
vec4 R123f = vec4(0.0);
|
|
vec4 R127f = 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 = passParameterSem128;
|
|
R9f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
|
|
R13f.x = (texture(textureUnitPS1, R0f.xy).x);
|
|
// 0
|
|
backupReg0f = R0f.z;
|
|
R5f.x = intBitsToFloat(0xbab60b61)/ resScale * intBitsToFloat(uf_remappedPS[0].x);
|
|
R5f.y = intBitsToFloat(0x3b19999a) / resScale * intBitsToFloat(uf_remappedPS[0].x);
|
|
PV0f.z = -(1.0) + backupReg0f;
|
|
R1f.w = intBitsToFloat(0xbb19999a) / resScale * intBitsToFloat(uf_remappedPS[0].x);
|
|
R6f.y = intBitsToFloat(0x3ab60b61) / resScale * intBitsToFloat(uf_remappedPS[0].x);
|
|
PS0f = R6f.y;
|
|
// 1
|
|
R10f.x = intBitsToFloat(0xbb888889) / resScale * intBitsToFloat(uf_remappedPS[0].x);
|
|
R13f.y = 1.0 + PV0f.z;
|
|
R5f.z = intBitsToFloat(0x3a4ccccd) / resScale * intBitsToFloat(uf_remappedPS[0].x);
|
|
R3f.w = intBitsToFloat(0xba4ccccd) / resScale * intBitsToFloat(uf_remappedPS[0].x);
|
|
R11f.y = intBitsToFloat(0x3b888889) / resScale* intBitsToFloat(uf_remappedPS[0].x);
|
|
PS1f = R11f.y;
|
|
// 2
|
|
R12f.x = intBitsToFloat(0x3b19999a) / resScale * intBitsToFloat(uf_remappedPS[0].x);
|
|
R12f.y = intBitsToFloat(0x3b888889) / resScale * intBitsToFloat(uf_remappedPS[0].x);
|
|
R6f.z = intBitsToFloat(0xbb888889) / resScale * intBitsToFloat(uf_remappedPS[0].x);
|
|
R4f.w = intBitsToFloat(0xbb19999a) / resScale * intBitsToFloat(uf_remappedPS[0].x);
|
|
PS0f = -(intBitsToFloat(uf_remappedPS[1].x)) + intBitsToFloat(uf_remappedPS[1].y);
|
|
// 3
|
|
R1f.x = R0f.x + intBitsToFloat(0xba4ccccd) / resScale;
|
|
R1f.y = R0f.y + intBitsToFloat(0xbab60b61) / resScale;
|
|
R2f.z = R0f.x + intBitsToFloat(0xba4ccccd) / resScale;
|
|
PV1f.w = -(intBitsToFloat(uf_remappedPS[1].z)) + intBitsToFloat(uf_remappedPS[1].w);
|
|
R15f.y = 1.0 / PS0f;
|
|
PS1f = R15f.y;
|
|
// 4
|
|
R6f.x = R0f.x + intBitsToFloat(0x3a4ccccd) / resScale;
|
|
R2f.y = R0f.y + intBitsToFloat(0x3ab60b61) / resScale;
|
|
R8f.z = mul_nonIEEE(PS1f, intBitsToFloat(uf_remappedPS[1].x));
|
|
R6f.w = R0f.y + intBitsToFloat(0xbab60b61) / resScale;
|
|
R16f.y = 1.0 / PV1f.w;
|
|
PS0f = R16f.y;
|
|
R4f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
|
|
R1f.x = (texture(textureUnitPS1, R1f.xy).x);
|
|
R3f.xyz = (texture(textureUnitPS0, R2f.zy).xyz);
|
|
R2f.x = (texture(textureUnitPS1, R2f.zy).x);
|
|
// 0
|
|
backupReg0f = R0f.y;
|
|
R127f.x = R2f.x + R13f.y;
|
|
PV0f.y = R1f.x + R13f.y;
|
|
R2f.z = mul_nonIEEE(R16f.y, intBitsToFloat(uf_remappedPS[1].z));
|
|
R2f.w = R0f.x + intBitsToFloat(0x3a4ccccd) / resScale;
|
|
R2f.y = backupReg0f + intBitsToFloat(0x3ab60b61) / resScale;
|
|
PS0f = R2f.y;
|
|
// 1
|
|
R8f.x = R0f.x + R1f.w;
|
|
R8f.y = R0f.y + R5f.x;
|
|
PS1f = 1.0 / PV0f.y;
|
|
// 2
|
|
PV0f.x = mul_nonIEEE(R0f.w, PS1f);
|
|
PS0f = 1.0 / R127f.x;
|
|
// 3
|
|
R123f.x = (mul_nonIEEE(PV0f.x,R15f.y) + -(R8f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV1f.x = R123f.x;
|
|
PV1f.y = mul_nonIEEE(R0f.w, PS0f);
|
|
R123f.w = (mul_nonIEEE(PV0f.x,R16f.y) + -(R2f.z));
|
|
R123f.w = clamp(R123f.w, 0.0, 1.0);
|
|
PV1f.w = R123f.w;
|
|
// 4
|
|
R123f.x = (mul_nonIEEE(R15f.y,PV1f.y) + -(R8f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV0f.x = R123f.x;
|
|
R123f.z = (mul_nonIEEE(R16f.y,PV1f.y) + -(R2f.z));
|
|
R123f.z = clamp(R123f.z, 0.0, 1.0);
|
|
PV0f.z = R123f.z;
|
|
R127f.w = max(PV1f.x, PV1f.w);
|
|
R1f.x = R0f.x + R1f.w;
|
|
PS0f = R1f.x;
|
|
// 5
|
|
backupReg0f = R0f.y;
|
|
PV1f.y = max(PV0f.x, PV0f.z);
|
|
R1f.z = backupReg0f + R6f.y;
|
|
// 6
|
|
PV0f.x = mul_nonIEEE(R3f.x, PV1f.y);
|
|
R1f.y = R127f.w + PV1f.y;
|
|
PV0f.z = mul_nonIEEE(R3f.z, PV1f.y);
|
|
PV0f.w = mul_nonIEEE(R3f.y, PV1f.y);
|
|
// 7
|
|
backupReg0f = R5f.x;
|
|
R5f.x = (mul_nonIEEE(R4f.y,R127f.w) + PV0f.w);
|
|
R4f.y = (mul_nonIEEE(R4f.x,R127f.w) + PV0f.x);
|
|
R10f.z = R0f.x + R5f.y;
|
|
R1f.w = (mul_nonIEEE(R4f.z,R127f.w) + PV0f.z);
|
|
R10f.y = R0f.y + backupReg0f;
|
|
PS1f = R10f.y;
|
|
R3f.xyz = (texture(textureUnitPS0, R6f.xw).xyz);
|
|
R6f.x = (texture(textureUnitPS1, R6f.xw).x);
|
|
R7f.xyz = (texture(textureUnitPS0, R2f.wy).xyz);
|
|
R4f.x = (texture(textureUnitPS1, R2f.wy).x);
|
|
// 0
|
|
R127f.y = R4f.x + R13f.y;
|
|
PV0f.w = R6f.x + R13f.y;
|
|
// 1
|
|
PS1f = 1.0 / PV0f.w;
|
|
// 2
|
|
PV0f.z = mul_nonIEEE(R0f.w, PS1f);
|
|
PS0f = 1.0 / R127f.y;
|
|
// 3
|
|
R123f.x = (mul_nonIEEE(R15f.y,PV0f.z) + -(R8f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV1f.x = R123f.x;
|
|
PV1f.y = mul_nonIEEE(R0f.w, PS0f);
|
|
R123f.w = (mul_nonIEEE(R16f.y,PV0f.z) + -(R2f.z));
|
|
R123f.w = clamp(R123f.w, 0.0, 1.0);
|
|
PV1f.w = R123f.w;
|
|
// 4
|
|
R123f.x = (mul_nonIEEE(R16f.y,PV1f.y) + -(R2f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV0f.x = R123f.x;
|
|
PV0f.y = max(PV1f.x, PV1f.w);
|
|
R123f.z = (mul_nonIEEE(R15f.y,PV1f.y) + -(R8f.z));
|
|
R123f.z = clamp(R123f.z, 0.0, 1.0);
|
|
PV0f.z = R123f.z;
|
|
R5f.w = R0f.x + R5f.y;
|
|
// 5
|
|
R123f.x = (mul_nonIEEE(R3f.z,PV0f.y) + R1f.w);
|
|
PV1f.x = R123f.x;
|
|
PV1f.y = max(PV0f.z, PV0f.x);
|
|
R123f.z = (mul_nonIEEE(R3f.x,PV0f.y) + R4f.y);
|
|
PV1f.z = R123f.z;
|
|
R123f.w = (mul_nonIEEE(R3f.y,PV0f.y) + R5f.x);
|
|
PV1f.w = R123f.w;
|
|
PS1f = R1f.y + PV0f.y;
|
|
// 6
|
|
backupReg0f = R6f.y;
|
|
R2f.x = PS1f + PV1f.y;
|
|
R6f.y = (mul_nonIEEE(R7f.z,PV1f.y) + PV1f.x);
|
|
R7f.z = (mul_nonIEEE(R7f.y,PV1f.y) + PV1f.w);
|
|
R1f.w = (mul_nonIEEE(R7f.x,PV1f.y) + PV1f.z);
|
|
R5f.y = R0f.y + backupReg0f;
|
|
PS0f = R5f.y;
|
|
R4f.xyz = (texture(textureUnitPS0, R8f.xy).xyz);
|
|
R8f.x = (texture(textureUnitPS1, R8f.xy).x);
|
|
R3f.xyz = (texture(textureUnitPS0, R1f.xz).xyz);
|
|
R1f.x = (texture(textureUnitPS1, R1f.xz).x);
|
|
// 0
|
|
R7f.x = R9f.y + R7f.z;
|
|
R7f.y = R9f.x + R1f.w;
|
|
PV0f.z = R8f.x + R13f.y;
|
|
R2f.w = R9f.z + R6f.y;
|
|
R127f.w = R13f.y + R1f.x;
|
|
PS0f = R127f.w;
|
|
// 1
|
|
R6f.x = R0f.x + R3f.w;
|
|
R6f.y = R0f.y + R10f.x;
|
|
PS1f = 1.0 / PV0f.z;
|
|
// 2
|
|
backupReg0f = R0f.w;
|
|
PV0f.w = mul_nonIEEE(backupReg0f, PS1f);
|
|
PS0f = 1.0 / R127f.w;
|
|
// 3
|
|
backupReg0f = R0f.x;
|
|
PV1f.x = mul_nonIEEE(R0f.w, PS0f);
|
|
R123f.y = (mul_nonIEEE(R15f.y,PV0f.w) + -(R8f.z));
|
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
|
PV1f.y = R123f.y;
|
|
R123f.z = (mul_nonIEEE(R16f.y,PV0f.w) + -(R2f.z));
|
|
R123f.z = clamp(R123f.z, 0.0, 1.0);
|
|
PV1f.z = R123f.z;
|
|
R9f.w = backupReg0f + R3f.w;
|
|
// 4
|
|
R123f.x = (mul_nonIEEE(R15f.y,PV1f.x) + -(R8f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV0f.x = R123f.x;
|
|
R123f.y = (mul_nonIEEE(R16f.y,PV1f.x) + -(R2f.z));
|
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
|
PV0f.y = R123f.y;
|
|
R127f.w = max(PV1f.y, PV1f.z);
|
|
// 5
|
|
R9f.y = R0f.y + R11f.y;
|
|
PV1f.z = max(PV0f.x, PV0f.y);
|
|
// 6
|
|
backupReg0f = R0f.x;
|
|
PV0f.x = mul_nonIEEE(R3f.y, PV1f.z);
|
|
PV0f.y = mul_nonIEEE(R3f.x, PV1f.z);
|
|
R7f.z = R127f.w + PV1f.z;
|
|
PV0f.w = mul_nonIEEE(R3f.z, PV1f.z);
|
|
R8f.x = backupReg0f + R5f.z;
|
|
PS0f = R8f.x;
|
|
// 7
|
|
backupReg0f = R4f.y;
|
|
backupReg1f = R4f.z;
|
|
R4f.y = (mul_nonIEEE(backupReg0f,R127f.w) + PV0f.x);
|
|
R4f.z = (mul_nonIEEE(R4f.x,R127f.w) + PV0f.y);
|
|
R3f.w = (mul_nonIEEE(backupReg1f,R127f.w) + PV0f.w);
|
|
R8f.y = R0f.y + R10f.x;
|
|
PS1f = R8f.y;
|
|
R3f.xyz = (texture(textureUnitPS0, R10f.zy).xyz);
|
|
R4f.x = (texture(textureUnitPS1, R10f.zy).x);
|
|
R1f.xyz = (texture(textureUnitPS0, R5f.wy).xyz);
|
|
R10f.x = (texture(textureUnitPS1, R5f.wy).x);
|
|
// 0
|
|
PV0f.x = R4f.x + R13f.y;
|
|
R127f.z = R10f.x + R13f.y;
|
|
// 1
|
|
PS1f = 1.0 / PV0f.x;
|
|
// 2
|
|
PV0f.y = mul_nonIEEE(R0f.w, PS1f);
|
|
PS0f = 1.0 / R127f.z;
|
|
// 3
|
|
R123f.x = (mul_nonIEEE(R16f.y,PV0f.y) + -(R2f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV1f.x = R123f.x;
|
|
PV1f.y = mul_nonIEEE(R0f.w, PS0f);
|
|
R123f.z = (mul_nonIEEE(R15f.y,PV0f.y) + -(R8f.z));
|
|
R123f.z = clamp(R123f.z, 0.0, 1.0);
|
|
PV1f.z = R123f.z;
|
|
R5f.w = R0f.x + R5f.z;
|
|
// 4
|
|
R123f.x = (mul_nonIEEE(R15f.y,PV1f.y) + -(R8f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV0f.x = R123f.x;
|
|
R123f.z = (mul_nonIEEE(R16f.y,PV1f.y) + -(R2f.z));
|
|
R123f.z = clamp(R123f.z, 0.0, 1.0);
|
|
PV0f.z = R123f.z;
|
|
PV0f.w = max(PV1f.z, PV1f.x);
|
|
// 5
|
|
R5f.x = max(PV0f.x, PV0f.z);
|
|
PV1f.x = R5f.x;
|
|
R123f.y = (mul_nonIEEE(R3f.x,PV0f.w) + R4f.z);
|
|
PV1f.y = R123f.y;
|
|
R123f.z = (mul_nonIEEE(R3f.y,PV0f.w) + R4f.y);
|
|
PV1f.z = R123f.z;
|
|
R123f.w = (mul_nonIEEE(R3f.z,PV0f.w) + R3f.w);
|
|
PV1f.w = R123f.w;
|
|
R1f.w = R7f.z + PV0f.w;
|
|
PS1f = R1f.w;
|
|
// 6
|
|
backupReg0f = R1f.z;
|
|
R3f.x = (mul_nonIEEE(R1f.x,PV1f.x) + PV1f.y);
|
|
R5f.y = R0f.y + R11f.y;
|
|
R1f.z = (mul_nonIEEE(backupReg0f,PV1f.x) + PV1f.w);
|
|
R3f.w = (mul_nonIEEE(R1f.y,PV1f.x) + PV1f.z);
|
|
R10f.x = R0f.x + R4f.w;
|
|
PS0f = R10f.x;
|
|
R11f.xyz = (texture(textureUnitPS0, R6f.xy).xyz);
|
|
R6f.x = (texture(textureUnitPS1, R6f.xy).x);
|
|
R4f.xyz = (texture(textureUnitPS0, R9f.wy).xyz);
|
|
R1f.x = (texture(textureUnitPS1, R9f.wy).x);
|
|
// 0
|
|
R9f.x = R0f.x + R4f.w;
|
|
R10f.y = R0f.y + R6f.z;
|
|
R127f.z = R1f.x + R13f.y;
|
|
PV0f.w = R13f.y + R6f.x;
|
|
R9f.y = R0f.y + R12f.y;
|
|
PS0f = R9f.y;
|
|
// 1
|
|
PS1f = 1.0 / PV0f.w;
|
|
// 2
|
|
PV0f.z = mul_nonIEEE(R0f.w, PS1f);
|
|
PS0f = 1.0 / R127f.z;
|
|
// 3
|
|
R123f.x = (mul_nonIEEE(R15f.y,PV0f.z) + -(R8f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV1f.x = R123f.x;
|
|
PV1f.y = mul_nonIEEE(R0f.w, PS0f);
|
|
R123f.w = (mul_nonIEEE(R16f.y,PV0f.z) + -(R2f.z));
|
|
R123f.w = clamp(R123f.w, 0.0, 1.0);
|
|
PV1f.w = R123f.w;
|
|
// 4
|
|
R3f.y = max(PV1f.x, PV1f.w);
|
|
PV0f.y = R3f.y;
|
|
R123f.z = (mul_nonIEEE(R16f.y,PV1f.y) + -(R2f.z));
|
|
R123f.z = clamp(R123f.z, 0.0, 1.0);
|
|
PV0f.z = R123f.z;
|
|
R123f.w = (mul_nonIEEE(R15f.y,PV1f.y) + -(R8f.z));
|
|
R123f.w = clamp(R123f.w, 0.0, 1.0);
|
|
PV0f.w = R123f.w;
|
|
// 5
|
|
backupReg0f = R11f.y;
|
|
R123f.x = (mul_nonIEEE(R11f.z,PV0f.y) + R1f.z);
|
|
PV1f.x = R123f.x;
|
|
R11f.y = max(PV0f.w, PV0f.z);
|
|
PV1f.y = R11f.y;
|
|
R123f.z = (mul_nonIEEE(R11f.x,PV0f.y) + R3f.x);
|
|
PV1f.z = R123f.z;
|
|
R123f.w = (mul_nonIEEE(backupReg0f,PV0f.y) + R3f.w);
|
|
PV1f.w = R123f.w;
|
|
// 6
|
|
backupReg0f = R4f.z;
|
|
R3f.x = (mul_nonIEEE(R4f.x,PV1f.y) + PV1f.z);
|
|
R14f.y = R0f.y + R6f.z;
|
|
R4f.z = (mul_nonIEEE(backupReg0f,PV1f.y) + PV1f.x);
|
|
R3f.w = (mul_nonIEEE(R4f.y,PV1f.y) + PV1f.w);
|
|
R14f.x = R0f.x + R12f.x;
|
|
PS0f = R14f.x;
|
|
R6f.xyz = (texture(textureUnitPS0, R8f.xy).xyz);
|
|
R8f.x = (texture(textureUnitPS1, R8f.xy).x);
|
|
R1f.xyz = (texture(textureUnitPS0, R5f.wy).xyz);
|
|
R4f.x = (texture(textureUnitPS1, R5f.wy).x);
|
|
// 0
|
|
R127f.y = R13f.y + R4f.x;
|
|
PV0f.w = R8f.x + R13f.y;
|
|
// 1
|
|
PS1f = 1.0 / PV0f.w;
|
|
// 2
|
|
PV0f.z = mul_nonIEEE(R0f.w, PS1f);
|
|
PS0f = 1.0 / R127f.y;
|
|
// 3
|
|
R123f.x = (mul_nonIEEE(R15f.y,PV0f.z) + -(R8f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV1f.x = R123f.x;
|
|
PV1f.y = mul_nonIEEE(R0f.w, PS0f);
|
|
R123f.w = (mul_nonIEEE(R16f.y,PV0f.z) + -(R2f.z));
|
|
R123f.w = clamp(R123f.w, 0.0, 1.0);
|
|
PV1f.w = R123f.w;
|
|
// 4
|
|
R123f.x = (mul_nonIEEE(R16f.y,PV1f.y) + -(R2f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV0f.x = R123f.x;
|
|
PV0f.y = max(PV1f.x, PV1f.w);
|
|
R123f.z = (mul_nonIEEE(R15f.y,PV1f.y) + -(R8f.z));
|
|
R123f.z = clamp(R123f.z, 0.0, 1.0);
|
|
PV0f.z = R123f.z;
|
|
R5f.w = R0f.x + R12f.x;
|
|
// 5
|
|
backupReg0f = R6f.y;
|
|
R123f.x = (mul_nonIEEE(R6f.z,PV0f.y) + R4f.z);
|
|
PV1f.x = R123f.x;
|
|
R6f.y = max(PV0f.z, PV0f.x);
|
|
PV1f.y = R6f.y;
|
|
R123f.z = (mul_nonIEEE(R6f.x,PV0f.y) + R3f.x);
|
|
PV1f.z = R123f.z;
|
|
R123f.w = (mul_nonIEEE(backupReg0f,PV0f.y) + R3f.w);
|
|
PV1f.w = R123f.w;
|
|
R3f.w = R1f.w + PV0f.y;
|
|
PS1f = R3f.w;
|
|
// 6
|
|
backupReg0f = R1f.x;
|
|
R1f.x = (mul_nonIEEE(R1f.z,PV1f.y) + PV1f.x);
|
|
R5f.y = R0f.y + R12f.y;
|
|
R1f.z = (mul_nonIEEE(R1f.y,PV1f.y) + PV1f.w);
|
|
R1f.w = (mul_nonIEEE(backupReg0f,PV1f.y) + PV1f.z);
|
|
R4f.xyz = (texture(textureUnitPS0, R10f.xy).xyz);
|
|
R10f.x = (texture(textureUnitPS1, R10f.xy).x);
|
|
R12f.xyz = (texture(textureUnitPS0, R9f.xy).xyz);
|
|
R9f.x = (texture(textureUnitPS1, R9f.xy).x);
|
|
// 0
|
|
backupReg0f = R1f.x;
|
|
backupReg1f = R7f.y;
|
|
R1f.x = backupReg0f + R2f.w;
|
|
R7f.y = R1f.z + R7f.x;
|
|
R1f.z = R1f.w + backupReg1f;
|
|
PV0f.w = R10f.x + R13f.y;
|
|
// 1
|
|
PV1f.x = R9f.x + R13f.y;
|
|
PV1f.y = R11f.y + R5f.x;
|
|
PS1f = 1.0 / PV0f.w;
|
|
// 2
|
|
backupReg0f = R0f.w;
|
|
R5f.x = R6f.y + PV1f.y;
|
|
PV0f.w = mul_nonIEEE(backupReg0f, PS1f);
|
|
PS0f = 1.0 / PV1f.x;
|
|
// 3
|
|
PV1f.x = mul_nonIEEE(R0f.w, PS0f);
|
|
R123f.y = (mul_nonIEEE(R15f.y,PV0f.w) + -(R8f.z));
|
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
|
PV1f.y = R123f.y;
|
|
R123f.z = (mul_nonIEEE(R16f.y,PV0f.w) + -(R2f.z));
|
|
R123f.z = clamp(R123f.z, 0.0, 1.0);
|
|
PV1f.z = R123f.z;
|
|
// 4
|
|
R123f.x = (mul_nonIEEE(R16f.y,PV1f.x) + -(R2f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV0f.x = R123f.x;
|
|
R123f.y = (mul_nonIEEE(R15f.y,PV1f.x) + -(R8f.z));
|
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
|
PV0f.y = R123f.y;
|
|
R11f.z = R2f.x + R3f.y;
|
|
R127f.w = max(PV1f.y, PV1f.z);
|
|
// 5
|
|
PV1f.y = R13f.x + R13f.y;
|
|
PV1f.w = max(PV0f.y, PV0f.x);
|
|
// 6
|
|
PV0f.x = mul_nonIEEE(R12f.z, PV1f.w);
|
|
PV0f.y = mul_nonIEEE(R12f.y, PV1f.w);
|
|
PV0f.z = mul_nonIEEE(R12f.x, PV1f.w);
|
|
R2f.w = R127f.w + PV1f.w;
|
|
PS0f = 1.0 / PV1f.y;
|
|
// 7
|
|
backupReg0f = R4f.y;
|
|
R12f.x = mul_nonIEEE(R0f.w, PS0f);
|
|
R4f.y = (mul_nonIEEE(R4f.z,R127f.w) + PV0f.x);
|
|
R4f.z = (mul_nonIEEE(backupReg0f,R127f.w) + PV0f.y);
|
|
R1f.w = (mul_nonIEEE(R4f.x,R127f.w) + PV0f.z);
|
|
R3f.xyz = (texture(textureUnitPS0, R14f.xy).xyz);
|
|
R14f.x = (texture(textureUnitPS1, R14f.xy).x);
|
|
R6f.xyz = (texture(textureUnitPS0, R5f.wy).xyz);
|
|
R4f.x = (texture(textureUnitPS1, R5f.wy).x);
|
|
// 0
|
|
R123f.x = (mul_nonIEEE(R15f.y,R12f.x) + -(R8f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV0f.x = R123f.x;
|
|
R123f.y = (mul_nonIEEE(R16f.y,R12f.x) + -(R2f.z));
|
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
|
PV0f.y = R123f.y;
|
|
PV0f.z = R14f.x + R13f.y;
|
|
R127f.w = R4f.x + R13f.y;
|
|
// 1
|
|
R127f.x = max(PV0f.x, PV0f.y);
|
|
PS1f = 1.0 / PV0f.z;
|
|
// 2
|
|
backupReg0f = R0f.w;
|
|
PV0f.w = mul_nonIEEE(backupReg0f, PS1f);
|
|
PS0f = 1.0 / R127f.w;
|
|
// 3
|
|
R123f.x = (mul_nonIEEE(R15f.y,PV0f.w) + -(R8f.z));
|
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
|
PV1f.x = R123f.x;
|
|
PV1f.y = mul_nonIEEE(R0f.w, PS0f);
|
|
R123f.z = (mul_nonIEEE(R16f.y,PV0f.w) + -(R2f.z));
|
|
R123f.z = clamp(R123f.z, 0.0, 1.0);
|
|
PV1f.z = R123f.z;
|
|
R0f.w = mul_nonIEEE(R127f.x, intBitsToFloat(uf_remappedPS[2].w));
|
|
// 4
|
|
PV0f.x = max(PV1f.x, PV1f.z);
|
|
R123f.y = (mul_nonIEEE(R15f.y,PV1f.y) + -(R8f.z));
|
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
|
PV0f.y = R123f.y;
|
|
R123f.w = (mul_nonIEEE(R16f.y,PV1f.y) + -(R2f.z));
|
|
R123f.w = clamp(R123f.w, 0.0, 1.0);
|
|
PV0f.w = R123f.w;
|
|
// 5
|
|
PV1f.x = max(PV0f.y, PV0f.w);
|
|
R123f.y = (mul_nonIEEE(R3f.y,PV0f.x) + R4f.z);
|
|
PV1f.y = R123f.y;
|
|
R123f.z = (mul_nonIEEE(R3f.z,PV0f.x) + R4f.y);
|
|
PV1f.z = R123f.z;
|
|
R123f.w = (mul_nonIEEE(R3f.x,PV0f.x) + R1f.w);
|
|
PV1f.w = R123f.w;
|
|
PS1f = R2f.w + PV0f.x;
|
|
// 6
|
|
R123f.x = (mul_nonIEEE(R6f.y,PV1f.x) + PV1f.y);
|
|
PV0f.x = R123f.x;
|
|
R123f.y = (mul_nonIEEE(R6f.x,PV1f.x) + PV1f.w);
|
|
PV0f.y = R123f.y;
|
|
PV0f.z = PS1f + PV1f.x;
|
|
R123f.w = (mul_nonIEEE(R6f.z,PV1f.x) + PV1f.z);
|
|
PV0f.w = R123f.w;
|
|
// 7
|
|
R127f.xyz = vec3(PV0f.y,PV0f.w,PV0f.x) + vec3(R1f.z,R1f.x,R7f.y);
|
|
PV1f.w = PV0f.z + R5f.x;
|
|
// 8
|
|
PV0f.z = PV1f.w + 1.0;
|
|
// 9
|
|
PV1f.w = R11f.z + PV0f.z;
|
|
// 10
|
|
PV0f.z = R3f.w + PV1f.w;
|
|
// 11
|
|
PS1f = 1.0 / PV0f.z;
|
|
// 12
|
|
PV0f.x = mul_nonIEEE(R127f.x, PS1f);
|
|
PV0f.z = mul_nonIEEE(R127f.y, PS1f);
|
|
PV0f.w = mul_nonIEEE(R127f.z, PS1f);
|
|
// 13
|
|
R0f.x = mul_nonIEEE(PV0f.x, intBitsToFloat(uf_remappedPS[2].x));
|
|
R0f.y = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[2].y));
|
|
R0f.z = mul_nonIEEE(PV0f.z, intBitsToFloat(uf_remappedPS[2].z));
|
|
// export
|
|
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
|
|
}
|