From 24785ee0e7f33b4cea41a23274533bab71b07826 Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Fri, 26 Apr 2019 21:12:09 +0200 Subject: [PATCH] [BotW] Fix Clarity pack bug found by charmics Should fix a greenish tone that would appear if you turn up the curves contrast too high. --- .../37040a485a29d54e_00000000000003c9_ps.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Enhancements/BreathOfTheWild_Clarity/37040a485a29d54e_00000000000003c9_ps.txt b/Enhancements/BreathOfTheWild_Clarity/37040a485a29d54e_00000000000003c9_ps.txt index 531736ed..3bdd2e80 100644 --- a/Enhancements/BreathOfTheWild_Clarity/37040a485a29d54e_00000000000003c9_ps.txt +++ b/Enhancements/BreathOfTheWild_Clarity/37040a485a29d54e_00000000000003c9_ps.txt @@ -1055,12 +1055,12 @@ vec3 ACESFilm(vec3 color) { vec3 CurvesPass(vec3 inputColor) { vec3 colorInput = inputColor; - float Contrast_blend = Contrast * 2.0; //I multiply by two to give it a strength closer to the other curves. - vec3 x = colorInput.rgb; //if the curve should be applied to both Luma and Chroma - x = x * (x * (1.5 - x) + 0.5); //horner form - fastest version - vec3 color = x; //if the curve should be applied to both Luma and Chroma - colorInput.rgb = mix(colorInput.rgb, color, Contrast_blend); //Blend by Contrast - return colorInput; + float Contrast_blend = Contrast * 1.5; + vec3 x = colorInput.rgb; + x = x - 0.5; + x = ( x / (0.5 + abs(x)) ) + 0.5; + vec3 color = x; + colorInput.rgb = mix(colorInput.rgb, color, Contrast_blend); } //TECHNICOLOR2