Files
imnotsick/Scenes/UI/game_over.gdshader
2026-05-19 18:34:34 +02:00

12 lines
392 B
Plaintext

shader_type canvas_item;
uniform sampler2D noise_tex;
uniform float progress : hint_range(0.0, 1.0) = 0.0;
uniform float softness : hint_range(0.001, 0.2) = 0.05;
void fragment() {
vec4 img = texture(TEXTURE, UV);
float noise = texture(noise_tex, UV).r;
float alpha = 1.0 - smoothstep(progress - softness, progress + softness, noise);
COLOR = vec4(img.rgb, img.a * alpha);
}