From d6750e35f2188a5998aea189f5984cb62efc14e2 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 25 Feb 2018 14:58:51 -0800 Subject: [PATCH] [SLW] disable grass --- .../061c4a3b19113538_0000000000000000_vs.txt | 34 ++++++++++++++++++ .../289fad0a94a60a46_0000000000000000_vs.txt | 35 +++++++++++++++++++ .../7658289ba65cb755_00000000000003c9_ps.txt | 8 +++-- .../971a39bb79e32fd1_0000000000001e71_ps.txt | 8 +++-- .../e1d2a971c93cd82a_0000000000001e71_ps.txt | 8 +++-- .../SonicLostWorld_BrightnessFix/rules.txt | 2 +- 6 files changed, 85 insertions(+), 10 deletions(-) create mode 100644 Workaround/SonicLostWorld_BrightnessFix/061c4a3b19113538_0000000000000000_vs.txt create mode 100644 Workaround/SonicLostWorld_BrightnessFix/289fad0a94a60a46_0000000000000000_vs.txt diff --git a/Workaround/SonicLostWorld_BrightnessFix/061c4a3b19113538_0000000000000000_vs.txt b/Workaround/SonicLostWorld_BrightnessFix/061c4a3b19113538_0000000000000000_vs.txt new file mode 100644 index 00000000..dafe65b5 --- /dev/null +++ b/Workaround/SonicLostWorld_BrightnessFix/061c4a3b19113538_0000000000000000_vs.txt @@ -0,0 +1,34 @@ +#version 420 +#extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable +#extension GL_ARB_shading_language_packing : enable +// shader 061c4a3b19113538 +// grass shader - WINDY HILL 1/2/4, TROPICAL COAST 1/2/4, SILENT FOREST 1/2/4, ETC. +// dumped on cemu 1.11.5 +uniform ivec4 uf_remappedVS[20]; +uniform vec2 uf_windowSpaceToClipSpaceTransform; +uniform float uf_alphaTestRef; +layout(location = 0) in uvec4 attrDataSem0; +layout(location = 1) in uvec4 attrDataSem8; +layout(location = 2) in uvec4 attrDataSem12; +layout(location = 3) in uvec4 attrDataSem13; +out gl_PerVertex +{ + vec4 gl_Position; + float gl_PointSize; +}; +layout(location = 0) out vec4 passParameterSem136; +layout(location = 1) out vec4 passParameterSem131; +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() +{ + +} diff --git a/Workaround/SonicLostWorld_BrightnessFix/289fad0a94a60a46_0000000000000000_vs.txt b/Workaround/SonicLostWorld_BrightnessFix/289fad0a94a60a46_0000000000000000_vs.txt new file mode 100644 index 00000000..0efd09b4 --- /dev/null +++ b/Workaround/SonicLostWorld_BrightnessFix/289fad0a94a60a46_0000000000000000_vs.txt @@ -0,0 +1,35 @@ +#version 420 +#extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable +#extension GL_ARB_shading_language_packing : enable +// shader 289fad0a94a60a46 +// grass shader - WINDY HILL 3, SILENT FOREST 3 +// dumped on cemu 1.11.5 +uniform ivec4 uf_remappedVS[18]; +uniform vec2 uf_windowSpaceToClipSpaceTransform; +uniform float uf_alphaTestRef; +layout(location = 0) in uvec4 attrDataSem0; +layout(location = 1) in uvec4 attrDataSem8; +layout(location = 2) in uvec4 attrDataSem12; +layout(location = 3) in uvec4 attrDataSem13; +out gl_PerVertex +{ + vec4 gl_Position; + float gl_PointSize; +}; +layout(location = 0) out vec4 passParameterSem136; +layout(location = 1) out vec4 passParameterSem131; +layout(location = 2) out vec4 passParameterSem142; +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() +{ + +} diff --git a/Workaround/SonicLostWorld_BrightnessFix/7658289ba65cb755_00000000000003c9_ps.txt b/Workaround/SonicLostWorld_BrightnessFix/7658289ba65cb755_00000000000003c9_ps.txt index 58cc0d5f..6ac903be 100644 --- a/Workaround/SonicLostWorld_BrightnessFix/7658289ba65cb755_00000000000003c9_ps.txt +++ b/Workaround/SonicLostWorld_BrightnessFix/7658289ba65cb755_00000000000003c9_ps.txt @@ -1,10 +1,12 @@ #version 420 #extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable // shader 7658289ba65cb755 -const float brightnessMultiplier = (16.0 / 9.0); +// "dark overlay" +// dumped on cemu 1.11.5 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 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x171f8800 res 1x1x1 dim 1 tm: 2 format 0806 compSel: 3 0 1 2 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 0 +layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x1786d800 res 1x1x1 dim 1 tm: 2 format 0806 compSel: 3 0 1 2 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 0 layout(location = 0) in vec4 passParameterSem137; layout(location = 0) out vec4 passPixelColor0; uniform vec2 uf_fragCoordScale; @@ -54,5 +56,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)*brightnessMultiplier; +passPixelColor0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w)* (16.0/9.0); } diff --git a/Workaround/SonicLostWorld_BrightnessFix/971a39bb79e32fd1_0000000000001e71_ps.txt b/Workaround/SonicLostWorld_BrightnessFix/971a39bb79e32fd1_0000000000001e71_ps.txt index 695c3056..d696cb16 100644 --- a/Workaround/SonicLostWorld_BrightnessFix/971a39bb79e32fd1_0000000000001e71_ps.txt +++ b/Workaround/SonicLostWorld_BrightnessFix/971a39bb79e32fd1_0000000000001e71_ps.txt @@ -1,11 +1,13 @@ #version 420 #extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable // shader 971a39bb79e32fd1 -const float brightnessMultiplier = (16.0 / 9.0); +// "dark overlay" +// dumped on cemu 1.11.5 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 layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf48a8000 res 1280x720x1 dim 6 tm: 4 format 0011 compSel: 0 0 0 0 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x171f8800 res 1x1x1 dim 1 tm: 2 format 0806 compSel: 3 0 1 2 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 0 +layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x1786d800 res 1x1x1 dim 1 tm: 2 format 0806 compSel: 3 0 1 2 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 0 layout(location = 0) in vec4 passParameterSem136; layout(location = 1) in vec4 passParameterSem137; layout(location = 0) out vec4 passPixelColor0; @@ -112,5 +114,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)*brightnessMultiplier; +passPixelColor0 = vec4(R3f.x, R3f.y, R3f.z, R3f.w)* (16.0/9.0); } diff --git a/Workaround/SonicLostWorld_BrightnessFix/e1d2a971c93cd82a_0000000000001e71_ps.txt b/Workaround/SonicLostWorld_BrightnessFix/e1d2a971c93cd82a_0000000000001e71_ps.txt index b17b0a6f..d6162723 100644 --- a/Workaround/SonicLostWorld_BrightnessFix/e1d2a971c93cd82a_0000000000001e71_ps.txt +++ b/Workaround/SonicLostWorld_BrightnessFix/e1d2a971c93cd82a_0000000000001e71_ps.txt @@ -1,11 +1,13 @@ #version 420 #extension GL_ARB_texture_gather : enable +#extension GL_ARB_separate_shader_objects : enable // shader e1d2a971c93cd82a -const float brightnessMultiplier = (16.0 / 9.0); +// "dark overlay" +// dumped on cemu 1.11.5 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 layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf48a8000 res 1280x720x1 dim 6 tm: 4 format 0011 compSel: 0 0 0 0 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x171f8800 res 1x1x1 dim 1 tm: 2 format 0806 compSel: 3 0 1 2 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 0 +layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x1786d800 res 1x1x1 dim 1 tm: 2 format 0806 compSel: 3 0 1 2 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 0 layout(location = 0) in vec4 passParameterSem136; layout(location = 1) in vec4 passParameterSem137; layout(location = 0) out vec4 passPixelColor0; @@ -98,5 +100,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)*brightnessMultiplier; +passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w)* (16.0/9.0); } diff --git a/Workaround/SonicLostWorld_BrightnessFix/rules.txt b/Workaround/SonicLostWorld_BrightnessFix/rules.txt index 1a418db9..31709d1d 100644 --- a/Workaround/SonicLostWorld_BrightnessFix/rules.txt +++ b/Workaround/SonicLostWorld_BrightnessFix/rules.txt @@ -1,4 +1,4 @@ [Definition] titleIds = 0005000010135700,000500001012B100,0005000010128F00,0005000210128F01 -name = "Sonic Lost World - Brightness Fix" +name = "Sonic Lost World - Display Fixes" version = 2