Builtin Library
- ..
- .metadata206 B
- README.md781 B
- bindings.yaml1.1 KB
- shader.wgsl2.6 KB
README.md
contour_quads
One quad per grid edge the surface crosses, spanning the four cells around it.
Edge e is the edge of sample e / 3 along axis e % 3. quad_flag[e] is 1
for an edge that owns a quad and quad_v[e] holds its four vertex numbers, wound
so every face points away from the solid. An edge on the grid's boundary, or one
with a cell around it that owns no vertex, owns no quad.
vertex_of[c] is the number of the vertex cell c owns, or below 0 for a cell
that owns none: the inverse map compact writes beside the list of straddling
cells. It reads vals and the grid params as contour_cells does. The
sdf.mesh node compacts quad_flag into the kept quads contour_triangles
splits.
Dispatch over 3 * samples edges. Exact: each edge has one writer.