mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-25 19:16:52 +01:00
[TP] contrasty patch
Tweaks less haze Neutral colour / color bleach removed Less bloom haloing Expisure no longer crushes hilights
This commit is contained in:
parent
3f98a69bfc
commit
3260f9d2a7
@ -0,0 +1,56 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
// shader 49865bd2e62efda1
|
||||
//dark world bloom
|
||||
|
||||
const float bloom = 0.95;
|
||||
uniform ivec4 uf_remappedPS[1];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf597f000 res 480x270x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 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){ 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 = (textureLod(textureUnitPS0, R0f.xy,0.0).xyz)*bloom;
|
||||
// 0
|
||||
backupReg0f = R0f.y;
|
||||
backupReg1f = R0f.x;
|
||||
PV0f.x = mul_nonIEEE(R0f.z, intBitsToFloat(uf_remappedPS[0].z));
|
||||
PV0f.y = mul_nonIEEE(backupReg0f, intBitsToFloat(uf_remappedPS[0].y));
|
||||
PV0f.z = mul_nonIEEE(backupReg1f, intBitsToFloat(uf_remappedPS[0].x));
|
||||
PV0f.w = intBitsToFloat(uf_remappedPS[0].w);
|
||||
// 1
|
||||
PV1f.x = max(PV0f.w, 0.0);
|
||||
PV1f.y = max(PV0f.x, 0.0);
|
||||
PV1f.z = max(PV0f.y, 0.0);
|
||||
PV1f.w = max(PV0f.z, 0.0);
|
||||
// 2
|
||||
R0f.x = min(PV1f.w, 1.0);
|
||||
R0f.y = min(PV1f.z, 1.0);
|
||||
R0f.z = min(PV1f.y, 1.0);
|
||||
R0f.w = min(PV1f.x, 1.0);
|
||||
// export
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
// shader 5f422bf63e25be7f // Bleach pass cutscene
|
||||
|
||||
const float bleach = 0.1;
|
||||
|
||||
uniform ivec4 uf_remappedPS[1];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x24dfb000 res 960x540x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
||||
layout(location = 0) in vec4 passParameterSem1;
|
||||
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);
|
||||
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;
|
||||
R0f.w = (texture(textureUnitPS0, R0f.xy).x);
|
||||
// 0
|
||||
PV0f.x = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x3f7f0000);
|
||||
PV0f.z = intBitsToFloat(uf_remappedPS[0].z) * intBitsToFloat(0x3f7f0000);
|
||||
PV0f.w = intBitsToFloat(uf_remappedPS[0].y) * intBitsToFloat(0x3f7f0000);
|
||||
R1f.w = intBitsToFloat(uf_remappedPS[0].w);
|
||||
R1f.w = clamp(R1f.w, 0.0, 1.0);
|
||||
PS0f = R1f.w;
|
||||
// 1
|
||||
PV1f.x = fract(PV0f.w);
|
||||
PV1f.y = fract(PV0f.x);
|
||||
PV1f.w = fract(PV0f.z);
|
||||
// 2
|
||||
PV0f.x = PV1f.w * intBitsToFloat(0x3f808081);
|
||||
PV0f.y = PV1f.x * intBitsToFloat(0x3f808081);
|
||||
PV0f.z = PV1f.y * intBitsToFloat(0x3f808081);
|
||||
// 3
|
||||
R1f.x = mul_nonIEEE(R0f.w, PV0f.z);
|
||||
R1f.x = clamp(R1f.x, 0.0, 1.0);
|
||||
R1f.y = mul_nonIEEE(R0f.w, PV0f.y);
|
||||
R1f.y = clamp(R1f.y, 0.0, 1.0);
|
||||
R1f.z = mul_nonIEEE(R0f.w, PV0f.x);
|
||||
R1f.z = clamp(R1f.z, 0.0, 1.0);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w) * bleach;
|
||||
}
|
@ -0,0 +1,341 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
// shader 95a5a89d62998e0d
|
||||
|
||||
// blur
|
||||
const float bloom = 0.95;
|
||||
|
||||
uniform ivec4 uf_remappedPS[3];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf59ff000 res 480x270x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
||||
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 R5f = vec4(0.0);
|
||||
vec4 R6f = vec4(0.0);
|
||||
vec4 R7f = 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;
|
||||
float scaler;
|
||||
int tempResulti;
|
||||
ivec4 ARi = ivec4(0);
|
||||
bool predResult = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0f = vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw);
|
||||
scaler = uf_fragCoordScale.x;
|
||||
// 0
|
||||
R7f.x = R0f.x * intBitsToFloat(0x3b088889);
|
||||
PV0f.x = R7f.x;
|
||||
R7f.y = R0f.y * intBitsToFloat(0x3b72b9d6);
|
||||
PV0f.y = R7f.y;
|
||||
// 1
|
||||
R0f.x = PV0f.x;
|
||||
R0f.y = PV0f.y + intBitsToFloat(0x3b72b9d6) * scaler;
|
||||
R1f.z = PV0f.x;
|
||||
R1f.y = PV0f.y + intBitsToFloat(0xbb72b9d6) * scaler;
|
||||
PS1f = R1f.y;
|
||||
// 2
|
||||
R2f.x = R7f.x;
|
||||
R2f.y = R7f.y + intBitsToFloat(0x3bf2b9d6) * scaler;
|
||||
R4f.z = R7f.x;
|
||||
R4f.y = R7f.y + intBitsToFloat(0xbbf2b9d6) * scaler;
|
||||
PS0f = R4f.y;
|
||||
R3f.xyzw = (textureLod(textureUnitPS0, R7f.xy,0.0).xyzw);
|
||||
R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw);
|
||||
R1f.xyzw = (textureLod(textureUnitPS0, R1f.zy,0.0).xyzw);
|
||||
R2f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw);
|
||||
// 0
|
||||
backupReg0f = R0f.x;
|
||||
backupReg1f = R0f.w;
|
||||
PV0f.x = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.y);
|
||||
PV0f.y = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), R0f.z);
|
||||
PV0f.z = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), backupReg0f);
|
||||
PV0f.w = mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y), backupReg1f);
|
||||
R0f.y = R7f.y + intBitsToFloat(0x3c360b60) * scaler;
|
||||
PS0f = R0f.y;
|
||||
// 1
|
||||
R123f.x = (mul_nonIEEE(R3f.y,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.x);
|
||||
PV1f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(R3f.w,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.w);
|
||||
PV1f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(R3f.x,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.z);
|
||||
PV1f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(R3f.z,intBitsToFloat(uf_remappedPS[0].x)) + PV0f.y);
|
||||
PV1f.w = R123f.w;
|
||||
R0f.x = R7f.x;
|
||||
PS1f = R0f.x;
|
||||
// 2
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.y) + PV1f.x);
|
||||
PV0f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.x) + PV1f.z);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.w) + PV1f.y);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].y),R1f.z) + PV1f.w);
|
||||
PV0f.w = R123f.w;
|
||||
R1f.y = R7f.y + intBitsToFloat(0xbc360b60) * scaler;
|
||||
PS0f = R1f.y;
|
||||
// 3
|
||||
backupReg0f = R2f.z;
|
||||
R3f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.x) + PV0f.y);
|
||||
R3f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.y) + PV0f.x);
|
||||
R2f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R2f.w) + PV0f.z);
|
||||
R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),backupReg0f) + PV0f.w);
|
||||
R1f.x = R7f.x;
|
||||
PS1f = R1f.x;
|
||||
// 4
|
||||
R2f.x = R7f.x;
|
||||
R2f.y = R7f.y + intBitsToFloat(0x3c72b9d6) * scaler;
|
||||
R6f.z = R7f.x;
|
||||
R6f.y = R7f.y + intBitsToFloat(0xbc72b9d6) * scaler;
|
||||
PS0f = R6f.y;
|
||||
R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw);
|
||||
R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw);
|
||||
R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw);
|
||||
R5f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw);
|
||||
// 0
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.x) + R3f.x);
|
||||
PV0f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.w) + R2f.z);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.z) + R2f.w);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].z),R4f.y) + R3f.y);
|
||||
PV0f.w = R123f.w;
|
||||
R3f.y = R7f.y + intBitsToFloat(0x3c97b426) * scaler;
|
||||
PS0f = R3f.y;
|
||||
// 1
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.w) + PV0f.y);
|
||||
PV1f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.x) + PV0f.x);
|
||||
PV1f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.z) + PV0f.z);
|
||||
PV1f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R0f.y) + PV0f.w);
|
||||
PV1f.w = R123f.w;
|
||||
R3f.x = R7f.x;
|
||||
PS1f = R3f.x;
|
||||
// 2
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.w) + PV1f.x);
|
||||
PV0f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.z) + PV1f.z);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.y) + PV1f.w);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[0].w),R1f.x) + PV1f.y);
|
||||
PV0f.w = R123f.w;
|
||||
R1f.y = R7f.y + intBitsToFloat(0xbc97b426) * scaler;
|
||||
PS0f = R1f.y;
|
||||
// 3
|
||||
R0f.x = (mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.y);
|
||||
R0f.y = (mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.x);
|
||||
R5f.z = (mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.z);
|
||||
R5f.w = (mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[1].x)) + PV0f.w);
|
||||
R1f.x = R7f.x;
|
||||
PS1f = R1f.x;
|
||||
// 4
|
||||
R5f.x = R7f.x;
|
||||
R5f.y = R7f.y + intBitsToFloat(0x3cb60b60) * scaler;
|
||||
R4f.z = R7f.x;
|
||||
R4f.y = R7f.y + intBitsToFloat(0xbcb60b60) * scaler;
|
||||
PS0f = R4f.y;
|
||||
R6f.xyzw = (textureLod(textureUnitPS0, R6f.zy,0.0).xyzw);
|
||||
R3f.xyzw = (textureLod(textureUnitPS0, R3f.xy,0.0).xyzw);
|
||||
R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw);
|
||||
R2f.xyzw = (textureLod(textureUnitPS0, R5f.xy,0.0).xyzw);
|
||||
// 0
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.z) + R0f.x);
|
||||
PV0f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.y) + R5f.z);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.x) + R5f.w);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].x),R6f.w) + R0f.y);
|
||||
PV0f.w = R123f.w;
|
||||
R0f.y = R7f.y + intBitsToFloat(0x3cd4629b) * scaler;
|
||||
PS0f = R0f.y;
|
||||
// 1
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.y) + PV0f.y);
|
||||
PV1f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.w) + PV0f.w);
|
||||
PV1f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.x) + PV0f.z);
|
||||
PV1f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R3f.z) + PV0f.x);
|
||||
PV1f.w = R123f.w;
|
||||
R0f.x = R7f.x;
|
||||
PS1f = R0f.x;
|
||||
// 2
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.y) + PV1f.x);
|
||||
PV0f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.x) + PV1f.z);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.w) + PV1f.y);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].y),R1f.z) + PV1f.w);
|
||||
PV0f.w = R123f.w;
|
||||
R1f.y = R7f.y + intBitsToFloat(0xbcd4629b) * scaler;
|
||||
PS0f = R1f.y;
|
||||
// 3
|
||||
backupReg0f = R2f.z;
|
||||
R3f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.x) + PV0f.y);
|
||||
R3f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.y) + PV0f.x);
|
||||
R2f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R2f.w) + PV0f.z);
|
||||
R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),backupReg0f) + PV0f.w);
|
||||
R1f.x = R7f.x;
|
||||
PS1f = R1f.x;
|
||||
// 4
|
||||
R2f.x = R7f.x;
|
||||
R2f.y = R7f.y + intBitsToFloat(0x3cf2b9d6) * scaler;
|
||||
R6f.z = R7f.x;
|
||||
R6f.y = R7f.y + intBitsToFloat(0xbcf2b9d6) * scaler;
|
||||
PS0f = R6f.y;
|
||||
R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw);
|
||||
R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw);
|
||||
R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw);
|
||||
R5f.xyzw = (textureLod(textureUnitPS0, R2f.xy,0.0).xyzw);
|
||||
// 0
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.x) + R3f.x);
|
||||
PV0f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.w) + R2f.z);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.z) + R2f.w);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].z),R4f.y) + R3f.y);
|
||||
PV0f.w = R123f.w;
|
||||
R3f.y = R7f.y + intBitsToFloat(0x3d088888) * scaler;
|
||||
PS0f = R3f.y;
|
||||
// 1
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.w) + PV0f.y);
|
||||
PV1f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.x) + PV0f.x);
|
||||
PV1f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.z) + PV0f.z);
|
||||
PV1f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R0f.y) + PV0f.w);
|
||||
PV1f.w = R123f.w;
|
||||
R3f.x = R7f.x;
|
||||
PS1f = R3f.x;
|
||||
// 2
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.w) + PV1f.x);
|
||||
PV0f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.z) + PV1f.z);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.y) + PV1f.w);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[1].w),R1f.x) + PV1f.y);
|
||||
PV0f.w = R123f.w;
|
||||
R1f.y = R7f.y + intBitsToFloat(0xbd088888) * scaler;
|
||||
PS0f = R1f.y;
|
||||
// 3
|
||||
R0f.x = (mul_nonIEEE(R5f.z,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.y);
|
||||
R0f.y = (mul_nonIEEE(R5f.w,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.x);
|
||||
R5f.z = (mul_nonIEEE(R5f.y,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.z);
|
||||
R5f.w = (mul_nonIEEE(R5f.x,intBitsToFloat(uf_remappedPS[2].x)) + PV0f.w);
|
||||
R1f.x = R7f.x;
|
||||
PS1f = R1f.x;
|
||||
// 4
|
||||
R5f.x = R7f.x;
|
||||
R5f.y = R7f.y + intBitsToFloat(0x3d17b426) * scaler;
|
||||
R4f.z = R7f.x;
|
||||
R4f.y = R7f.y + intBitsToFloat(0xbd17b426) * scaler;
|
||||
PS0f = R4f.y;
|
||||
R6f.xyzw = (textureLod(textureUnitPS0, R6f.zy,0.0).xyzw);
|
||||
R3f.xyzw = (textureLod(textureUnitPS0, R3f.xy,0.0).xyzw);
|
||||
R1f.xyzw = (textureLod(textureUnitPS0, R1f.xy,0.0).xyzw);
|
||||
R2f.xyzw = (textureLod(textureUnitPS0, R5f.xy,0.0).xyzw);
|
||||
// 0
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.z) + R0f.x);
|
||||
PV0f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.y) + R5f.z);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.x) + R5f.w);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].x),R6f.w) + R0f.y);
|
||||
PV0f.w = R123f.w;
|
||||
R0f.y = R7f.y + intBitsToFloat(0x3d26dfc3) * scaler;
|
||||
PS0f = R0f.y;
|
||||
// 1
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.y) + PV0f.y);
|
||||
PV1f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.w) + PV0f.w);
|
||||
PV1f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.x) + PV0f.z);
|
||||
PV1f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R3f.z) + PV0f.x);
|
||||
PV1f.w = R123f.w;
|
||||
R0f.x = R7f.x;
|
||||
PS1f = R0f.x;
|
||||
// 2
|
||||
backupReg0f = R7f.y;
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.y) + PV1f.x);
|
||||
PV0f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.x) + PV1f.z);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.w) + PV1f.y);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].y),R1f.z) + PV1f.w);
|
||||
PV0f.w = R123f.w;
|
||||
R7f.y = backupReg0f + intBitsToFloat(0xbd26dfc3) * scaler;
|
||||
PS0f = R7f.y;
|
||||
// 3
|
||||
backupReg0f = R2f.x;
|
||||
backupReg1f = R2f.y;
|
||||
backupReg2f = R2f.z;
|
||||
R2f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg0f) + PV0f.y);
|
||||
R2f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg1f) + PV0f.x);
|
||||
R2f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R2f.w) + PV0f.z);
|
||||
R2f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),backupReg2f) + PV0f.w);
|
||||
R4f.xyzw = (textureLod(textureUnitPS0, R4f.zy,0.0).xyzw);
|
||||
R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw);
|
||||
R7f.xyzw = (textureLod(textureUnitPS0, R7f.xy,0.0).xyzw);
|
||||
// 0
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.x) + R2f.x);
|
||||
PV0f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.w) + R2f.z);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.z) + R2f.w);
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].z),R4f.y) + R2f.y);
|
||||
PV0f.w = R123f.w;
|
||||
// 1
|
||||
R123f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.w) + PV0f.y);
|
||||
PV1f.x = R123f.x;
|
||||
R123f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.x) + PV0f.x);
|
||||
PV1f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.z) + PV0f.z);
|
||||
PV1f.z = R123f.z;
|
||||
R123f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),R0f.y) + PV0f.w);
|
||||
PV1f.w = R123f.w;
|
||||
// 2
|
||||
backupReg0f = R7f.x;
|
||||
backupReg1f = R7f.y;
|
||||
backupReg2f = R7f.z;
|
||||
backupReg3f = R7f.w;
|
||||
R7f.x = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg0f) + PV1f.y);
|
||||
R7f.y = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg1f) + PV1f.w);
|
||||
R7f.z = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg2f) + PV1f.z);
|
||||
R7f.w = (mul_nonIEEE(intBitsToFloat(uf_remappedPS[2].w),backupReg3f) + PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R7f.x, R7f.y, R7f.z, R7f.w)* bloom;
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
// shader 6437bc3fbba05d3a //skyline
|
||||
const float redScale = 0.95;
|
||||
const float greenScale = 1.06;
|
||||
const float blueScale = 1.28;
|
||||
const float hazeFactor = 0.1;
|
||||
|
||||
|
||||
//old contrasty, or just copy paste clarity
|
||||
const float gamma = 1.025; // 1.0 is neutral Botw is already colour graded at this stage
|
||||
const float exposure = 0.99; // 1.0 is neutral
|
||||
const float vibrance = 0.75; // 0.0 is neutral
|
||||
const float crushContrast = 0.0; // 0.0 is neutral. Use small increments, loss of shadow detail
|
||||
|
||||
vec3 contrasty(vec3 colour){
|
||||
vec3 fColour = (colour.xyz);
|
||||
fColour.x = fColour.x *redScale;
|
||||
fColour.y = fColour.y *greenScale;
|
||||
fColour.z = fColour.z *blueScale;
|
||||
|
||||
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);
|
||||
fColour = max(vec3(0.0), fColour - vec3(crushContrast));
|
||||
return fColour;
|
||||
}
|
||||
|
||||
uniform ivec4 uf_remappedPS[1];
|
||||
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;
|
||||
// 0
|
||||
PV0f.x = intBitsToFloat(uf_remappedPS[0].w) * intBitsToFloat(0x3f7f0000);
|
||||
PV0f.y = intBitsToFloat(uf_remappedPS[0].z) * intBitsToFloat(0x3f7f0000);
|
||||
PV0f.z = intBitsToFloat(uf_remappedPS[0].y) * intBitsToFloat(0x3f7f0000);
|
||||
PV0f.w = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x3f7f0000);
|
||||
// 1
|
||||
PV1f.x = fract(PV0f.w);
|
||||
PV1f.y = fract(PV0f.x);
|
||||
PV1f.z = fract(PV0f.y);
|
||||
PV1f.w = fract(PV0f.z);
|
||||
// 2
|
||||
R0f.x = PV1f.x * intBitsToFloat(0x3f808081);
|
||||
R0f.x = clamp(R0f.x, 0.0, 1.0);
|
||||
R0f.y = PV1f.w * intBitsToFloat(0x3f808081);
|
||||
R0f.y = clamp(R0f.y, 0.0, 1.0);
|
||||
R0f.z = PV1f.z * intBitsToFloat(0x3f808081);
|
||||
R0f.z = clamp(R0f.z, 0.0, 1.0);
|
||||
R0f.w = PV1f.y * intBitsToFloat(0x3f808081);
|
||||
R0f.w = clamp(R0f.w, 0.0, 1.0);
|
||||
// export
|
||||
|
||||
R0f.xyz = contrasty(R0f.xyz);
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
|
||||
|
||||
|
||||
//passPixelColor0 = vec4(R0f.x*redScale, R0f.y*greenScale, R0f.z*blueScale, R0f.w);
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
// shader afa7dc4b804ad02f // sky
|
||||
const float redScale = 0.95;
|
||||
const float greenScale = 1.06;
|
||||
const float blueScale = 1.28;
|
||||
const float hazeFactor = 0.1;
|
||||
|
||||
|
||||
//old contrasty, or just copy paste clarity
|
||||
const float gamma = 1.025; // 1.0 is neutral Botw is already colour graded at this stage
|
||||
const float exposure = 0.99; // 1.0 is neutral
|
||||
const float vibrance = 0.75; // 0.0 is neutral
|
||||
const float crushContrast = 0.0; // 0.0 is neutral. Use small increments, loss of shadow detail
|
||||
|
||||
vec3 contrasty(vec3 colour){
|
||||
vec3 fColour = (colour.xyz);
|
||||
fColour.x = fColour.x *redScale;
|
||||
fColour.y = fColour.y *greenScale;
|
||||
fColour.z = fColour.z *blueScale;
|
||||
|
||||
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);
|
||||
fColour = max(vec3(0.0), fColour - vec3(crushContrast));
|
||||
return fColour;
|
||||
}
|
||||
|
||||
uniform ivec4 uf_remappedPS[1];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x2f74d800 res 64x64x1 dim 1 tm: 4 format 0001 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 1) in vec4 passParameterSem1;
|
||||
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 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 = passParameterSem0;
|
||||
R1f = passParameterSem1;
|
||||
R1f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
|
||||
// 0
|
||||
backupReg0f = R0f.w;
|
||||
PV0f.x = intBitsToFloat(uf_remappedPS[0].x) * intBitsToFloat(0x3f7f0000);
|
||||
PV0f.y = intBitsToFloat(uf_remappedPS[0].w) * intBitsToFloat(0x3f7f0000);
|
||||
PV0f.z = intBitsToFloat(uf_remappedPS[0].z) * intBitsToFloat(0x3f7f0000);
|
||||
PV0f.w = intBitsToFloat(uf_remappedPS[0].y) * intBitsToFloat(0x3f7f0000);
|
||||
R127f.x = backupReg0f * intBitsToFloat(0x3f808081);
|
||||
PS0f = R127f.x;
|
||||
// 1
|
||||
PV1f.x = fract(PV0f.w);
|
||||
PV1f.y = fract(PV0f.x);
|
||||
PV1f.z = fract(PV0f.y);
|
||||
PV1f.w = fract(PV0f.z);
|
||||
// 2
|
||||
PV0f.y = PV1f.x * intBitsToFloat(0x3f808081);
|
||||
PV0f.z = PV1f.y * intBitsToFloat(0x3f808081);
|
||||
PV0f.w = PV1f.w * intBitsToFloat(0x3f808081);
|
||||
R0f.w = mul_nonIEEE(PV1f.z, R127f.x);
|
||||
R0f.w = clamp(R0f.w, 0.0, 1.0);
|
||||
PS0f = R0f.w;
|
||||
// 3
|
||||
R0f.x = mul_nonIEEE(R1f.x, PV0f.z);
|
||||
R0f.x = clamp(R0f.x, 0.0, 1.0);
|
||||
R0f.y = mul_nonIEEE(R1f.y, PV0f.y);
|
||||
R0f.y = clamp(R0f.y, 0.0, 1.0);
|
||||
R0f.z = mul_nonIEEE(R1f.z, PV0f.w);
|
||||
R0f.z = clamp(R0f.z, 0.0, 1.0);
|
||||
// export
|
||||
|
||||
R0f.xyz = contrasty(R0f.xyz);
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
|
||||
}
|
@ -0,0 +1,171 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
// shader c14019840473ff86 //aa
|
||||
const float redScale = 0.95;
|
||||
const float greenScale = 1.06;
|
||||
const float blueScale = 1.28;
|
||||
const float hazeFactor = 0.1;
|
||||
|
||||
const float gamma = 1.025; // 1.0 is neutral Botw is already colour graded at this stage
|
||||
const float exposure = 0.99; // 1.0 is neutral
|
||||
const float vibrance = 0.75; // 0.0 is neutral
|
||||
const float crushContrast = 0.0; // 0.0 is neutral. Use small increments, loss of shadow detail
|
||||
|
||||
float Sigmoid (float x) {
|
||||
|
||||
return 1.0 / (1.0 + (exp(-(x - 0.5) * 5.5)));
|
||||
}
|
||||
|
||||
|
||||
vec3 contrasty(vec3 colour){
|
||||
vec3 fColour = (colour.xyz);
|
||||
fColour.x = fColour.x *redScale;
|
||||
fColour.y = fColour.y *greenScale;
|
||||
fColour.z = fColour.z *blueScale;
|
||||
|
||||
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);
|
||||
fColour = max(vec3(0.0), fColour - vec3(crushContrast));
|
||||
return fColour;
|
||||
}
|
||||
|
||||
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4001000 res 1920x1080x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
||||
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5187000 res 1920x1080x1 dim 1 tm: 4 format 0011 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 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){ 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);
|
||||
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 = passParameterSem0;
|
||||
R0f.w = (textureGather(textureUnitPS1, R0f.xy).y);
|
||||
// 0
|
||||
R1f.x = R0f.x + intBitsToFloat(0xba088889);
|
||||
R1f.y = R0f.y + intBitsToFloat(0xba72b9d6);
|
||||
R2f.z = R0f.x;
|
||||
R2f.y = R0f.y + intBitsToFloat(0xba72b9d6);
|
||||
PS0f = R2f.y;
|
||||
// 1
|
||||
R3f.x = R0f.x + intBitsToFloat(0xba088889);
|
||||
R3f.y = R0f.y;
|
||||
R1f.xyzw = (textureGather(textureUnitPS1, R1f.xy).xyzw);
|
||||
R2f.yz = (textureGather(textureUnitPS1, R2f.zy).yz);
|
||||
R3f.xy = (textureGather(textureUnitPS1, R3f.xy).xy);
|
||||
// 0
|
||||
PV0f.x = R2f.z + R3f.x;
|
||||
PV0f.y = R1f.w + R0f.w;
|
||||
PV0f.z = R1f.z + R3f.y;
|
||||
PV0f.w = R1f.x + R2f.y;
|
||||
// 1
|
||||
R123f.x = (R1f.y * 2.0 + -(PV0f.x));
|
||||
PV1f.x = R123f.x;
|
||||
R123f.y = (R1f.y * 2.0 + -(PV0f.y));
|
||||
PV1f.y = R123f.y;
|
||||
R123f.z = (R1f.y * 2.0 + -(PV0f.z));
|
||||
PV1f.z = R123f.z;
|
||||
R123f.w = (R1f.y * 2.0 + -(PV0f.w));
|
||||
PV1f.w = R123f.w;
|
||||
// 2
|
||||
PV0f.x = max(PV1f.x, -(PV1f.x));
|
||||
PV0f.y = max(PV1f.y, -(PV1f.y));
|
||||
PV0f.z = max(PV1f.z, -(PV1f.z));
|
||||
PV0f.w = max(PV1f.w, -(PV1f.w));
|
||||
// 3
|
||||
PV1f.x = PV0f.x + intBitsToFloat(0xb400d959);
|
||||
PV1f.y = PV0f.y + intBitsToFloat(0xb400d959);
|
||||
PV1f.z = PV0f.z + intBitsToFloat(0xb400d959);
|
||||
PV1f.w = PV0f.w + intBitsToFloat(0xb400d959);
|
||||
// 4
|
||||
R123f.x = intBitsToFloat(((PV1f.w >= 0.0)?(floatBitsToInt(1.0)):(0)));
|
||||
PV0f.x = R123f.x;
|
||||
R123f.y = intBitsToFloat(((PV1f.z >= 0.0)?(floatBitsToInt(1.0)):(0)));
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = intBitsToFloat(((PV1f.y >= 0.0)?(floatBitsToInt(1.0)):(0)));
|
||||
PV0f.z = R123f.z;
|
||||
R123f.w = intBitsToFloat(((PV1f.x >= 0.0)?(floatBitsToInt(1.0)):(0)));
|
||||
PV0f.w = R123f.w;
|
||||
// 5
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,PV0f.w),vec4(0.25,0.25,0.25,0.25));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
// 6
|
||||
R127f.z = PV1f.x * intBitsToFloat(0x3f400000)*0.5;
|
||||
PV0f.z = R127f.z;
|
||||
// 7
|
||||
R1f.x = (PV0f.z * intBitsToFloat(0xba088889)*0.5 + R0f.x);
|
||||
R1f.y = R0f.y;
|
||||
R2f.z = R0f.x;
|
||||
R2f.y = (PV0f.z * intBitsToFloat(0xba72b9d6)*0.5 + R0f.y);
|
||||
PS1f = R2f.y;
|
||||
// 8
|
||||
R3f.x = (R127f.z * intBitsToFloat(0x3a088889)*0.5 + R0f.x);
|
||||
R3f.y = R0f.y;
|
||||
R0f.w = (R127f.z * intBitsToFloat(0x3a72b9d6) + R0f.y);
|
||||
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||
R2f.xyzw = (texture(textureUnitPS0, R2f.zy).xyzw);
|
||||
R3f.xyzw = (texture(textureUnitPS0, R3f.xy).xyzw);
|
||||
R0f.xyzw = (texture(textureUnitPS0, R0f.xw).xyzw);
|
||||
// 0
|
||||
PV0f.x = R1f.w + R2f.w;
|
||||
PV0f.y = R1f.z + R2f.z;
|
||||
PV0f.z = R1f.y + R2f.y;
|
||||
PV0f.w = R1f.x + R2f.x;
|
||||
// 1
|
||||
PV1f.x = R3f.w + PV0f.x;
|
||||
PV1f.y = R3f.z + PV0f.y;
|
||||
PV1f.z = R3f.y + PV0f.z;
|
||||
PV1f.w = R3f.x + PV0f.w;
|
||||
// 2
|
||||
backupReg0f = R0f.y;
|
||||
backupReg1f = R0f.x;
|
||||
PV0f.x = R0f.w + PV1f.x;
|
||||
PV0f.y = R0f.z + PV1f.y;
|
||||
PV0f.z = backupReg0f + PV1f.z;
|
||||
PV0f.w = backupReg1f + PV1f.w;
|
||||
// 3
|
||||
R0f.x = PV0f.w * 0.25;
|
||||
R0f.y = PV0f.z * 0.25;
|
||||
R0f.z = PV0f.y * 0.25;
|
||||
R0f.w = PV0f.x * 0.25;
|
||||
// export
|
||||
//R0f.xyz = vec3(Sigmoid(R0f.x), Sigmoid(R0f.y),Sigmoid(R0f.z));
|
||||
R0f.xyz = contrasty(R0f.xyz);
|
||||
//R0f.xyz = clamp(R0f.xyz,0,1);
|
||||
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
|
||||
}
|
@ -0,0 +1,182 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
// shader f42bb0ed469dd804 //sun
|
||||
|
||||
const float redScale = 0.95;
|
||||
const float greenScale = 1.06;
|
||||
const float blueScale = 1.28;
|
||||
const float hazeFactor = 0.1;
|
||||
|
||||
const float gamma = 1.025; // 1.0 is neutral Botw is already colour graded at this stage
|
||||
const float exposure = 0.99; // 1.0 is neutral
|
||||
const float vibrance = 0.75; // 0.0 is neutral
|
||||
const float crushContrast = 0.0; // 0.0 is neutral. Use small increments, loss of shadow detail
|
||||
|
||||
vec3 contrasty(vec3 colour){
|
||||
vec3 fColour = (colour.xyz);
|
||||
fColour.x = fColour.x *redScale;
|
||||
fColour.y = fColour.y *greenScale;
|
||||
fColour.z = fColour.z *blueScale;
|
||||
|
||||
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);
|
||||
fColour = max(vec3(0.0), fColour - vec3(crushContrast));
|
||||
return fColour;
|
||||
}
|
||||
|
||||
uniform ivec4 uf_remappedPS[3];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x2f478000 res 32x32x1 dim 1 tm: 4 format 0001 compSel: 0 0 0 0 mipView: 0x0 (num 0x6) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
||||
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x2f3e2800 res 32x32x1 dim 1 tm: 4 format 0002 compSel: 0 0 0 1 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x24dfb000 res 960x540x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 0
|
||||
layout(location = 0) in vec4 passParameterSem1;
|
||||
layout(location = 1) in vec4 passParameterSem2;
|
||||
layout(location = 2) 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 R123f = vec4(0.0);
|
||||
vec4 R124f = 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 = passParameterSem1;
|
||||
R1f = passParameterSem2;
|
||||
R2f = passParameterSem3;
|
||||
R0f.xyz = (texture(textureUnitPS0, R0f.xy).wzy);
|
||||
R1f.xyzw = (texture(textureUnitPS1, R1f.xy).xyzw);
|
||||
// 0
|
||||
backupReg0f = R0f.y;
|
||||
R125f.x = intBitsToFloat(uf_remappedPS[0].w);
|
||||
PV0f.x = R125f.x;
|
||||
PV0f.y = R0f.z * intBitsToFloat(0x437f0000);
|
||||
PV0f.z = backupReg0f * intBitsToFloat(0x437f0000);
|
||||
PV0f.w = R0f.x * intBitsToFloat(0x437f0000);
|
||||
R127f.w = 1.0 / R2f.z;
|
||||
PS0f = R127f.w;
|
||||
// 1
|
||||
PV1f.x = floor(PV0f.w);
|
||||
R125f.y = intBitsToFloat(uf_remappedPS[1].w);
|
||||
PV1f.y = R125f.y;
|
||||
PV1f.z = floor(PV0f.y);
|
||||
PV1f.w = floor(PV0f.z);
|
||||
R124f.w = 1.0 / PV0f.x;
|
||||
PS1f = R124f.w;
|
||||
// 2
|
||||
R127f.xyz = vec3(PV1f.x,PV1f.w,PV1f.z) + vec3(intBitsToFloat(0xc3000000),intBitsToFloat(0xc3000000),intBitsToFloat(0xc3000000));
|
||||
PV0f.x = R127f.x;
|
||||
PV0f.y = R127f.y;
|
||||
PV0f.z = R127f.z;
|
||||
R125f.w = mul_nonIEEE(R2f.x, R127f.w);
|
||||
R126f.x = 1.0 / PV1f.y;
|
||||
PS0f = R126f.x;
|
||||
// 3
|
||||
tempf.x = dot(vec4(intBitsToFloat(uf_remappedPS[1].x),intBitsToFloat(uf_remappedPS[1].y),intBitsToFloat(uf_remappedPS[1].z),-0.0),vec4(PV0f.x,PV0f.y,PV0f.z,0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
R126f.z = tempf.x;
|
||||
R126f.y = mul_nonIEEE(R2f.y, R127f.w);
|
||||
PS1f = R126f.y;
|
||||
// 4
|
||||
tempf.x = dot(vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),-0.0),vec4(R127f.x,R127f.y,R127f.z,0.0));
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.w = tempf.x;
|
||||
R127f.y = max(PV1f.x, -(PV1f.x));
|
||||
PS0f = R127f.y;
|
||||
// 5
|
||||
R127f.x = max(PV0f.x, -(PV0f.x));
|
||||
PV1f.x = R127f.x;
|
||||
PV1f.y = (R126f.z > 0.0)?1.0:0.0;
|
||||
PV1f.z = PS0f + intBitsToFloat(0xc4800000);
|
||||
R126f.w = (PV0f.x > 0.0)?1.0:0.0;
|
||||
PS1f = (0.0 > R126f.z)?1.0:0.0;
|
||||
// 6
|
||||
PV0f.x = (0.0 > R127f.w)?1.0:0.0;
|
||||
R123f.y = (PV1f.z * intBitsToFloat(0x3a800000) + 1.0);
|
||||
PV0f.y = R123f.y;
|
||||
R126f.z = PV1f.y + -(PS1f);
|
||||
PV0f.w = PV1f.x + intBitsToFloat(0xc4800000);
|
||||
PS0f = intBitsToFloat(uf_remappedPS[2].w);
|
||||
PS0f = clamp(PS0f, 0.0, 1.0);
|
||||
// 7
|
||||
backupReg0f = R126f.w;
|
||||
R123f.x = (PV0f.w * intBitsToFloat(0x3a800000) + 1.0);
|
||||
PV1f.x = R123f.x;
|
||||
PV1f.z = floor(PV0f.y);
|
||||
R126f.w = backupReg0f + -(PV0f.x);
|
||||
R0f.w = mul_nonIEEE(R1f.w, PS0f);
|
||||
R0f.w = clamp(R0f.w, 0.0, 1.0);
|
||||
PS1f = R0f.w;
|
||||
// 8
|
||||
R123f.y = (-(PV1f.z) * intBitsToFloat(0x44800000) + R127f.y);
|
||||
PV0f.y = R123f.y;
|
||||
PV0f.w = floor(PV1f.x);
|
||||
// 9
|
||||
R123f.x = (-(PV0f.w) * intBitsToFloat(0x44800000) + R127f.x);
|
||||
PV1f.x = R123f.x;
|
||||
PV1f.y = mul_nonIEEE(PV0f.y, R126f.z);
|
||||
// 10
|
||||
PV0f.x = mul_nonIEEE(PV1f.x, R126f.w);
|
||||
R123f.z = (mul_nonIEEE(R125f.w,R126f.x) + PV1f.y);
|
||||
PV0f.z = R123f.z;
|
||||
// 11
|
||||
R2f.x = mul_nonIEEE(R125f.y, PV0f.z);
|
||||
R123f.w = (mul_nonIEEE(R126f.y,R124f.w) + PV0f.x);
|
||||
PV1f.w = R123f.w;
|
||||
// 12
|
||||
R2f.y = mul_nonIEEE(R125f.x, PV1f.w);
|
||||
R2f.xyz = (texture(textureUnitPS2, R2f.xy).xyz);
|
||||
// 0
|
||||
PV0f.y = R2f.z;
|
||||
PV0f.y = clamp(PV0f.y, 0.0, 1.0);
|
||||
PV0f.z = R2f.y;
|
||||
PV0f.z = clamp(PV0f.z, 0.0, 1.0);
|
||||
PV0f.w = R2f.x;
|
||||
PV0f.w = clamp(PV0f.w, 0.0, 1.0);
|
||||
// 1
|
||||
R0f.x = mul_nonIEEE(R1f.x, PV0f.w);
|
||||
R0f.x = clamp(R0f.x, 0.0, 1.0);
|
||||
R0f.y = mul_nonIEEE(R1f.y, PV0f.z);
|
||||
R0f.y = clamp(R0f.y, 0.0, 1.0);
|
||||
R0f.z = mul_nonIEEE(R1f.z, PV0f.y);
|
||||
R0f.z = clamp(R0f.z, 0.0, 1.0);
|
||||
// export
|
||||
R0f.xyz = contrasty(R0f.xyz);
|
||||
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
|
||||
}
|
12
Enhancement/TwilightPrincessHD_contrasty/patches.txt
Normal file
12
Enhancement/TwilightPrincessHD_contrasty/patches.txt
Normal file
@ -0,0 +1,12 @@
|
||||
[TPHDv81]
|
||||
moduleMatches = 0x1A03E108
|
||||
#Move some look tweaks to patches instead of shaders
|
||||
|
||||
#rodata constants
|
||||
###exp and haze settings
|
||||
0x100C3EB8 = .float 0.003 ## Near world (over)exposure
|
||||
0x100C36C4 = .float 0.0035 ## Bloom npc/object (over) "
|
||||
0x100C3780 = .float 0.003 ## Distant world (over)exposure
|
||||
0x100C3774 = .float 22.0 ### haze 21 = default 21++~ gradually less
|
||||
|
||||
#0x100871C8 = .float 0.01 #100871C8:.float 0.00050000002 ###cloud float
|
8
Enhancement/TwilightPrincessHD_contrasty/rules.txt
Normal file
8
Enhancement/TwilightPrincessHD_contrasty/rules.txt
Normal file
@ -0,0 +1,8 @@
|
||||
[Definition]
|
||||
titleIds = 000500001019C800,000500001019E600,000500001019E500
|
||||
name = "The Legend of Zelda: Twilight Princess HD - Contrasty patch"
|
||||
version = 2
|
||||
|
||||
#v0.0 Lets see of this works
|
||||
#v0.1 "Baked" overexposure
|
||||
#v0.2 haze world exposure
|
Loading…
Reference in New Issue
Block a user