Commit 46f26770 by leonwind Committed by microkatz

Remove clamp function in contrast fragment shader.

* OpenGL automatically clamps the output colors to the [0, 1] interval.

PiperOrigin-RevId: 465071999
(cherry picked from commit 2347db5d)
parent f8aaed1a
...@@ -26,8 +26,8 @@ void main() { ...@@ -26,8 +26,8 @@ void main() {
vec4 inputColor = texture2D(uTexSampler, vTexSamplingCoord); vec4 inputColor = texture2D(uTexSampler, vTexSamplingCoord);
gl_FragColor = vec4( gl_FragColor = vec4(
clamp(uContrastFactor * (inputColor.r - 0.5) + 0.5, 0.0, 1.0), uContrastFactor * (inputColor.r - 0.5) + 0.5,
clamp(uContrastFactor * (inputColor.g - 0.5) + 0.5, 0.0, 1.0), uContrastFactor * (inputColor.g - 0.5) + 0.5,
clamp(uContrastFactor * (inputColor.b - 0.5) + 0.5, 0.0, 1.0), uContrastFactor * (inputColor.b - 0.5) + 0.5,
inputColor.a); inputColor.a);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment