Swapped sprites

This commit is contained in:
gamer147
2026-04-04 22:16:35 -04:00
parent 68d1406632
commit 407b982710
16 changed files with 276 additions and 840 deletions

View File

@@ -1,11 +1,12 @@
shader_type canvas_item;
uniform vec4 key_color : source_color = vec4(0.0, 0.0, 0.0, 1.0);
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) {
float dist = distance(tex_color.rgb, key_color.rgb);
if (dist < threshold) {
discard;
}
COLOR = tex_color * COLOR;