Figments-of-the-Night/scripts/shaders/dissolve.gdshader
Gerard Gascón b99855351d init
2025-04-24 17:23:34 +02:00

11 lines
No EOL
355 B
Text

shader_type canvas_item;
uniform sampler2D dissolve_texture : hint_default_transparent;
uniform float dissolve_value : hint_range(0,1);
void fragment(){
vec4 main_texture = texture(TEXTURE, UV);
vec4 noise_texture = texture(dissolve_texture, UV);
main_texture.a *= floor(dissolve_value + min(1, noise_texture.x));
COLOR = main_texture;
}