Builtin Library
- ..
- .metadata17 B
- README.md684 B
- bindings.yaml367 B
- shader.wgsl5.0 KB
README.md
compute_minecraft_mesh
Generates a face-culled mesh for a Minecraft-style chunk. One thread per block: checks 6 neighbors and emits quads for exposed faces into the output vertex and index buffers.
Bindings (see bindings.yaml): blocks (read array<u32>), params (read
array<f32> — [sizeX, sizeY, sizeZ, ...]), counters (read_write
array<atomic<u32>> — [vertexCount, indexCount]), vertices (read_write
array<f32>, 8 floats/vertex), indices (read_write array<u32>).
Usage: dispatch by identity with compute.dispatch("@builtin::shaders.compute_minecraft_mesh", ...) —
it resolves to the shader's stable guid and auto-compiles on first use (no setup).