Skip to main content

Module shape

Module shape 

Source
Expand description

Shape discriminant carried in the instance so one quad pipeline draws every SDF kind. Kept as a u32 (not a Rust enum) so it is GPU-uploadable verbatim and matches the SHAPE_* constants in sdf.wgsl.

Constants§

CIRCLE
A filled, anti-aliased disc.
DIAMOND
A filled diamond (square rotated 45°).
RING
An annulus (filled ring with a hole) — inner is the hole radius.
SQUARE
A filled axis-aligned rounded square marker (inner = corner radius).
TRIANGLE
A filled upward equilateral-ish triangle marker.