Replacing step with smoothstep at an SDF boundary adds anti-aliasing and glow effects
The step(edge, x) function produces a hard 0/1 transition that results in jagged aliased edges on SDF shapes. Replacing it with smoothstep(edge0, edge1, x) performs Hermite interpolation, producing a smooth gradient across a narrow band straddling the edge. Choosing edge0 slightly inside the shape and edge1 slightly outside creates a one-to-few pixel anti-aliased fringe. The same technique produces neon glow or emissive halo effects by widening the smoothstep range: values just outside the shape become partially lit rather than fully dark. The GLSL spec says smoothstep is undefined when edge0 >= edge1, but in practice it still computes the Hermite result — though this should not be relied on for portability. smoothstep is one of the most-used functions in shader programming.
Examples
// Hard edge:
float col = step(0.0, -d);
// Anti-aliased edge:
float col = smoothstep(0.005, -0.005, d);
// Glow: widen the range
float col = smoothstep(0.1, -0.01, d);
Assessment
Replace a hard-edge circle rendering with smoothstep. Adjust the edge0/edge1 values to (a) make the anti-aliasing barely visible and (b) create a visible glow halo several pixels wide.