Builtin Library
- ..
- README.md946 B
- bindings.yaml764 B
- shader.wgsl1.9 KB
README.md
proc_raster_edge_add
Adds a neighbour tile's apron-ring fixed-point accumulator into this tile's interior, one dispatch per (destination tile, neighbour direction).
proc.raster's Raster:resolveAccumulator(layerName, scratchName, work?)
drives it, before folding the accumulator into layerName and refreshing
layerName's apron. Droplet and thermal erosion both accumulate this way —
any tiled kernel op whose per-cell result can spill across a tile seam needs
the same fold.
params describes the block the way proc_raster_apron takes it: lane 0 holds
(stride, block width, block height, 0) and lane 1 holds (destination x0, z0,
source x0, z0), the source block in the neighbour's apron ring and the
destination in this tile's interior. It reads the neighbour's accumulator src
as plain integers and adds each non-zero cell into this tile's dst with an
atomic integer add, one thread per cell of the block in 8x8 workgroups.