newlon/assets/shaders/radial_progress.gdshader
2025-07-23 18:08:29 +05:00

20 lines
320 B
Text

shader_type canvas_item;
uniform vec4 region_rect;
uniform float progress;
void fragment() {
if (progress > 0.9999)
{
vec4 text = texture(TEXTURE,UV);
COLOR = text;
}
vec2 c = vec2(0.5)-UV;
float d = atan(c.x,c.y)+PI;
if (d > progress*TAU)
{
discard;
}
vec4 text = texture(TEXTURE,UV);
COLOR = text;
}