Commit 30fab8c0 by leonwind Committed by Marc Baechinger

Remove clamp function in contrast fragment shader.

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

PiperOrigin-RevId: 465071999
parent 40a28d5a
......@@ -26,8 +26,8 @@ void main() {
vec4 inputColor = texture2D(uTexSampler, vTexSamplingCoord);
gl_FragColor = vec4(
clamp(uContrastFactor * (inputColor.r - 0.5) + 0.5, 0.0, 1.0),
clamp(uContrastFactor * (inputColor.g - 0.5) + 0.5, 0.0, 1.0),
clamp(uContrastFactor * (inputColor.b - 0.5) + 0.5, 0.0, 1.0),
uContrastFactor * (inputColor.r - 0.5) + 0.5,
uContrastFactor * (inputColor.g - 0.5) + 0.5,
uContrastFactor * (inputColor.b - 0.5) + 0.5,
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