Builtin Library
- ..
- README.md1.0 KB
- bindings.yaml2.3 KB
- shader.wgsl5.3 KB
README.md
make
Builds the elements and the primitives of a geometry from a count per owner and
a shape (points, strip, fan, grid, ring, the SHAPE specialization).
The result is the columns a Geometry holds: P over the points, vertex_pt over
the vertices (the point each reads), and prim_vstart / prim_vcount over the
primitives (each one's run of vertices). All indices are into the result, so
owners' pieces sit end to end with their links already offset.
It runs as two passes of one shader (PASS): sizes writes the points,
vertices and primitives each owner makes; after a prefix sum of each component
into bases, fill writes every element once, found by a binary search over the
bases. Exact: each output element has one writer. The shape's layout is stated
at the top of bindings.yaml; grid takes its second axis from the across
param (default 2, at least 2).
core.make runs it: the sizes pass, a scan of the sizes, then the fill
pass, and the columns become the Geometry the node answers.