From 6c48c9fe72e4101acc13e7e105389e7a429f7760 Mon Sep 17 00:00:00 2001 From: ChaoticByte Date: Tue, 7 Jan 2025 22:50:15 +0100 Subject: [PATCH] shaderlib: Shorten lowpass filter example --- examples/lowpass.gdshader | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/lowpass.gdshader b/examples/lowpass.gdshader index d2d82c5..2e235c8 100644 --- a/examples/lowpass.gdshader +++ b/examples/lowpass.gdshader @@ -3,13 +3,11 @@ shader_type canvas_item; //!load ./swamp.jpg // Settings -const float threshold = 0.5; +const float threshold = 0.6; // void fragment() { vec4 tex = texture(TEXTURE , UV); - COLOR.r = min(tex.r, threshold); - COLOR.g = min(tex.g, threshold); - COLOR.b = min(tex.b, threshold); + COLOR.rgb = min(tex.rgb, vec3(threshold)); COLOR.a = tex.a; }