[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.
This commit is contained in:
Crementif 2019-04-26 21:12:09 +02:00
parent 72da6b62bb
commit 24785ee0e7
No known key found for this signature in database
GPG Key ID: F9BA5311478A0564

View File

@ -1055,12 +1055,12 @@ vec3 ACESFilm(vec3 color) {
vec3 CurvesPass(vec3 inputColor) { vec3 CurvesPass(vec3 inputColor) {
vec3 colorInput = inputColor; vec3 colorInput = inputColor;
float Contrast_blend = Contrast * 2.0; //I multiply by two to give it a strength closer to the other curves. float Contrast_blend = Contrast * 1.5;
vec3 x = colorInput.rgb; //if the curve should be applied to both Luma and Chroma vec3 x = colorInput.rgb;
x = x * (x * (1.5 - x) + 0.5); //horner form - fastest version x = x - 0.5;
vec3 color = x; //if the curve should be applied to both Luma and Chroma x = ( x / (0.5 + abs(x)) ) + 0.5;
colorInput.rgb = mix(colorInput.rgb, color, Contrast_blend); //Blend by Contrast vec3 color = x;
return colorInput; colorInput.rgb = mix(colorInput.rgb, color, Contrast_blend);
} }
//TECHNICOLOR2 //TECHNICOLOR2