From a541e5a868381039f2f9e601b9b6e5d47554b803 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 6 Dec 2017 21:05:28 -0800 Subject: [PATCH] separate brightness fix need to figure out how to do it via vertex shaders and not pixel shaders --- .../7658289ba65cb755_00000000000003c9_ps.txt | 6 +++--- .../971a39bb79e32fd1_0000000000001e71_ps.txt | 6 +++--- .../e1d2a971c93cd82a_0000000000001e71_ps.txt | 6 +++--- Workaround/SonicLostWorld_BrightnessFix/rules.txt | 4 ++++ 4 files changed, 13 insertions(+), 9 deletions(-) rename {Source/SonicLostWorld => Workaround/SonicLostWorld_BrightnessFix}/7658289ba65cb755_00000000000003c9_ps.txt (91%) rename {Source/SonicLostWorld => Workaround/SonicLostWorld_BrightnessFix}/971a39bb79e32fd1_0000000000001e71_ps.txt (96%) rename {Source/SonicLostWorld => Workaround/SonicLostWorld_BrightnessFix}/e1d2a971c93cd82a_0000000000001e71_ps.txt (95%) create mode 100644 Workaround/SonicLostWorld_BrightnessFix/rules.txt diff --git a/Source/SonicLostWorld/7658289ba65cb755_00000000000003c9_ps.txt b/Workaround/SonicLostWorld_BrightnessFix/7658289ba65cb755_00000000000003c9_ps.txt similarity index 91% rename from Source/SonicLostWorld/7658289ba65cb755_00000000000003c9_ps.txt rename to Workaround/SonicLostWorld_BrightnessFix/7658289ba65cb755_00000000000003c9_ps.txt index d1f5d4f1..6ec9bf52 100644 --- a/Source/SonicLostWorld/7658289ba65cb755_00000000000003c9_ps.txt +++ b/Workaround/SonicLostWorld_BrightnessFix/7658289ba65cb755_00000000000003c9_ps.txt @@ -1,6 +1,6 @@ #version 420 #extension GL_ARB_texture_gather : enable -const float bloomFactor = 1.75; +const float brightnessMultiplier = 1.6; // shader 7658289ba65cb755 uniform ivec4 uf_remappedPS[1]; layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4520000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0 @@ -33,7 +33,7 @@ bool predResult = true; vec3 cubeMapSTM; int cubeMapFaceId; R0f = passParameterSem137; -R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz * bloomFactor); +R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); // 0 R0f.y = intBitsToFloat(0x3f000000); R2f.w = 1.0; @@ -54,5 +54,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); +passPixelColor0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w)*brightnessMultiplier; } diff --git a/Source/SonicLostWorld/971a39bb79e32fd1_0000000000001e71_ps.txt b/Workaround/SonicLostWorld_BrightnessFix/971a39bb79e32fd1_0000000000001e71_ps.txt similarity index 96% rename from Source/SonicLostWorld/971a39bb79e32fd1_0000000000001e71_ps.txt rename to Workaround/SonicLostWorld_BrightnessFix/971a39bb79e32fd1_0000000000001e71_ps.txt index 2cfd22c3..63b894b7 100644 --- a/Source/SonicLostWorld/971a39bb79e32fd1_0000000000001e71_ps.txt +++ b/Workaround/SonicLostWorld_BrightnessFix/971a39bb79e32fd1_0000000000001e71_ps.txt @@ -1,6 +1,6 @@ #version 420 #extension GL_ARB_texture_gather : enable -const float bloomFactor = 1.75; +const float brightnessMultiplier = 1.6; // shader 971a39bb79e32fd1 uniform ivec4 uf_remappedPS[8]; layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4520000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0 @@ -41,7 +41,7 @@ int cubeMapFaceId; R0f = passParameterSem136; R1f = passParameterSem137; R2f.x = (texture(textureUnitPS1, R1f.xy).x); -R3f.xyz = (texture(textureUnitPS0, R1f.xy).xyz * bloomFactor); +R3f.xyz = (texture(textureUnitPS0, R1f.xy).xyz); // 0 R1f.x = intBitsToFloat(0x3f000000); PV0f.y = intBitsToFloat(uf_remappedPS[0].w) * 1.0; @@ -112,5 +112,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); +passPixelColor0 = vec4(R3f.x, R3f.y, R3f.z, R3f.w)*brightnessMultiplier; } diff --git a/Source/SonicLostWorld/e1d2a971c93cd82a_0000000000001e71_ps.txt b/Workaround/SonicLostWorld_BrightnessFix/e1d2a971c93cd82a_0000000000001e71_ps.txt similarity index 95% rename from Source/SonicLostWorld/e1d2a971c93cd82a_0000000000001e71_ps.txt rename to Workaround/SonicLostWorld_BrightnessFix/e1d2a971c93cd82a_0000000000001e71_ps.txt index 318b6f8a..9383fc82 100644 --- a/Source/SonicLostWorld/e1d2a971c93cd82a_0000000000001e71_ps.txt +++ b/Workaround/SonicLostWorld_BrightnessFix/e1d2a971c93cd82a_0000000000001e71_ps.txt @@ -1,6 +1,6 @@ #version 420 #extension GL_ARB_texture_gather : enable -const float bloomFactor = 1.75; +const float brightnessMultiplier = 1.6; // shader e1d2a971c93cd82a uniform ivec4 uf_remappedPS[8]; layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4520000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0 @@ -40,7 +40,7 @@ int cubeMapFaceId; R0f = passParameterSem136; R1f = passParameterSem137; R0f.z = (texture(textureUnitPS1, R1f.xy).x); -R2f.xyz = (texture(textureUnitPS0, R1f.xy).xyz * bloomFactor); +R2f.xyz = (texture(textureUnitPS0, R1f.xy).xyz); // 0 R1f.x = intBitsToFloat(0x3f000000); PV0f.y = intBitsToFloat(uf_remappedPS[0].z) * 1.0; @@ -98,5 +98,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); +passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w)*brightnessMultiplier; } diff --git a/Workaround/SonicLostWorld_BrightnessFix/rules.txt b/Workaround/SonicLostWorld_BrightnessFix/rules.txt new file mode 100644 index 00000000..1a418db9 --- /dev/null +++ b/Workaround/SonicLostWorld_BrightnessFix/rules.txt @@ -0,0 +1,4 @@ +[Definition] +titleIds = 0005000010135700,000500001012B100,0005000010128F00,0005000210128F01 +name = "Sonic Lost World - Brightness Fix" +version = 2