home/ atoms/ sdf-vs-immediate-mode-paradigm

SDFs and immediate-mode drawing are two distinct shape paradigms: field-based vs path-based

There are two fundamentally different ways to define shapes in live visuals. The shader-world SDF model defines shapes as distance fields — implicit, resolution-independent, combinable by arithmetic. The immediate-mode canvas paradigm (P5LIVE) adds the opposite: vector-drawing (explicit stroked/filled bezier paths) and typography (text/glyph geometry). When the intent is free-form paths, hand-drawn strokes, or type, the immediate-mode approach is the right paradigm; SDFs cannot natively express free-form paths or text glyphs. Choosing between paradigms is a framework decision, not just a style decision.

Examples

A circular logo in GLSL uses length(uv)-r (SDF). The same shape as a stroke in P5LIVE uses beginShape/vertex/endShape. Text is possible only in the immediate-mode path.

Assessment

Explain why text cannot be realized as an SDF in a fragment shader and which framework/paradigm enables it. Name one shape operation that is native to SDFs but difficult in immediate-mode.

“**Alternative paradigm — immediate-mode.** The field/SDF model is the shader-world way. P5LIVE adds the opposite: `vector-drawing` (explicit stroked/filled bezier paths, not a distance field) and `typography`”
context/ · L2-composer/visual/form.md · chunk 1