Builtin Library
- ..
- .metadata17 B
- README.md620 B
- bindings.yaml153 B
- shader.wgsl14.2 KB
README.md
compute_terrain
GPU voxel-terrain generation: produces block data for a chunk. One thread per
(x, z) column, filling the full Y column with block types (air, grass, dirt,
stone, sand, water, wood, leaves, snow).
Bindings (see bindings.yaml): params (read array<f32> — [chunkSizeX, chunkHeight, chunkSizeZ, chunkWorldX, chunkWorldZ, seaLevel, seed, 0]), blocks
(read_write array<u32>, indexed [z * H * S + y * S + x]).
Usage: dispatch by identity with compute.dispatch("@builtin::shaders.compute_terrain", ...) —
it resolves to the shader's stable guid and auto-compiles on first use (no setup).