ClarityGFX

Fixed a issue where Gamma would not return any value.
This commit is contained in:
Jamie 2017-11-09 22:46:06 -08:00
parent 20ea9b085a
commit a1f07fb370

View File

@ -173,22 +173,22 @@ vec3 Technicolor2(vec3 inputColor) {
vec3 LiftGammaGainPass( vec3 colorInput ) vec3 LiftGammaGainPass( vec3 colorInput )
{ {
// -- Get input -- // -- Get input --
vec3 color = colorInput.rgb; vec3 color = colorInput;
// -- Lift -- // -- Lift --
color = color * (1.5-0.5 * RGB_Lift) + 0.5 * RGB_Lift - 0.5; color = color * (1.5-0.5 * RGB_Lift) + 0.5 * RGB_Lift - 0.5;
color = clamp(color, 0.0, 1. ); //isn't strictly necessary, but doesn't cost performance. color = clamp(color, 0.0, 1.0); //isn't strictly necessary, but doesn't cost performance.
// -- Gain -- // -- Gain --
color *= RGB_Gain; color *= RGB_Gain;
// -- Gamma -- // -- Gamma --
colorInput.rgb = pow(color, 1.0 / RGB_Gamma); //Gamma color = pow(color, 1.0 / RGB_Gamma); //Gamma
// -- Return output -- // -- Return output --
//return (colorInput);
return clamp(color, 0.0, 1. ); return clamp(color, 0.0, 1.0);
} }
//LumaShapening //LumaShapening