hal/shader/analytic.lisp
Negative values are inside. RADIUS is clamped to the shape's shorter half-extent, so rectangles, roundrects, capsules, and circles share one definition.
Division of two represented quantities.
(name parameters &body body)The minimum of compatible quantities.
The maximum of compatible quantities.
Subtraction or unary negation.
The componentwise absolute value of a raw value.
The componentwise square root of a raw value.
Addition over compatible quantities.
Multiplication and scalar scaling.
(name parameters &body body)Define a reusable typed shader expression with ordinary source syntax. The body is parsed at each call site, so argument types and quantity meanings flow through the same operator protocol as handwritten shader expressions. LET* is lexical inside the function. The definition macro records source; its body does not…
Select and reorder vector components by a designator such as :XYZ or :RGB.
Constrain a quantity between compatible bounds.
(name options &body body)
Small analytic GUI primitives evaluated directly in the fragment shader.