From 5c77e9b6902843b60c9d19bee8584ac375aa2ec9 Mon Sep 17 00:00:00 2001 From: Rezmason Date: Fri, 22 Oct 2021 22:57:37 -0700 Subject: [PATCH] Renaming a value in highPass.frag --- shaders/highPass.frag | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shaders/highPass.frag b/shaders/highPass.frag index 4f36ebd..11f4d1b 100644 --- a/shaders/highPass.frag +++ b/shaders/highPass.frag @@ -3,9 +3,9 @@ varying vec2 vUV; uniform sampler2D tex; uniform float highPassThreshold; void main() { - vec3 lumaColor = texture2D(tex, vUV).rgb; - if (lumaColor.r < highPassThreshold) lumaColor.r = 0.0; - if (lumaColor.g < highPassThreshold) lumaColor.g = 0.0; - if (lumaColor.b < highPassThreshold) lumaColor.b = 0.0; - gl_FragColor = vec4(lumaColor, 1.0); + vec4 color = texture2D(tex, vUV); + if (color.r < highPassThreshold) color.r = 0.0; + if (color.g < highPassThreshold) color.g = 0.0; + if (color.b < highPassThreshold) color.b = 0.0; + gl_FragColor = color; }