From 728a3fee949b54cc5086936c598752631a9a4f02 Mon Sep 17 00:00:00 2001 From: oc1024 Date: Wed, 23 Jan 2019 11:53:25 -0300 Subject: [PATCH] upper limit is now full alpha --- effects/lumakey.frag | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/effects/lumakey.frag b/effects/lumakey.frag index 3e7b0d266..3ded5dac5 100644 --- a/effects/lumakey.frag +++ b/effects/lumakey.frag @@ -15,7 +15,13 @@ void main(void) { luma /= 2.0; - texture_color.a = (luma >= loc && luma <= hic) ? luma : 0.0; + if (luma > hic) { + texture_color.a = 1.0; + } else if (luma < loc) { + texture_color.a = 0.0; + } else { + texture_color.a = luma; + } gl_FragColor = texture_color; -} \ No newline at end of file +}