Cold Start
- ..
- .metadata17 B
- README.md898 B
- bindings.yaml365 B
- shader.wgsl7.6 KB
README.md
snow_carve
Puts the snow surface onto the clipmap mesh, one thread per vertex. Each vertex looks the surface up by where it is — bilinear reads of a coarse landform buffer and a fine deformation buffer at its world XZ — rather than by which vertex it is.
That indirection is the whole point. Sampling by vertex index welds the field's resolution to the mesh's vertex count, so a 7 cm ski track forces 9 cm cells across the entire surface. Sampling by position lets the deformation field be as fine as the track needs while the mesh carries only the vertices the frame can afford, and lets the mesh slide with the action without dragging the snow along with it.
The normal is rebuilt from the same sampled surface, which is what makes a
carved track shadow itself and hold a silhouette. Expects the 32-byte packed
vertex layout: position as three floats, then the normal as snorm8x4.