mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-12-22 08:01:48 +01:00
[WW] Enhancement - Game cube colour grading
Finally I can have my cake and eat it
This commit is contained in:
parent
01eb39b3bd
commit
bd1f51d265
@ -0,0 +1,60 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 04dcbf2655f94e03 //hoirzon cloud layer lighten up
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0x2702c000 res 1024x256x1 dim 1 tm: 4 format 0433 compSel: 0 1 2 3 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 2 0 border: 0
|
||||
layout(location = 0) in vec4 passParameterSem6;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
layout(location = 1) out vec4 passPixelColor1;
|
||||
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);
|
||||
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 = passParameterSem6;
|
||||
R0f.xyzw = (texture(textureUnitPS3, R0f.xy).xyzw);
|
||||
// 0
|
||||
backupReg0f = R0f.x;
|
||||
PV0f.x = R0f.w;
|
||||
PV0f.x = clamp(PV0f.x, 0.0, 1.0);
|
||||
R2f.y = (intBitsToFloat(uf_remappedPS[0].z) * 0.5 + 0.5);
|
||||
R1f.x = mul_nonIEEE(backupReg0f, intBitsToFloat(uf_remappedPS[1].x));
|
||||
PS0f = R1f.x;
|
||||
// 1
|
||||
R2f.x = PV0f.x;
|
||||
R1f.y = mul_nonIEEE(R0f.y, intBitsToFloat(uf_remappedPS[1].y));
|
||||
PV1f.y = R1f.y;
|
||||
R1f.z = mul_nonIEEE(R0f.z, intBitsToFloat(uf_remappedPS[1].z));
|
||||
PV1f.z = R1f.z;
|
||||
R1f.w = PV0f.x;
|
||||
PV1f.w = R1f.w;
|
||||
// 2
|
||||
R0f.xyz = vec3(R1f.x,PV1f.y,PV1f.z);
|
||||
R0f.w = PV1f.w;
|
||||
// 3
|
||||
R1f.xyz = vec3(R2f.y,R2f.y,R2f.y);
|
||||
R1f.w = R2f.x;
|
||||
// export
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z*1.1, R0f.w)*1.3;
|
||||
passPixelColor1 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 53141a02b3f78921
|
||||
//make gradient more white blue
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
layout(location = 0) in vec4 passParameterSem1;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
layout(location = 1) out vec4 passPixelColor1;
|
||||
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);
|
||||
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 = passParameterSem1;
|
||||
// 0
|
||||
PV0f.x = R0f.w;
|
||||
PV0f.x = clamp(PV0f.x, 0.0, 1.0);
|
||||
R1f.y = (intBitsToFloat(uf_remappedPS[0].z) * 0.5 + 0.5);
|
||||
R0f.x = intBitsToFloat(uf_remappedPS[1].x);
|
||||
PS0f = R0f.x;
|
||||
// 1
|
||||
R0f.yzw = vec3(intBitsToFloat(uf_remappedPS[1].y),intBitsToFloat(uf_remappedPS[1].z),PV0f.x);
|
||||
PV1f.y = R0f.y;
|
||||
PV1f.z = R0f.z;
|
||||
PV1f.w = R0f.w;
|
||||
R1f.w = PV0f.x;
|
||||
PS1f = R1f.w;
|
||||
// 2
|
||||
R2f.xyz = vec3(R0f.x,PV1f.y,PV1f.z);
|
||||
R2f.w = PV1f.w;
|
||||
// 3
|
||||
R3f.xyz = vec3(R1f.y,R1f.y,R1f.y);
|
||||
R3f.w = R1f.w;
|
||||
// export
|
||||
passPixelColor0 = vec4(R2f.x, R2f.y*0.75, R2f.z*1.25, R2f.w)*1.1;
|
||||
passPixelColor1 = vec4(R3f.x, R3f.y, R3f.z, R3f.w);
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 8a763b05908ba4e8
|
||||
//Third band horizon
|
||||
uniform ivec4 uf_remappedPS[3];
|
||||
layout(location = 0) in vec4 passParameterSem1;
|
||||
layout(location = 1) in vec4 passParameterSem2;
|
||||
layout(location = 2) in vec4 passParameterSem4;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
layout(location = 1) out vec4 passPixelColor1;
|
||||
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 R123f = vec4(0.0);
|
||||
vec4 R126f = 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 = passParameterSem1;
|
||||
R1f = passParameterSem2;
|
||||
R2f = passParameterSem4;
|
||||
// 0
|
||||
backupReg0f = R0f.w;
|
||||
tempf.x = dot(vec4(R2f.x,R2f.y,R2f.z,-0.0),vec4(R2f.x,R2f.y,R2f.z,0.0));
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R0f.w = backupReg0f;
|
||||
R0f.w = clamp(R0f.w, 0.0, 1.0);
|
||||
PS0f = R0f.w;
|
||||
// 1
|
||||
R127f.x = -(intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[1].y);
|
||||
R127f.y = -(intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x);
|
||||
R2f.w = PS0f;
|
||||
PS1f = sqrt(PV0f.x);
|
||||
// 2
|
||||
R126f.x = -(intBitsToFloat(uf_remappedPS[0].z)) + intBitsToFloat(uf_remappedPS[1].z);
|
||||
R123f.w = (mul_nonIEEE(R1f.x,PS1f) + R1f.y);
|
||||
R123f.w = clamp(R123f.w, 0.0, 1.0);
|
||||
PV0f.w = R123f.w;
|
||||
// 3
|
||||
PV1f.z = mul_nonIEEE(PV0f.w, PV0f.w);
|
||||
// 4
|
||||
R0f.x = (mul_nonIEEE(R127f.y,PV1f.z) + intBitsToFloat(uf_remappedPS[0].x));
|
||||
R0f.y = (mul_nonIEEE(R127f.x,PV1f.z) + intBitsToFloat(uf_remappedPS[0].y));
|
||||
R0f.z = (mul_nonIEEE(R126f.x,PV1f.z) + intBitsToFloat(uf_remappedPS[0].z));
|
||||
// 0
|
||||
R2f.x = (intBitsToFloat(uf_remappedPS[2].z) * 0.5 + 0.5);
|
||||
// 1
|
||||
backupReg0f = R0f.x;
|
||||
backupReg1f = R0f.y;
|
||||
backupReg2f = R0f.z;
|
||||
backupReg3f = R0f.w;
|
||||
R0f.xyz = vec3(backupReg0f,backupReg1f,backupReg2f);
|
||||
R0f.w = backupReg3f;
|
||||
// 2
|
||||
R1f.xyz = vec3(R2f.x,R2f.y,R2f.y);
|
||||
R1f.w = R2f.w;
|
||||
// export
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y*0.75, R0f.z*1.25, R0f.w)*1.2;
|
||||
passPixelColor1 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 90ed656e9c17616b
|
||||
//make second gradient more white blue
|
||||
uniform ivec4 uf_remappedPS[3];
|
||||
layout(location = 0) in vec4 passParameterSem1;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
layout(location = 1) out vec4 passPixelColor1;
|
||||
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);
|
||||
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 = passParameterSem1;
|
||||
// 0
|
||||
PV0f.x = mul_nonIEEE(R0f.w, intBitsToFloat(uf_remappedPS[0].x));
|
||||
PV0f.x = clamp(PV0f.x, 0.0, 1.0);
|
||||
R1f.y = (intBitsToFloat(uf_remappedPS[1].z) * 0.5 + 0.5);
|
||||
// 1
|
||||
R0f.xyz = vec3(intBitsToFloat(uf_remappedPS[2].x),intBitsToFloat(uf_remappedPS[2].y),intBitsToFloat(uf_remappedPS[2].z));
|
||||
PV1f.x = R0f.x;
|
||||
PV1f.y = R0f.y;
|
||||
PV1f.z = R0f.z;
|
||||
R0f.w = PV0f.x;
|
||||
PV1f.w = R0f.w;
|
||||
R1f.w = PV0f.x;
|
||||
PS1f = R1f.w;
|
||||
// 2
|
||||
R2f.xyz = vec3(PV1f.x,PV1f.y,PV1f.z);
|
||||
R2f.w = PV1f.w;
|
||||
// 3
|
||||
R3f.xyz = vec3(R1f.y,R1f.y,R1f.y);
|
||||
R3f.w = R1f.w;
|
||||
// export
|
||||
passPixelColor0 = vec4(R2f.x, R2f.y*0.75, R2f.z*1.25, R2f.w)*1.2;
|
||||
passPixelColor1 = vec4(R3f.x, R3f.y, R3f.z, R3f.w);
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 960d3ef6662043c7//bloom blend
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4000800 res 480x270x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1
|
||||
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){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
|
||||
void main()
|
||||
{
|
||||
vec4 R0f = 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.x;
|
||||
backupReg1f = R0f.y;
|
||||
backupReg2f = R0f.z;
|
||||
R0f.xyz = vec3(backupReg0f,backupReg1f,backupReg2f);
|
||||
// export
|
||||
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z*1.1, R0f.w)*0.75;
|
||||
}
|
@ -0,0 +1,247 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader b77c717f243c0b08
|
||||
uniform ivec4 uf_remappedPS[9];
|
||||
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x25672000 res 4096x4096x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0xd) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf42ff800 res 960x540x1 dim 1 tm: 4 format 001a compSel: 1 2 3 0 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0x2df1f000 res 1024x1024x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 1
|
||||
layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x2dfcb000 res 256x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 1
|
||||
layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0x2df1f000 res 1024x1024x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
layout(location = 1) in vec4 passParameterSem4;
|
||||
layout(location = 2) in vec4 passParameterSem5;
|
||||
layout(location = 3) in vec4 passParameterSem6;
|
||||
layout(location = 4) in vec4 passParameterSem7;
|
||||
layout(location = 5) in vec4 passParameterSem8;
|
||||
layout(location = 6) in vec4 passParameterSem9;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
layout(location = 1) out vec4 passPixelColor1;
|
||||
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 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 R122f = vec4(0.0);
|
||||
vec4 R123f = vec4(0.0);
|
||||
vec4 R125f = vec4(0.0);
|
||||
vec4 R126f = 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 = passParameterSem2;
|
||||
R1f = passParameterSem4;
|
||||
R2f = passParameterSem5;
|
||||
R3f = passParameterSem6;
|
||||
R4f = passParameterSem7;
|
||||
R5f = passParameterSem8;
|
||||
R6f = passParameterSem9;
|
||||
R5f.yzw = (texture(textureUnitPS4, R5f.xy).yzw);
|
||||
// 0
|
||||
R127f.x = R5f.y + -(0.5);
|
||||
R127f.y = -(R1f.z) + -(intBitsToFloat(0x42700000));
|
||||
PV0f.z = R5f.w + -(0.5);
|
||||
R127f.w = R5f.z + -(0.5);
|
||||
PS0f = 1.0 / R3f.z;
|
||||
// 1
|
||||
backupReg0f = R3f.y;
|
||||
PV1f.x = mul_nonIEEE(PV0f.z, intBitsToFloat(uf_remappedPS[0].z));
|
||||
PV1f.y = mul_nonIEEE(PV0f.z, intBitsToFloat(uf_remappedPS[0].x));
|
||||
R3f.z = mul_nonIEEE(R3f.x, PS0f);
|
||||
R3f.w = 1.0;
|
||||
R3f.y = mul_nonIEEE(backupReg0f, PS0f);
|
||||
PS1f = R3f.y;
|
||||
// 2
|
||||
R126f.x = R127f.y * intBitsToFloat(0x3dcccccd);
|
||||
R126f.x = clamp(R126f.x, 0.0, 1.0);
|
||||
R8f.y = 0.0;
|
||||
R123f.z = (mul_nonIEEE(R127f.w,intBitsToFloat(uf_remappedPS[0].w)) + PV1f.x);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(R127f.w,intBitsToFloat(uf_remappedPS[0].y)) + PV1f.y);
|
||||
PV0f.w = R123f.w;
|
||||
PS0f = 1.0 / R2f.z;
|
||||
// 3
|
||||
R123f.x = (mul_nonIEEE(R127f.x,intBitsToFloat(uf_remappedPS[1].y)) + PV0f.z);
|
||||
PV1f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(R127f.x,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.w);
|
||||
PV1f.y = R123f.y;
|
||||
R5f.z = mul_nonIEEE(R2f.x, PS0f);
|
||||
R5f.w = mul_nonIEEE(R2f.y, PS0f);
|
||||
PS1f = exp2(intBitsToFloat(uf_remappedPS[1].z));
|
||||
PS1f *= 4.0;
|
||||
// 4
|
||||
PV0f.x = mul_nonIEEE(-(R1f.z), intBitsToFloat(uf_remappedPS[2].y));
|
||||
PV0f.y = mul_nonIEEE(PS1f, PV1f.x);
|
||||
PV0f.z = mul_nonIEEE(PS1f, PV1f.y);
|
||||
PV0f.w = mul_nonIEEE(-(R1f.z), intBitsToFloat(uf_remappedPS[2].w));
|
||||
R127f.z = -(R126f.x) + 1.0;
|
||||
PS0f = R127f.z;
|
||||
// 5
|
||||
PV1f.x = PV0f.z * intBitsToFloat(0x3e7f0000);
|
||||
R123f.y = (mul_nonIEEE(-(intBitsToFloat(uf_remappedPS[2].z)),intBitsToFloat(uf_remappedPS[2].w)) + PV0f.w);
|
||||
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||
PV1f.y = R123f.y;
|
||||
R0f.z = (mul_nonIEEE(-(intBitsToFloat(uf_remappedPS[2].x)),intBitsToFloat(uf_remappedPS[2].y)) + PV0f.x);
|
||||
R0f.z = clamp(R0f.z, 0.0, 1.0);
|
||||
PV1f.w = PV0f.y * intBitsToFloat(0x3e7f0000);
|
||||
R2f.x = mul_nonIEEE(R1f.z, R1f.z);
|
||||
PS1f = R2f.x;
|
||||
// 6
|
||||
backupReg0f = R4f.x;
|
||||
backupReg1f = R4f.y;
|
||||
R4f.x = backupReg0f + PV1f.x;
|
||||
R4f.y = backupReg1f + PV1f.w;
|
||||
R2f.z = R6f.x + PV1f.x;
|
||||
R2f.w = R6f.y + PV1f.w;
|
||||
R6f.y = PV1f.y + R127f.z;
|
||||
R6f.y = clamp(R6f.y, 0.0, 1.0);
|
||||
PS0f = R6f.y;
|
||||
R3f.x = (textureLod(textureUnitPS2, R3f.zy,0.0).x);
|
||||
R6f.x = (textureLod(textureUnitPS2, R3f.zy,R3f.w).x);
|
||||
R4f.xyzw = (texture(textureUnitPS3, R4f.xy).xyzw);
|
||||
R7f.xyz = (texture(textureUnitPS5, R2f.zw).xyz);
|
||||
R5f.x = (texture(textureUnitPS1, R5f.zw).x);
|
||||
// 0
|
||||
PV0f.x = -(R3f.x) + R6f.x;
|
||||
R127f.y = (mul_nonIEEE(-(R0f.z),intBitsToFloat(uf_remappedPS[3].w)) + intBitsToFloat(uf_remappedPS[3].z));
|
||||
PV0f.y = R127f.y;
|
||||
R126f.z = mul_nonIEEE(R4f.w, intBitsToFloat(uf_remappedPS[4].w));
|
||||
R126f.z = clamp(R126f.z, 0.0, 1.0);
|
||||
R122f.x = (mul_nonIEEE(R1f.y,R1f.y) + R2f.x);
|
||||
PS0f = R122f.x;
|
||||
// 1
|
||||
PV1f.x = -(PV0f.y) + 1.0;
|
||||
PV1f.y = -(intBitsToFloat(uf_remappedPS[5].y)) + intBitsToFloat(uf_remappedPS[4].y);
|
||||
PV1f.z = -(intBitsToFloat(uf_remappedPS[5].x)) + intBitsToFloat(uf_remappedPS[4].x);
|
||||
R123f.w = (mul_nonIEEE(PV0f.x,R6f.y) + R3f.x);
|
||||
PV1f.w = R123f.w;
|
||||
R122f.x = (mul_nonIEEE(R1f.x,R1f.x) + PS0f);
|
||||
PS1f = R122f.x;
|
||||
// 2
|
||||
R127f.x = (mul_nonIEEE(PV1f.z,R4f.x) + intBitsToFloat(uf_remappedPS[5].x));
|
||||
R127f.x = clamp(R127f.x, 0.0, 1.0);
|
||||
R126f.y = (mul_nonIEEE(PV1f.y,R4f.y) + intBitsToFloat(uf_remappedPS[5].y));
|
||||
R126f.y = clamp(R126f.y, 0.0, 1.0);
|
||||
PV0f.z = mul_nonIEEE(PV1f.w, intBitsToFloat(uf_remappedPS[3].y));
|
||||
R127f.w = (mul_nonIEEE(PV1f.x,R6f.y) + R127f.y);
|
||||
PS0f = sqrt(PS1f);
|
||||
// 3
|
||||
R126f.x = -(intBitsToFloat(uf_remappedPS[5].z)) + intBitsToFloat(uf_remappedPS[4].z);
|
||||
R123f.w = (mul_nonIEEE(R0f.x,PS0f) + R0f.y);
|
||||
R123f.w = clamp(R123f.w, 0.0, 1.0);
|
||||
PV1f.w = R123f.w;
|
||||
tempResultf = log2(PV0f.z);
|
||||
if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F;
|
||||
PS1f = tempResultf;
|
||||
// 4
|
||||
PV0f.x = mul_nonIEEE(R127f.w, PS1f);
|
||||
R127f.y = -(intBitsToFloat(uf_remappedPS[5].y)) + intBitsToFloat(uf_remappedPS[6].y);
|
||||
R127f.z = -(intBitsToFloat(uf_remappedPS[5].x)) + intBitsToFloat(uf_remappedPS[6].x);
|
||||
R0f.w = R126f.z;
|
||||
R0f.w = clamp(R0f.w, 0.0, 1.0);
|
||||
R1f.z = mul_nonIEEE(PV1f.w, PV1f.w);
|
||||
PS0f = R1f.z;
|
||||
// 5
|
||||
PV1f.x = -(intBitsToFloat(uf_remappedPS[5].z)) + intBitsToFloat(uf_remappedPS[6].z);
|
||||
R127f.w = (mul_nonIEEE(R126f.x,R4f.z) + intBitsToFloat(uf_remappedPS[5].z));
|
||||
R127f.w = clamp(R127f.w, 0.0, 1.0);
|
||||
R126f.x = exp2(PV0f.x);
|
||||
PS1f = R126f.x;
|
||||
// 6
|
||||
backupReg0f = R127f.y;
|
||||
backupReg1f = R127f.z;
|
||||
R127f.y = (mul_nonIEEE(PV1f.x,R7f.z) + intBitsToFloat(uf_remappedPS[5].z));
|
||||
R127f.y = clamp(R127f.y, 0.0, 1.0);
|
||||
PV0f.y = R127f.y;
|
||||
R127f.z = (mul_nonIEEE(backupReg0f,R7f.y) + intBitsToFloat(uf_remappedPS[5].y));
|
||||
R127f.z = clamp(R127f.z, 0.0, 1.0);
|
||||
PV0f.z = R127f.z;
|
||||
R126f.w = (mul_nonIEEE(backupReg1f,R7f.x) + intBitsToFloat(uf_remappedPS[5].x));
|
||||
R126f.w = clamp(R126f.w, 0.0, 1.0);
|
||||
PV0f.w = R126f.w;
|
||||
R8f.w = R0f.w;
|
||||
PS0f = R8f.w;
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].x), R126f.x);
|
||||
PV1f.x = clamp(PV1f.x, 0.0, 1.0);
|
||||
PV1f.y = R127f.w + -(PV0f.y);
|
||||
PV1f.z = R126f.y + -(PV0f.z);
|
||||
PV1f.w = R127f.x + -(PV0f.w);
|
||||
R125f.z = intBitsToFloat(uf_remappedPS[7].y) + R5f.x;
|
||||
R125f.z = clamp(R125f.z, 0.0, 1.0);
|
||||
PS1f = R125f.z;
|
||||
// 8
|
||||
backupReg0f = R127f.z;
|
||||
R127f.x = (mul_nonIEEE(PV1f.w,R126f.z) + R126f.w);
|
||||
R127f.x = clamp(R127f.x, 0.0, 1.0);
|
||||
PV0f.x = R127f.x;
|
||||
PV0f.y = PV1f.x + intBitsToFloat(uf_remappedPS[7].x);
|
||||
PV0f.y = clamp(PV0f.y, 0.0, 1.0);
|
||||
R127f.z = (mul_nonIEEE(PV1f.y,R126f.z) + R127f.y);
|
||||
R127f.z = clamp(R127f.z, 0.0, 1.0);
|
||||
PV0f.z = R127f.z;
|
||||
R126f.w = (mul_nonIEEE(PV1f.z,R126f.z) + backupReg0f);
|
||||
R126f.w = clamp(R126f.w, 0.0, 1.0);
|
||||
PV0f.w = R126f.w;
|
||||
// 9
|
||||
backupReg0f = R125f.z;
|
||||
R126f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[7].z), PV0f.w);
|
||||
PV1f.x = R126f.x;
|
||||
R127f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[7].z), PV0f.x);
|
||||
PV1f.y = R127f.y;
|
||||
R125f.z = mul_nonIEEE(PV0f.y, backupReg0f);
|
||||
R127f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[7].z), PV0f.z);
|
||||
PV1f.w = R127f.w;
|
||||
// 10
|
||||
PV0f.x = R127f.z + -(PV1f.w);
|
||||
PV0f.y = R126f.w + -(PV1f.x);
|
||||
PV0f.z = R127f.x + -(PV1f.y);
|
||||
// 11
|
||||
R5f.x = (mul_nonIEEE(R125f.z,R127f.w) + PV0f.x);
|
||||
R7f.y = (mul_nonIEEE(R125f.z,R126f.x) + PV0f.y);
|
||||
R7f.z = (mul_nonIEEE(R125f.z,R127f.y) + PV0f.z);
|
||||
// 0
|
||||
PV0f.x = -(R7f.y) + intBitsToFloat(uf_remappedPS[8].y);
|
||||
PV0f.y = -(R7f.z) + intBitsToFloat(uf_remappedPS[8].x);
|
||||
PV0f.w = -(R5f.x) + intBitsToFloat(uf_remappedPS[8].z);
|
||||
// 1
|
||||
R0f.x = (mul_nonIEEE(PV0f.y,R1f.z) + R7f.z);
|
||||
PV1f.x = R0f.x;
|
||||
R0f.y = (mul_nonIEEE(PV0f.x,R1f.z) + R7f.y);
|
||||
PV1f.y = R0f.y;
|
||||
R0f.z = (mul_nonIEEE(PV0f.w,R1f.z) + R5f.x);
|
||||
PV1f.z = R0f.z;
|
||||
// 2
|
||||
backupReg0f = R0f.w;
|
||||
R0f.xyz = vec3(PV1f.x,PV1f.y,PV1f.z);
|
||||
R0f.w = backupReg0f;
|
||||
// 3
|
||||
R1f.xyz = vec3(R8f.y,R8f.y,R8f.y);
|
||||
R1f.w = R8f.w;
|
||||
// export
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y*0.9, R0f.z*1.1, R0f.w);
|
||||
passPixelColor1 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -0,0 +1,159 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader e1ea1127489fd281 // horizon
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x25672000 res 4096x4096x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0xd) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf42ff800 res 960x540x1 dim 1 tm: 4 format 001a compSel: 1 2 3 0 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
layout(location = 1) in vec4 passParameterSem4;
|
||||
layout(location = 2) in vec4 passParameterSem5;
|
||||
layout(location = 3) in vec4 passParameterSem6;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
layout(location = 1) out vec4 passPixelColor1;
|
||||
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 R4f = vec4(0.0);
|
||||
vec4 R5f = vec4(0.0);
|
||||
vec4 R123f = vec4(0.0);
|
||||
vec4 R125f = vec4(0.0);
|
||||
vec4 R126f = 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 = passParameterSem2;
|
||||
R1f = passParameterSem4;
|
||||
R2f = passParameterSem5;
|
||||
R3f = passParameterSem6;
|
||||
// 0
|
||||
PV0f.x = mul_nonIEEE(-(R1f.z), intBitsToFloat(uf_remappedPS[0].w));
|
||||
PV0f.y = -(R1f.z) + -(intBitsToFloat(0x42700000));
|
||||
R127f.z = mul_nonIEEE(-(R1f.z), intBitsToFloat(uf_remappedPS[0].y));
|
||||
R4f.w = 1.0;
|
||||
PS0f = 1.0 / R3f.z;
|
||||
// 1
|
||||
R4f.x = mul_nonIEEE(R3f.x, PS0f);
|
||||
R4f.y = mul_nonIEEE(R3f.y, PS0f);
|
||||
R3f.z = (mul_nonIEEE(-(intBitsToFloat(uf_remappedPS[0].z)),intBitsToFloat(uf_remappedPS[0].w)) + PV0f.x);
|
||||
R3f.z = clamp(R3f.z, 0.0, 1.0);
|
||||
PV1f.w = PV0f.y * intBitsToFloat(0x3dcccccd);
|
||||
PV1f.w = clamp(PV1f.w, 0.0, 1.0);
|
||||
PS1f = 1.0 / R2f.z;
|
||||
// 2
|
||||
backupReg0f = R2f.x;
|
||||
backupReg1f = R2f.y;
|
||||
R2f.x = mul_nonIEEE(backupReg0f, PS1f);
|
||||
R2f.y = mul_nonIEEE(backupReg1f, PS1f);
|
||||
R2f.z = -(PV1f.w) + 1.0;
|
||||
R0f.w = (mul_nonIEEE(-(intBitsToFloat(uf_remappedPS[0].x)),intBitsToFloat(uf_remappedPS[0].y)) + R127f.z);
|
||||
R0f.w = clamp(R0f.w, 0.0, 1.0);
|
||||
R5f.x = intBitsToFloat(uf_remappedPS[1].x);
|
||||
R5f.x = clamp(R5f.x, 0.0, 1.0);
|
||||
PS0f = R5f.x;
|
||||
R3f.x = (textureLod(textureUnitPS2, R4f.xy,0.0).x);
|
||||
R4f.x = (textureLod(textureUnitPS2, R4f.xy,R4f.w).x);
|
||||
R2f.x = (texture(textureUnitPS1, R2f.xy).x);
|
||||
// 0
|
||||
R127f.x = R3f.z + R2f.z;
|
||||
R127f.x = clamp(R127f.x, 0.0, 1.0);
|
||||
PV0f.x = R127f.x;
|
||||
PV0f.y = -(R3f.x) + R4f.x;
|
||||
R127f.z = (mul_nonIEEE(-(R0f.w),intBitsToFloat(uf_remappedPS[2].w)) + intBitsToFloat(uf_remappedPS[2].z));
|
||||
PV0f.z = R127f.z;
|
||||
R126f.w = intBitsToFloat(uf_remappedPS[1].y);
|
||||
R126f.w = clamp(R126f.w, 0.0, 1.0);
|
||||
R4f.w = 1.0;
|
||||
PS0f = R4f.w;
|
||||
// 1
|
||||
R126f.x = intBitsToFloat(uf_remappedPS[1].z);
|
||||
R126f.x = clamp(R126f.x, 0.0, 1.0);
|
||||
PV1f.x = R126f.x;
|
||||
PV1f.y = -(PV0f.z) + 1.0;
|
||||
R126f.z = intBitsToFloat(uf_remappedPS[3].y) + R2f.x;
|
||||
R126f.z = clamp(R126f.z, 0.0, 1.0);
|
||||
R123f.w = (mul_nonIEEE(PV0f.y,PV0f.x) + R3f.x);
|
||||
PV1f.w = R123f.w;
|
||||
R3f.z = 0.0;
|
||||
PS1f = R3f.z;
|
||||
// 2
|
||||
backupReg0f = R127f.x;
|
||||
R127f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].z), R5f.x);
|
||||
R126f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].z), R126f.w);
|
||||
PV0f.z = mul_nonIEEE(PV1f.w, intBitsToFloat(uf_remappedPS[2].y));
|
||||
R127f.w = (mul_nonIEEE(PV1f.y,backupReg0f) + R127f.z);
|
||||
R125f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[3].z), PV1f.x);
|
||||
PS0f = R125f.z;
|
||||
// 3
|
||||
tempf.x = dot(vec4(R1f.x,R1f.y,R1f.z,-0.0),vec4(R1f.x,R1f.y,R1f.z,0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
tempResultf = log2(PV0f.z);
|
||||
if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F;
|
||||
PS1f = tempResultf;
|
||||
// 4
|
||||
PV0f.x = mul_nonIEEE(R127f.w, PS1f);
|
||||
R127f.yzw = vec3(R5f.x,R126f.w,R126f.x) + vec3(-(R127f.x),-(R126f.y),-(R125f.z));
|
||||
PS0f = sqrt(PV1f.x);
|
||||
// 5
|
||||
R123f.w = (mul_nonIEEE(R0f.x,PS0f) + R0f.y);
|
||||
R123f.w = clamp(R123f.w, 0.0, 1.0);
|
||||
PV1f.w = R123f.w;
|
||||
PS1f = exp2(PV0f.x);
|
||||
// 6
|
||||
R2f.z = mul_nonIEEE(PV1f.w, PV1f.w);
|
||||
PV0f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x), PS1f);
|
||||
PV0f.w = clamp(PV0f.w, 0.0, 1.0);
|
||||
// 7
|
||||
PV1f.z = PV0f.w + intBitsToFloat(uf_remappedPS[3].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 8
|
||||
PV0f.y = mul_nonIEEE(PV1f.z, R126f.z);
|
||||
// 9
|
||||
R0f.x = (mul_nonIEEE(PV0f.y,R125f.z) + R127f.w);
|
||||
R0f.y = (mul_nonIEEE(PV0f.y,R126f.y) + R127f.z);
|
||||
R1f.z = (mul_nonIEEE(PV0f.y,R127f.x) + R127f.y);
|
||||
// 0
|
||||
backupReg0f = R0f.x;
|
||||
PV0f.x = -(R0f.y) + intBitsToFloat(uf_remappedPS[4].y);
|
||||
PV0f.y = -(R1f.z) + intBitsToFloat(uf_remappedPS[4].x);
|
||||
PV0f.w = -(backupReg0f) + intBitsToFloat(uf_remappedPS[4].z);
|
||||
// 1
|
||||
R4f.x = (mul_nonIEEE(PV0f.y,R2f.z) + R1f.z);
|
||||
PV1f.x = R4f.x;
|
||||
R4f.y = (mul_nonIEEE(PV0f.x,R2f.z) + R0f.y);
|
||||
PV1f.y = R4f.y;
|
||||
R4f.z = (mul_nonIEEE(PV0f.w,R2f.z) + R0f.x);
|
||||
PV1f.z = R4f.z;
|
||||
// 2
|
||||
R0f.xyz = vec3(PV1f.x,PV1f.y,PV1f.z);
|
||||
R0f.w = R4f.w;
|
||||
// 3
|
||||
R1f.xyz = vec3(R3f.z,R3f.y,R3f.y);
|
||||
R1f.w = R3f.y;
|
||||
// export
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y*0.9, R0f.z*1.1, R0f.w);
|
||||
passPixelColor1 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader f1a49f43d95bec30 //skybox
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
layout(location = 1) out vec4 passPixelColor1;
|
||||
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);
|
||||
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;
|
||||
// 0
|
||||
R1f.x = (intBitsToFloat(uf_remappedPS[0].z) * 0.5 + 0.5);
|
||||
R0f.y = intBitsToFloat(uf_remappedPS[1].y);
|
||||
R1f.z = 0.0;
|
||||
R0f.w = 0.0;
|
||||
R0f.x = intBitsToFloat(uf_remappedPS[1].x);
|
||||
PS0f = R0f.x;
|
||||
// 1
|
||||
R0f.z = intBitsToFloat(uf_remappedPS[1].z);
|
||||
PV1f.z = R0f.z;
|
||||
// 2
|
||||
R2f.xyz = vec3(R0f.x,R0f.y,PV1f.z);
|
||||
R2f.w = R0f.w;
|
||||
// 3
|
||||
R3f.xyz = vec3(R1f.x,R1f.y,R1f.y);
|
||||
R3f.w = R1f.z;
|
||||
// export
|
||||
passPixelColor0 = vec4(R2f.x*0.9, R2f.y*0.9, R2f.z*1.2, R2f.w)*0.75;
|
||||
passPixelColor1 = vec4(R3f.x, R3f.y, R3f.z, R3f.w);
|
||||
}
|
@ -0,0 +1,214 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader ff71dcd2ad4defdc
|
||||
//AA ps
|
||||
const float resScale = 4.0;
|
||||
|
||||
//old contrasty, or just copy paste clarity
|
||||
const float gamma = 0.8; // 1.0 is neutral Botw is already colour graded at this stage
|
||||
const float exposure = 1.05; // 1.0 is neutral
|
||||
const float vibrance = 0.02; // 0.0 is neutral
|
||||
const float crushContrast = 0.00; // 0.0 is neutral. Use small increments, loss of shadow detail
|
||||
|
||||
vec3 contrasty(vec3 colour){
|
||||
vec3 fColour = (colour.xyz);
|
||||
fColour = max(vec3(0.0), fColour - vec3(crushContrast));
|
||||
fColour = clamp(exposure * fColour, 0.0, 1.0);
|
||||
fColour = pow(fColour, vec3(1.0 / gamma));
|
||||
float luminance = fColour.r*0.299 + fColour.g*0.587 + fColour.b*0.114;
|
||||
float mn = min(min(fColour.r, fColour.g), fColour.b);
|
||||
float mx = max(max(fColour.r, fColour.g), fColour.b);
|
||||
float sat = (1.0 - (mx - mn)) * (1.0 - mx) * luminance * 5.0;
|
||||
vec3 lightness = vec3((mn + mx) / 2.0);
|
||||
// vibrance
|
||||
fColour = mix(fColour, mix(fColour, lightness, -vibrance), sat);
|
||||
return fColour;
|
||||
}
|
||||
|
||||
uniform ivec4 uf_remappedPS[4];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5807800 res 1920x1080x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf4000800 res 1920x1080x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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 R4f = vec4(0.0);
|
||||
vec4 R123f = vec4(0.0);
|
||||
vec4 R126f = 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;
|
||||
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;
|
||||
R0f = passParameterSem2;
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1f.xyzw = (textureGather(textureUnitPS1, R0f.xy).wzxy);
|
||||
R2f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
PV0f.x = R1f.y + R1f.x;
|
||||
R127f.y = intBitsToFloat(uf_remappedPS[0].z) * 0.25;
|
||||
PV0f.z = R1f.w + -(R1f.x);
|
||||
PV0f.w = R1f.z + -(R1f.y);
|
||||
R127f.z = mul_nonIEEE(R2f.x, intBitsToFloat(uf_remappedPS[1].x));
|
||||
PS0f = R127f.z;
|
||||
// 1
|
||||
R127f.x = PV0f.w + -(PV0f.z);
|
||||
PV1f.x = R127f.x;
|
||||
R126f.y = PV0f.w + PV0f.z;
|
||||
PV1f.y = R126f.y;
|
||||
PV1f.z = R1f.z + PV0f.x;
|
||||
R127f.w = min(R1f.z, R1f.x);
|
||||
R126f.w = min(R1f.w, R1f.y);
|
||||
PS1f = R126f.w;
|
||||
// 2
|
||||
PV0f.x = R1f.w + PV1f.z;
|
||||
PV0f.y = max(PV1f.x, -(PV1f.x));
|
||||
PV0f.z = max(PV1f.y, -(PV1f.y));
|
||||
PV0f.w = max(R1f.z, R1f.x);
|
||||
PS0f = max(R1f.w, R1f.y);
|
||||
// 3
|
||||
PV1f.x = min(PV0f.z, PV0f.y);
|
||||
R123f.y = (mul_nonIEEE(R2f.y,intBitsToFloat(uf_remappedPS[1].y)) + R127f.z);
|
||||
PV1f.y = R123f.y;
|
||||
R127f.z = min(R127f.w, R126f.w);
|
||||
PV1f.z = R127f.z;
|
||||
R123f.w = (mul_nonIEEE(R127f.y,PV0f.x) + intBitsToFloat(uf_remappedPS[0].w));
|
||||
PV1f.w = R123f.w;
|
||||
R127f.w = max(PV0f.w, PS0f);
|
||||
PS1f = R127f.w;
|
||||
// 4
|
||||
PV0f.x = mul_nonIEEE(PS1f, intBitsToFloat(uf_remappedPS[2].x));
|
||||
PV0f.y = max(PV1f.y, PS1f);
|
||||
PV0f.z = min(PV1f.y, PV1f.z);
|
||||
PV0f.w = max(PV1f.w, PV1f.x);
|
||||
R4f.z = -(PV1f.z) + PS1f;
|
||||
PS0f = R4f.z;
|
||||
// 5
|
||||
R3f.x = max(PV0f.x, intBitsToFloat(uf_remappedPS[2].y));
|
||||
R3f.y = -(PV0f.z) + PV0f.y;
|
||||
R4f.w = R127f.z + R127f.w;
|
||||
PS1f = 1.0 / PV0f.w;
|
||||
// 6
|
||||
PV0f.x = mul_nonIEEE(R127f.x, PS1f); //p
|
||||
PV0f.y = mul_nonIEEE(R126f.y, PS1f);
|
||||
// 7
|
||||
PV1f.z = max(PV0f.x, -(intBitsToFloat(uf_remappedPS[0].y))); //p
|
||||
PV1f.w = max(PV0f.y, -(intBitsToFloat(uf_remappedPS[0].y)));
|
||||
// 8
|
||||
R1f.x = min(PV1f.w, intBitsToFloat(uf_remappedPS[0].y));
|
||||
R1f.y = min(PV1f.z, intBitsToFloat(uf_remappedPS[0].y));
|
||||
// 9
|
||||
predResult = (R3f.y > R3f.x);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
R3f.x = (mul_nonIEEE(R1f.x,-(intBitsToFloat(uf_remappedPS[3].z) / resScale)) + R0f.x);
|
||||
R3f.y = (mul_nonIEEE(R1f.y,-(intBitsToFloat(uf_remappedPS[3].w) / resScale)) + R0f.y);
|
||||
R0f.z = (mul_nonIEEE(R1f.x,intBitsToFloat(uf_remappedPS[3].z)) + R0f.x); //leave out, looks better on avg
|
||||
R0f.w = (mul_nonIEEE(R1f.y,intBitsToFloat(uf_remappedPS[3].w)) + R0f.y);//leave out, looks better on avg
|
||||
R4f.x = (mul_nonIEEE(R1f.x,-(intBitsToFloat(uf_remappedPS[3].x) / resScale)) + R0f.x);
|
||||
PS0f = R4f.x;
|
||||
// 1
|
||||
R4f.y = (mul_nonIEEE(R1f.y,-(intBitsToFloat(uf_remappedPS[3].y)/resScale)) + R0f.y);
|
||||
R3f.z = (mul_nonIEEE(R1f.x,intBitsToFloat(uf_remappedPS[3].x) / resScale) + R0f.x);
|
||||
R3f.w = (mul_nonIEEE(R1f.y,intBitsToFloat(uf_remappedPS[3].y) / resScale) + R0f.y);
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
R1f.xyzw = (texture(textureUnitPS0, R0f.zw).xyzw);
|
||||
R0f.xyzw = (texture(textureUnitPS0, R3f.xy).xyzw);
|
||||
R2f.xyzw = (texture(textureUnitPS0, R4f.xy).xyzw);
|
||||
R3f.xyzw = (texture(textureUnitPS0, R3f.zw).xyzw);
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
R127f.xyz = vec3(R0f.x,R0f.w,R0f.z) + vec3(R1f.x,R1f.w,R1f.z);
|
||||
PV0f.x = R127f.x;
|
||||
PV0f.y = R127f.y;
|
||||
PV0f.z = R127f.z;
|
||||
R127f.w = R0f.y + R1f.y;
|
||||
PV0f.w = R127f.w;
|
||||
// 1
|
||||
PV1f.x = R2f.x + PV0f.x;
|
||||
PV1f.y = R2f.w + PV0f.y;
|
||||
PV1f.z = R2f.z + PV0f.z;
|
||||
PV1f.w = R2f.y + PV0f.w;
|
||||
// 2
|
||||
R126f.x = R3f.x + PV1f.x;
|
||||
R126f.x /= 2.0;
|
||||
PV0f.x = R126f.x;
|
||||
R126f.y = R3f.w + PV1f.y;
|
||||
R126f.y /= 2.0;
|
||||
PV0f.y = R126f.y;
|
||||
R126f.z = R3f.z + PV1f.z;
|
||||
R126f.z /= 2.0;
|
||||
PV0f.z = R126f.z;
|
||||
R126f.w = R3f.y + PV1f.w;
|
||||
R126f.w /= 2.0;
|
||||
PV0f.w = R126f.w;
|
||||
// 3
|
||||
backupReg0f = R127f.y;
|
||||
R123f.x = (mul_nonIEEE(PV0f.x,intBitsToFloat(uf_remappedPS[1].x)) + -(R4f.w));
|
||||
PV1f.x = R123f.x;
|
||||
R127f.yzw = vec3(R127f.z,R127f.w,R127f.x) + vec3(-(PV0f.z),-(PV0f.w),-(PV0f.x));
|
||||
R127f.x = backupReg0f + -(PV0f.y);
|
||||
PS1f = R127f.x;
|
||||
// 4
|
||||
R123f.w = (mul_nonIEEE(R126f.w,intBitsToFloat(uf_remappedPS[1].y)) + PV1f.x);
|
||||
PV0f.w = R123f.w;
|
||||
// 5
|
||||
PV1f.z = max(PV0f.w, -(PV0f.w));
|
||||
// 6
|
||||
PV0f.y = -(R4f.z) + PV1f.z;
|
||||
// 7
|
||||
R123f.x = intBitsToFloat(((PV0f.y >= 0.0)?(floatBitsToInt(1.0)):(0)));
|
||||
PV1f.x = R123f.x;
|
||||
// 8
|
||||
R2f.x = (mul_nonIEEE(R127f.w,PV1f.x) + R126f.x)/2.0;
|
||||
R2f.y = (mul_nonIEEE(R127f.z,PV1f.x) + R126f.w)/2.0;
|
||||
R2f.z = (mul_nonIEEE(R127f.y,PV1f.x) + R126f.z)/2.0;
|
||||
R2f.w = (mul_nonIEEE(R127f.x,PV1f.x) + R126f.y)/2.0;
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
|
||||
R2f.xyz = contrasty(R2f.xyz);
|
||||
passPixelColor0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||
}
|
5
Enhancement/WindWakerHD_GC_colour/rules.txt
Normal file
5
Enhancement/WindWakerHD_GC_colour/rules.txt
Normal file
@ -0,0 +1,5 @@
|
||||
# Found by jediyoshi, Shadow format found by SunBroDave
|
||||
[Definition]
|
||||
titleIds = 0005000010143400,0005000010143600,0005000010143500
|
||||
name = "The Legend of Zelda: The Wind Waker HD - GC colour grading" # aka teal is not blue... nor is purple.
|
||||
version = 2
|
Loading…
Reference in New Issue
Block a user