shader_type spatial; render_mode blend_mix, depth_draw_never, cull_disabled, unshaded; uniform vec4 tint : source_color = vec4(0.76, 0.91, 0.75, 0.2); uniform float progress : hint_range(0.0, 1.0) = 0.0; uniform float glow_strength : hint_range(0.0, 1.0) = 0.38; void fragment() { float edge_softness = smoothstep(0.0, 0.24, UV.y) * smoothstep(0.0, 0.24, 1.0 - UV.y); float head = progress * 1.18 - 0.08; float tail = head - 0.52; float head_mask = 1.0 - smoothstep(head, head + 0.07, UV.x); float tail_mask = smoothstep(tail - 0.08, tail + 0.03, UV.x); float life_fade = smoothstep(0.0, 0.12, progress) * (1.0 - smoothstep(0.82, 1.0, progress)); float brush_texture = 0.88 + 0.12 * sin(UV.x * 31.0 + UV.y * 5.0); float stroke_alpha = edge_softness * head_mask * tail_mask * life_fade * brush_texture; float glint = exp(-pow((UV.x - head) * 20.0, 2.0)) * edge_softness * life_fade; ALBEDO = tint.rgb; EMISSION = tint.rgb * (glow_strength * stroke_alpha + glint * 0.28); ALPHA = tint.a * stroke_alpha; }