mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-22 01:29:18 +01:00
[Lost World] remove brightness workaround
issue is much more involved than I thought, possibly the game's HDR is broken?
...ayo @blueskythlikesclouds 👀
This commit is contained in:
parent
519ea6ebb1
commit
4b6e102bf8
@ -1,78 +0,0 @@
|
||||
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
|
||||
#else
|
||||
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
|
||||
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
|
||||
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
|
||||
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
|
||||
#endif
|
||||
// shader 7658289ba65cb755
|
||||
const float brightness = (16.0/9.0);
|
||||
#ifdef VULKAN
|
||||
layout(set = 1, binding = 2) uniform ufBlock
|
||||
{
|
||||
uniform ivec4 uf_remappedPS[1];
|
||||
uniform vec4 uf_fragCoordScale;
|
||||
};
|
||||
#else
|
||||
uniform ivec4 uf_remappedPS[1];
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
#endif
|
||||
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
|
||||
TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4;
|
||||
layout(location = 0) in vec4 passParameterSem137;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
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 = passParameterSem137;
|
||||
R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
|
||||
// 0
|
||||
R0f.y = intBitsToFloat(0x3f000000);
|
||||
R2f.w = 1.0;
|
||||
R0f.x = (texture(textureUnitPS4, R0f.yy).x);
|
||||
// 0
|
||||
backupReg0f = R0f.x;
|
||||
PV0f.x = backupReg0f + intBitsToFloat(0x3a83126f);
|
||||
// 1
|
||||
PS1f = 1.0 / PV0f.x;
|
||||
// 2
|
||||
PV0f.z = PS1f * intBitsToFloat(uf_remappedPS[0].x);
|
||||
// 3
|
||||
PV1f.y = max(PV0f.z, intBitsToFloat(0x3d800000));
|
||||
// 4
|
||||
PV0f.x = min(PV1f.y, intBitsToFloat(0x41800000));
|
||||
// 5
|
||||
R2f.x = mul_nonIEEE(R1f.x, PV0f.x);
|
||||
R2f.y = mul_nonIEEE(R1f.y, PV0f.x);
|
||||
R2f.z = mul_nonIEEE(R1f.z, PV0f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w) * brightness;
|
||||
}
|
@ -1,136 +0,0 @@
|
||||
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
|
||||
#else
|
||||
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
|
||||
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
|
||||
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
|
||||
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
|
||||
#endif
|
||||
// shader 971a39bb79e32fd1
|
||||
const float brightness = (16.0/9.0);
|
||||
#ifdef VULKAN
|
||||
layout(set = 1, binding = 3) uniform ufBlock
|
||||
{
|
||||
uniform ivec4 uf_remappedPS[8];
|
||||
uniform vec4 uf_fragCoordScale;
|
||||
};
|
||||
#else
|
||||
uniform ivec4 uf_remappedPS[8];
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
#endif
|
||||
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
|
||||
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
|
||||
TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4;
|
||||
layout(location = 0) in vec4 passParameterSem136;
|
||||
layout(location = 1) in vec4 passParameterSem137;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
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 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 = passParameterSem136;
|
||||
R1f = passParameterSem137;
|
||||
R2f.x = (texture(textureUnitPS1, R1f.xy).x);
|
||||
R3f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
|
||||
// 0
|
||||
R1f.x = intBitsToFloat(0x3f000000);
|
||||
PV0f.y = intBitsToFloat(uf_remappedPS[0].w) * 1.0;
|
||||
PV0f.z = intBitsToFloat(uf_remappedPS[0].z) * 1.0;
|
||||
PV0f.w = R2f.x + -(1.0);
|
||||
// 1
|
||||
R123f.x = (mul_nonIEEE(R2f.x,intBitsToFloat(uf_remappedPS[1].w)) + PV0f.y);
|
||||
PV1f.x = R123f.x;
|
||||
R1f.z = intBitsToFloat(((PV0f.w >= 0.0)?(floatBitsToInt(1.0)):(0)));
|
||||
R123f.w = (mul_nonIEEE(R2f.x,intBitsToFloat(uf_remappedPS[1].z)) + PV0f.z);
|
||||
PV1f.w = R123f.w;
|
||||
// 2
|
||||
R123f.y = (mul_nonIEEE(R0f.y,intBitsToFloat(uf_remappedPS[2].w)) + PV1f.x);
|
||||
PV0f.y = R123f.y;
|
||||
R123f.z = (mul_nonIEEE(R0f.y,intBitsToFloat(uf_remappedPS[2].z)) + PV1f.w);
|
||||
PV0f.z = R123f.z;
|
||||
// 3
|
||||
R123f.x = (mul_nonIEEE(R0f.x,intBitsToFloat(uf_remappedPS[3].w)) + PV0f.y);
|
||||
PV1f.x = R123f.x;
|
||||
R0f.w = (mul_nonIEEE(R0f.x,intBitsToFloat(uf_remappedPS[3].z)) + PV0f.z);
|
||||
// 4
|
||||
R1f.w = intBitsToFloat(uf_remappedPS[4].x) + intBitsToFloat(uf_remappedPS[4].w);
|
||||
R0f.z = 1.0 / PV1f.x;
|
||||
PS0f = R0f.z;
|
||||
R1f.x = (texture(textureUnitPS4, R1f.xx).x);
|
||||
// 0
|
||||
PV0f.x = -(R1f.w) + intBitsToFloat(uf_remappedPS[4].z);
|
||||
PV0f.y = R0f.w * R0f.z;
|
||||
R127f.z = R1f.x + intBitsToFloat(0x3a83126f);
|
||||
// 1
|
||||
PV1f.y = -(PV0f.y) + -(R1f.w);
|
||||
PS1f = 1.0 / PV0f.x;
|
||||
// 2
|
||||
R127f.w = mul_nonIEEE(PS1f, PV1f.y);
|
||||
R127f.w = clamp(R127f.w, 0.0, 1.0);
|
||||
PV0f.w = R127f.w;
|
||||
R126f.w = 1.0 / R127f.z;
|
||||
PS0f = R126f.w;
|
||||
// 3
|
||||
R123f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[5].y)) + intBitsToFloat(uf_remappedPS[6].y));
|
||||
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||
PV1f.x = R123f.x;
|
||||
// 4
|
||||
R127f.y = (mul_nonIEEE(R127f.w,intBitsToFloat(uf_remappedPS[5].w)) + intBitsToFloat(uf_remappedPS[6].w));
|
||||
R127f.y = clamp(R127f.y, 0.0, 1.0);
|
||||
R123f.z = (mul_nonIEEE(R127f.w,intBitsToFloat(uf_remappedPS[5].z)) + intBitsToFloat(uf_remappedPS[6].z));
|
||||
R123f.z = clamp(R123f.z, 0.0, 1.0);
|
||||
PV0f.z = R123f.z;
|
||||
PV0f.w = -(PV1f.x) + 1.0;
|
||||
// 5
|
||||
PV1f.x = min(PV0f.z, PV0f.w);
|
||||
PV1f.z = R126f.w * intBitsToFloat(uf_remappedPS[7].x);
|
||||
// 6
|
||||
PV0f.y = max(PV1f.z, intBitsToFloat(0x3d800000));
|
||||
PV0f.z = R127f.y + PV1f.x;
|
||||
// 7
|
||||
PV1f.x = min(PV0f.y, intBitsToFloat(0x41800000));
|
||||
R127f.y = min(PV0f.z, intBitsToFloat(0x3f7efeff));
|
||||
PV1f.y = R127f.y;
|
||||
// 8
|
||||
backupReg0f = R3f.x;
|
||||
backupReg1f = R3f.y;
|
||||
backupReg2f = R3f.z;
|
||||
R3f.x = mul_nonIEEE(backupReg0f, PV1f.x);
|
||||
R3f.y = mul_nonIEEE(backupReg1f, PV1f.x);
|
||||
R3f.z = mul_nonIEEE(backupReg2f, PV1f.x);
|
||||
PV0f.w = -(PV1f.y) + 1.0;
|
||||
// 9
|
||||
R3f.w = (mul_nonIEEE(PV0f.w,R1f.z) + R127f.y);
|
||||
// export
|
||||
passPixelColor0 = vec4(R3f.x, R3f.y, R3f.z, R3f.w) * brightness;
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
#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 GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
|
||||
#else
|
||||
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
|
||||
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
|
||||
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
|
||||
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
|
||||
#endif
|
||||
// shader e1d2a971c93cd82a
|
||||
const float brightness = (16.0/9.0);
|
||||
#ifdef VULKAN
|
||||
layout(set = 1, binding = 3) uniform ufBlock
|
||||
{
|
||||
uniform ivec4 uf_remappedPS[8];
|
||||
uniform vec4 uf_fragCoordScale;
|
||||
};
|
||||
#else
|
||||
uniform ivec4 uf_remappedPS[8];
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
#endif
|
||||
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
|
||||
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
|
||||
TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4;
|
||||
layout(location = 0) in vec4 passParameterSem136;
|
||||
layout(location = 1) in vec4 passParameterSem137;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
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 = passParameterSem136;
|
||||
R1f = passParameterSem137;
|
||||
R0f.z = (texture(textureUnitPS1, R1f.xy).x);
|
||||
R2f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
|
||||
// 0
|
||||
R1f.x = intBitsToFloat(0x3f000000);
|
||||
PV0f.y = intBitsToFloat(uf_remappedPS[0].z) * 1.0;
|
||||
PV0f.w = intBitsToFloat(uf_remappedPS[0].w) * 1.0;
|
||||
// 1
|
||||
R123f.x = (mul_nonIEEE(R0f.z,intBitsToFloat(uf_remappedPS[1].z)) + PV0f.y);
|
||||
PV1f.x = R123f.x;
|
||||
R123f.z = (mul_nonIEEE(R0f.z,intBitsToFloat(uf_remappedPS[1].w)) + PV0f.w);
|
||||
PV1f.z = R123f.z;
|
||||
// 2
|
||||
R1f.y = (mul_nonIEEE(R0f.y,intBitsToFloat(uf_remappedPS[2].z)) + PV1f.x);
|
||||
R0f.w = (mul_nonIEEE(R0f.y,intBitsToFloat(uf_remappedPS[2].w)) + PV1f.z);
|
||||
R1f.x = (texture(textureUnitPS4, R1f.xx).x);
|
||||
// 0
|
||||
R127f.x = (mul_nonIEEE(R0f.x,intBitsToFloat(uf_remappedPS[3].z)) + R1f.y);
|
||||
R127f.y = R1f.x + intBitsToFloat(0x3a83126f);
|
||||
R123f.z = (mul_nonIEEE(R0f.x,intBitsToFloat(uf_remappedPS[3].w)) + R0f.w);
|
||||
PV0f.z = R123f.z;
|
||||
// 1
|
||||
R126f.x = intBitsToFloat(uf_remappedPS[4].x) + intBitsToFloat(uf_remappedPS[4].w);
|
||||
PV1f.x = R126f.x;
|
||||
PS1f = 1.0 / PV0f.z;
|
||||
// 2
|
||||
PV0f.z = -(PV1f.x) + intBitsToFloat(uf_remappedPS[4].z);
|
||||
PV0f.w = R127f.x * PS1f;
|
||||
PS0f = 1.0 / R127f.y;
|
||||
// 3
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[5].x);
|
||||
PV1f.w = -(PV0f.w) + -(R126f.x);
|
||||
PS1f = 1.0 / PV0f.z;
|
||||
// 4
|
||||
R126f.x = mul_nonIEEE(PS1f, PV1f.w);
|
||||
R126f.x = clamp(R126f.x, 0.0, 1.0);
|
||||
PV0f.x = R126f.x;
|
||||
PV0f.y = max(PV1f.z, intBitsToFloat(0x3d800000));
|
||||
// 5
|
||||
R127f.x = min(PV0f.y, intBitsToFloat(0x41800000));
|
||||
PV1f.x = R127f.x;
|
||||
R123f.z = (mul_nonIEEE(PV0f.x,intBitsToFloat(uf_remappedPS[6].y)) + intBitsToFloat(uf_remappedPS[7].y));
|
||||
R123f.z = clamp(R123f.z, 0.0, 1.0);
|
||||
PV1f.z = R123f.z;
|
||||
// 6
|
||||
R0f.x = mul_nonIEEE(R2f.x, PV1f.x);
|
||||
R123f.y = (mul_nonIEEE(R126f.x,intBitsToFloat(uf_remappedPS[6].z)) + intBitsToFloat(uf_remappedPS[7].z));
|
||||
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||
PV0f.y = R123f.y;
|
||||
PV0f.z = -(PV1f.z) + 1.0;
|
||||
R127f.w = (mul_nonIEEE(R126f.x,intBitsToFloat(uf_remappedPS[6].w)) + intBitsToFloat(uf_remappedPS[7].w));
|
||||
R127f.w = clamp(R127f.w, 0.0, 1.0);
|
||||
R0f.y = mul_nonIEEE(R2f.y, PV1f.x);
|
||||
PS0f = R0f.y;
|
||||
// 7
|
||||
R0f.z = mul_nonIEEE(R2f.z, R127f.x);
|
||||
PV1f.w = min(PV0f.y, PV0f.z);
|
||||
// 8
|
||||
R0f.w = R127f.w + PV1f.w;
|
||||
// export
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w) * brightness;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
[Definition]
|
||||
titleIds = 0005000010135700,000500001012B100,0005000010128F00
|
||||
name = Brightness
|
||||
path = "Sonic Lost World/Workarounds/Brightness"
|
||||
description = This fixes the game from looking too dark. Made by M&&M.
|
||||
version = 4
|
Loading…
Reference in New Issue
Block a user