From 2b7c07df06a5569bd292734e1201b18322bdcc9d Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 30 Nov 2019 09:58:41 -0800 Subject: [PATCH] Add PC preset to SLW brightness workaround --- .../7658289ba65cb755_00000000000003c9_ps.txt | 8 +++++++- .../971a39bb79e32fd1_0000000000001e71_ps.txt | 8 +++++++- .../e1d2a971c93cd82a_0000000000001e71_ps.txt | 8 +++++++- Workarounds/SonicLostWorld_Brightness/rules.txt | 10 +++++++++- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/Workarounds/SonicLostWorld_Brightness/7658289ba65cb755_00000000000003c9_ps.txt b/Workarounds/SonicLostWorld_Brightness/7658289ba65cb755_00000000000003c9_ps.txt index 5c88c487..b5ba9e6d 100644 --- a/Workarounds/SonicLostWorld_Brightness/7658289ba65cb755_00000000000003c9_ps.txt +++ b/Workarounds/SonicLostWorld_Brightness/7658289ba65cb755_00000000000003c9_ps.txt @@ -13,6 +13,12 @@ #define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) #endif // shader 7658289ba65cb755 +#define preset $preset +#if (preset == 0) +const float brightness = (16.0/9.0); +#elif (preset == 1) +const float brightness = 2.2; +#endif #ifdef VULKAN layout(set = 1, binding = 2) uniform ufBlock { @@ -73,5 +79,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) * (16.0/9.0); +passPixelColor0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w) * brightness; } diff --git a/Workarounds/SonicLostWorld_Brightness/971a39bb79e32fd1_0000000000001e71_ps.txt b/Workarounds/SonicLostWorld_Brightness/971a39bb79e32fd1_0000000000001e71_ps.txt index e6385f9f..8b883dd3 100644 --- a/Workarounds/SonicLostWorld_Brightness/971a39bb79e32fd1_0000000000001e71_ps.txt +++ b/Workarounds/SonicLostWorld_Brightness/971a39bb79e32fd1_0000000000001e71_ps.txt @@ -13,6 +13,12 @@ #define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) #endif // shader 971a39bb79e32fd1 +#define preset $preset +#if (preset == 0) +const float brightness = (16.0/9.0); +#elif (preset == 1) +const float brightness = 2.2; +#endif #ifdef VULKAN layout(set = 1, binding = 3) uniform ufBlock { @@ -131,5 +137,5 @@ 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) * (16.0/9.0); +passPixelColor0 = vec4(R3f.x, R3f.y, R3f.z, R3f.w) * brightness; } diff --git a/Workarounds/SonicLostWorld_Brightness/e1d2a971c93cd82a_0000000000001e71_ps.txt b/Workarounds/SonicLostWorld_Brightness/e1d2a971c93cd82a_0000000000001e71_ps.txt index d2e16de1..70742075 100644 --- a/Workarounds/SonicLostWorld_Brightness/e1d2a971c93cd82a_0000000000001e71_ps.txt +++ b/Workarounds/SonicLostWorld_Brightness/e1d2a971c93cd82a_0000000000001e71_ps.txt @@ -13,6 +13,12 @@ #define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) #endif // shader e1d2a971c93cd82a +#define preset $preset +#if (preset == 0) +const float brightness = (16.0/9.0); +#elif (preset == 1) +const float brightness = 2.2; +#endif #ifdef VULKAN layout(set = 1, binding = 3) uniform ufBlock { @@ -117,5 +123,5 @@ 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) * (16.0/9.0); +passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w) * brightness; } diff --git a/Workarounds/SonicLostWorld_Brightness/rules.txt b/Workarounds/SonicLostWorld_Brightness/rules.txt index 0e46eb03..07981805 100644 --- a/Workarounds/SonicLostWorld_Brightness/rules.txt +++ b/Workarounds/SonicLostWorld_Brightness/rules.txt @@ -2,5 +2,13 @@ titleIds = 0005000010135700,000500001012B100,0005000010128F00 name = Brightness path = "Sonic Lost World/Workarounds/Brightness" -description = This fixes the game from being too dark +description = This fixes the game from looking too dark. version = 4 + +[Preset] +name = Wii U (Default) +$preset:int = 0 + +[Preset] +name = PC +$preset:int = 1