From f833b49c25a2b57a4a9629d5120a5c1b6396da0a Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Mon, 23 Jan 2023 13:49:48 +0100 Subject: [PATCH] :wrench: Add more color to TV Glitch effect --- resources/shaders/tv-glitch.frag | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/shaders/tv-glitch.frag b/resources/shaders/tv-glitch.frag index 4d5abb8..049e130 100644 --- a/resources/shaders/tv-glitch.frag +++ b/resources/shaders/tv-glitch.frag @@ -100,7 +100,8 @@ void main() { float lrMask = 1.0 - smoothstep(0.0, 1.0, clamp((lrProg - lr) / BLUR_WIDTH, 0.0, 1.0)); float ffMask = 1.0 - smoothstep(0.0, 1.0, ffProg); - // Assemble the final alpha value. + // Assemble the final color value. + oColor.rgb = mix(oColor.rgb, uColor * oColor.a, smoothstep(0.0, 1.0, tvProgress)); float mask = tbMask * lrMask * ffMask; oColor.a *= mask;