challenge-editor/res/shader/change_scene.gdshader

13 lines
303 B
Plaintext
Raw Normal View History

2024-09-19 12:04:52 +08:00
shader_type canvas_item;
render_mode unshaded;
uniform float cutoff:hint_range(0.0, 1.0, 0.1);
uniform float smooth_size: hint_range(0.0,1.0,0.1);
uniform sampler2D mask;
void fragment()
{
float value =texture(mask,UV).r;
float alpha =smoothstep(cutoff,cutoff,value);
COLOR=vec4(COLOR.rgb,alpha);
}