shader_type spatial; uniform float max_width = .1; uniform float marker_length = .5; uniform float pulse_speed = 4.; void fragment() { ALBEDO = vec3(15., 0., 0.); vec2 uv = abs(2. * UV.xy - 1.); float m_length = marker_length / max_width; float anim = sin(TIME * pulse_speed) * .5 + 1.; float alpha = step( 1. - max_width * anim, max(uv.x, uv.y)) * step(1. - max_width * m_length, min(uv.x, uv.y) ); ALPHA = alpha; }