Log inGet started
Package

compute_tree_placement.computeShader

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

compute_tree_placement

GPU vegetation placement over a terrain heightmap. One thread per (x, z) cell: reads the height, computes local slope, and uses noise-based density to pick what grows (0 = nothing, 1 = tall pine, 2 = small pine, 3 = shrub, 4 = rock).

Bindings (see bindings.yaml): params (read array<f32> — [gridSize, worldExtent, seed, treeLine, slopeLimit, shrubLine, ...]), heights (read array<f32>), placement (read_write array<f32>, the per-cell type code).

Usage: dispatch by identity with compute.dispatch("@builtin::shaders.compute_tree_placement", ...) — it resolves to the shader's stable guid and auto-compiles on first use (no setup).