LAB 157 / PARALLEL SCAN
Find the next active index.
Turn sparse particle flags into stable dense positions with workgroup scans, then feed the resulting count into an indirect compute dispatch.
Studying hierarchical prefix sums and compact work.
LIVE PARAMETERS
Shape the sparse field
The scan uses two workgroup-local ping-pong arrays, a second workgroup for block offsets, and a stable scatter. Count readback is opt-in; indirect dispatch does not need to return to JavaScript.
Source particles—
Active list—
Workgroups—
Compute passes—
Draw calls—
Tracked storage—
The route will identify the active backend and scan strategy.
Benchmark: not run
GPU count readback: not requested
RUNTIME ERROR