Fragmented/examples/lowpass.gdshader

14 lines
209 B
Text
Raw Normal View History

2024-06-04 18:31:04 +02:00
shader_type canvas_item;
//!load ./swamp.jpg
2024-06-04 18:31:04 +02:00
// Settings
const float threshold = 0.6;
2024-06-04 18:31:04 +02:00
//
void fragment() {
vec4 tex = texture(TEXTURE , UV);
COLOR.rgb = min(tex.rgb, vec3(threshold));
2024-06-04 18:31:04 +02:00
COLOR.a = tex.a;
}