Selection outlines highlight interactive objects — from RTS unit selection to RPG item pickups. This shader demonstrates two approaches: a thin outline that samples the shape mask at offset positions to detect edges, and a thick glow using distance-based falloff from the shape boundary. The outline color cycles and pulses over time to draw attention, a common game UI pattern.
Key Concepts
edge detection sampling
distance-based glow
animated outline
selection feedback
Try this shader live in the Shader Sandbox editor with real-time preview.