From 1ca736e0da9cffa6133fbc83c4bf058a15f6acd4 Mon Sep 17 00:00:00 2001 From: M&M Date: Fri, 5 Feb 2021 16:23:12 -0800 Subject: [PATCH] [Sonic Lost World] Turn Disable Post Processing into a new Darkness pack --- .../1adfa527e4ea7f40_0000000000001e49_ps.txt | 3 ++- .../3c6c7691f6e2f2e4_0000000000001e49_ps.txt | 7 ++++--- .../4fab679c75795f90_00000000000003c9_ps.txt | 7 ++++--- .../91f43f263091c56d_0000000000079249_ps.txt | 7 ++++--- src/SonicLostWorld/Workarounds/Darkness/rules.txt | 6 ++++++ .../Workarounds/DisablePostProcessing/rules.txt | 6 ------ 6 files changed, 20 insertions(+), 16 deletions(-) rename src/SonicLostWorld/Workarounds/{DisablePostProcessing => Darkness}/1adfa527e4ea7f40_0000000000001e49_ps.txt (95%) rename src/SonicLostWorld/Workarounds/{DisablePostProcessing => Darkness}/3c6c7691f6e2f2e4_0000000000001e49_ps.txt (94%) rename src/SonicLostWorld/Workarounds/{DisablePostProcessing => Darkness}/4fab679c75795f90_00000000000003c9_ps.txt (95%) rename src/SonicLostWorld/Workarounds/{DisablePostProcessing => Darkness}/91f43f263091c56d_0000000000079249_ps.txt (97%) create mode 100644 src/SonicLostWorld/Workarounds/Darkness/rules.txt delete mode 100644 src/SonicLostWorld/Workarounds/DisablePostProcessing/rules.txt diff --git a/src/SonicLostWorld/Workarounds/DisablePostProcessing/1adfa527e4ea7f40_0000000000001e49_ps.txt b/src/SonicLostWorld/Workarounds/Darkness/1adfa527e4ea7f40_0000000000001e49_ps.txt similarity index 95% rename from src/SonicLostWorld/Workarounds/DisablePostProcessing/1adfa527e4ea7f40_0000000000001e49_ps.txt rename to src/SonicLostWorld/Workarounds/Darkness/1adfa527e4ea7f40_0000000000001e49_ps.txt index b9715fa1..9dfaa477 100644 --- a/src/SonicLostWorld/Workarounds/DisablePostProcessing/1adfa527e4ea7f40_0000000000001e49_ps.txt +++ b/src/SonicLostWorld/Workarounds/Darkness/1adfa527e4ea7f40_0000000000001e49_ps.txt @@ -2,6 +2,7 @@ #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable // shader 1adfa527e4ea7f40 +// Silent Forest Zone 2 // start of shader inputs/outputs, predetermined by Cemu. Do not touch #ifdef VULKAN #define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) @@ -85,5 +86,5 @@ PV1i.z = R123i.z; // 4 R3i.xyz = floatBitsToInt(vec3(intBitsToFloat(R0i.x),intBitsToFloat(R0i.y),intBitsToFloat(R0i.z)) + vec3(intBitsToFloat(PV1i.z),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.x))); // export -//passPixelColor0 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w)); +passPixelColor0 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w)) * 1.6666666667; } diff --git a/src/SonicLostWorld/Workarounds/DisablePostProcessing/3c6c7691f6e2f2e4_0000000000001e49_ps.txt b/src/SonicLostWorld/Workarounds/Darkness/3c6c7691f6e2f2e4_0000000000001e49_ps.txt similarity index 94% rename from src/SonicLostWorld/Workarounds/DisablePostProcessing/3c6c7691f6e2f2e4_0000000000001e49_ps.txt rename to src/SonicLostWorld/Workarounds/Darkness/3c6c7691f6e2f2e4_0000000000001e49_ps.txt index 299fadd3..3040d5cb 100644 --- a/src/SonicLostWorld/Workarounds/DisablePostProcessing/3c6c7691f6e2f2e4_0000000000001e49_ps.txt +++ b/src/SonicLostWorld/Workarounds/Darkness/3c6c7691f6e2f2e4_0000000000001e49_ps.txt @@ -2,6 +2,7 @@ #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable // shader 3c6c7691f6e2f2e4 +// Stages // start of shader inputs/outputs, predetermined by Cemu. Do not touch #ifdef VULKAN #define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) @@ -71,8 +72,8 @@ R123f.y = (mul_nonIEEE(PV0f.x,R1f.w) + R2f.y); PV1f.y = R123f.y; R123f.z = (mul_nonIEEE(PV0f.y,R1f.w) + R2f.x); PV1f.z = R123f.z; -// 2 -R3f.xyz = vec3(R0f.x,R0f.y,R0f.z) + vec3(PV1f.z,PV1f.y,PV1f.x); +// 2 - Tonemapping +R3f.xyz = vec3(R0f.x,R0f.y,R0f.z) + vec3(PV1f.z,PV1f.y,PV1f.x) * 1.6666666667; // export -//passPixelColor0 = vec4(R3f.x, R3f.y, R3f.z, R3f.w); +passPixelColor0 = vec4(R3f.x, R3f.y, R3f.z, R3f.w); } diff --git a/src/SonicLostWorld/Workarounds/DisablePostProcessing/4fab679c75795f90_00000000000003c9_ps.txt b/src/SonicLostWorld/Workarounds/Darkness/4fab679c75795f90_00000000000003c9_ps.txt similarity index 95% rename from src/SonicLostWorld/Workarounds/DisablePostProcessing/4fab679c75795f90_00000000000003c9_ps.txt rename to src/SonicLostWorld/Workarounds/Darkness/4fab679c75795f90_00000000000003c9_ps.txt index fc0c8840..38a36678 100644 --- a/src/SonicLostWorld/Workarounds/DisablePostProcessing/4fab679c75795f90_00000000000003c9_ps.txt +++ b/src/SonicLostWorld/Workarounds/Darkness/4fab679c75795f90_00000000000003c9_ps.txt @@ -2,6 +2,7 @@ #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable // shader 4fab679c75795f90 +// World Map // start of shader inputs/outputs, predetermined by Cemu. Do not touch #ifdef VULKAN #define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) @@ -53,12 +54,12 @@ int cubeMapFaceId; R0f = passParameterSem136; R1f.xyz = (texture(textureUnitPS3, R0f.xy).xyz); R0f.xyz = (texture(textureUnitPS0, R0f.xy).xyz); -// 0 +// 0 - Tonemapping backupReg0f = R0f.x; backupReg1f = R0f.y; backupReg2f = R0f.z; -R0f.xyz = vec3(R1f.x,R1f.y,R1f.z) + vec3(backupReg0f,backupReg1f,backupReg2f); +R0f.xyz = vec3(R1f.x,R1f.y,R1f.z) + vec3(backupReg0f,backupReg1f,backupReg2f) * 2; R0f.w = 1.0; // export -//passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); +passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); } diff --git a/src/SonicLostWorld/Workarounds/DisablePostProcessing/91f43f263091c56d_0000000000079249_ps.txt b/src/SonicLostWorld/Workarounds/Darkness/91f43f263091c56d_0000000000079249_ps.txt similarity index 97% rename from src/SonicLostWorld/Workarounds/DisablePostProcessing/91f43f263091c56d_0000000000079249_ps.txt rename to src/SonicLostWorld/Workarounds/Darkness/91f43f263091c56d_0000000000079249_ps.txt index e1768e9c..dc7841db 100644 --- a/src/SonicLostWorld/Workarounds/DisablePostProcessing/91f43f263091c56d_0000000000079249_ps.txt +++ b/src/SonicLostWorld/Workarounds/Darkness/91f43f263091c56d_0000000000079249_ps.txt @@ -2,6 +2,7 @@ #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable // shader 91f43f263091c56d +// Stages with heat waves // start of shader inputs/outputs, predetermined by Cemu. Do not touch #ifdef VULKAN #define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) @@ -131,8 +132,8 @@ PV1f.y = R123f.y; PV0f.x = PV1f.y * intBitsToFloat(0x3e22f983); // 13 PS1f = cos((PV0f.x)/0.1591549367); -// 14 -R5f.x = (mul_nonIEEE(PS1f,intBitsToFloat(uf_remappedPS[2].w)) + 1.0); +// 14 - Tonemapping +R5f.x = ((mul_nonIEEE(PS1f,intBitsToFloat(uf_remappedPS[2].w)) + 1.0) * 1.6666666667); PV0f.y = mul_nonIEEE(PS1f, R126f.x); PV0f.z = mul_nonIEEE(PS1f, R127f.y); // 15 @@ -205,5 +206,5 @@ R7f.x = (mul_nonIEEE(PV1f.w,R5f.x) + R6f.x); R7f.y = (mul_nonIEEE(PV1f.z,R5f.x) + R6f.y); R7f.z = (mul_nonIEEE(PV1f.y,R5f.x) + R6f.z); // export -//passPixelColor0 = vec4(R7f.x, R7f.y, R7f.z, R7f.w); +passPixelColor0 = vec4(R7f.x, R7f.y, R7f.z, R7f.w); } diff --git a/src/SonicLostWorld/Workarounds/Darkness/rules.txt b/src/SonicLostWorld/Workarounds/Darkness/rules.txt new file mode 100644 index 00000000..3aa735ed --- /dev/null +++ b/src/SonicLostWorld/Workarounds/Darkness/rules.txt @@ -0,0 +1,6 @@ +[Definition] +titleIds = 0005000010135700,000500001012B100,0005000010128F00 +name = Disable Post Processing Effects +path = "Sonic Lost World/Workarounds/Darkness" +description = Brightens up the game to work around broken tonemapping in Cemu.|Some stages will still be darker than they should, but is overall much better than before.||Made by M&&M. +version = 6 diff --git a/src/SonicLostWorld/Workarounds/DisablePostProcessing/rules.txt b/src/SonicLostWorld/Workarounds/DisablePostProcessing/rules.txt deleted file mode 100644 index 6bca954d..00000000 --- a/src/SonicLostWorld/Workarounds/DisablePostProcessing/rules.txt +++ /dev/null @@ -1,6 +0,0 @@ -[Definition] -titleIds = 0005000010135700,000500001012B100,0005000010128F00 -name = Disable Post Processing Effects -path = "Sonic Lost World/Workarounds/Disable Post Processing Effects" -description = Disables the game's post processing effects, making it overall appear not so dark but at the cost of bloom, depth of field, heat waves and other effects.|Some stages will either appear either brighter or darker than they should.||Made by M&&M. -version = 6