Files
MaidEngine/shaders/chroma_key.gdshader
gamer147 b9030b7899 Stuff
2026-04-02 19:38:43 -04:00

13 lines
284 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 * COLOR;
}