Builtin Library
- ..
- README.md754 B
- module.wgsl3.5 KB
README.md
contour_core
The shared WGSL of the dual contouring kernels (contour_cells, contour_crossings,
contour_solve, contour_quads): ZsGrid (samples along x and y, cells
along x, y and z, origin, cell size h), the addressing of a grid of samples
and its cells (zs_sample_index, zs_sample_ijk, zs_cell_index,
zs_cell_ijk, x fastest), the corners of a cell (zs_corner(n), corner n at
(n & 1, (n >> 1) & 1, (n >> 2) & 1)) and its twelve edges (zs_edge_a(e),
zs_edge_b(e): four along x, four along y, four along z), and the least-squares
solve (ZsQef, zs_qef_add, zs_qef_solve) that places a cell's vertex where
the surface normals around it agree.
#include "@builtin::systems.procgen.kernels.contour_core"