Builtin Library
- ..
- README.md1.6 KB
- bindings.yaml2.2 KB
- shader.wgsl5.0 KB
README.md
terrain_erode_talus
Debris shed by steep faces and settled at its angle of repose, on a grid of at most a few hundred cells a side: the passes terrain.erode runs for model = "talus".
The ground is rock under a layer of loose debris. Rock holds any slope; debris holds the angle of repose and no steeper. A face steeper than the repose turns some of its rock to debris in place, and the debris runs down to the ground below it and piles there into fans and aprons whose slope is the repose. What a cell sends is exactly what its neighbours receive, so the debris neither grows nor shrinks as it moves.
One dispatch is one pass, picked by the MODE specialization, and each pass writes one cell per thread from the buffers of the pass before, so a run gives the same ground every time.
MODE | One thread per | Writes |
|---|---|---|
shed | work cell | the share per metre of excess slope that the cell's debris sends toward each lower neighbour: at most rate of the largest excess over the repose, and no more than the debris it holds once weathering has turned its share of rock |
settle | work cell | the height (which 0) or the debris depth (which 1) after the pass: the cell's own debris out, its higher neighbours' in |
A face at or above cliff (rise per metre of run) turns all of weathering metres of rock to debris each pass that weathers; one between the repose and cliff turns its share. The amount varies over the ground by variation over variationSize metres by the seed, so the debris gathers into separate fans below the faces that shed most.