shaderlib: Shorten lowpass filter example

This commit is contained in:
ChaoticByte 2025-01-07 22:50:15 +01:00
parent 974c40fcb4
commit 6c48c9fe72
No known key found for this signature in database

View file

@ -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;
}