THREE.JS / FOUNDATIONS 340
Three offsets. One buffer.
One GPU-owned storage buffer holds three non-indexed commands. An offset array asks the renderer to issue three indirect draws from that shared allocation.
Initializing offset probe—
Creating three native four-word commands with 16-byte strides and byte offsets.
The probe is waiting for three GPU command writes.
- commands
- —
- byte offsets
- —
- GPU words
- —
- regions
- —
- dispatches
- —
- readbacks
- —
Each native non-indexed command is four u32 words / 16 bytes. The official structured example carries an extra application field in a five-word record; this lab keeps that padding out of the native layout. Indexed commands, multi-buffer orchestration, and performance remain separate.
Multiple indirect draws are WebGPU-only here.WebGL2 is classified as not equivalent; no CPU fallback is run.
Offset-array initialization failed.
The WebGPU probe could not initialize.
This route follows the official BufferGeometry.setIndirect(), IndirectStorageBufferAttribute, TSL storage/struct, and structured draw-indirect example.
LAB 340 / MULTI-INDIRECT OFFSETS