13 lines
276 B
Plaintext
13 lines
276 B
Plaintext
shader_type canvas_item;
|
|
|
|
uniform float threshold : hint_range(0.0, 1.0) = 0.01;
|
|
|
|
void fragment() {
|
|
vec4 tex_color = texture(TEXTURE, UV);
|
|
float brightness = max(tex_color.r, max(tex_color.g, tex_color.b));
|
|
if (brightness < threshold) {
|
|
discard;
|
|
}
|
|
COLOR = tex_color;
|
|
}
|