THREE.JS / WEBGL GPGPU
Gravity writes in parallel.
Each texel is a debris body. The velocity pass applies pairwise gravity and collision aggregation, storing mass in velocity.w; the position pass integrates survivors, and a Points/ShaderMaterial field turns those textures into an orbiting protoplanet.
InitializingWEBGL2 / GPUCOMPUTATIONRENDERER
Preparing position and velocity render targets.
- compute
- —
- particles
- —
- textures
- —
- mass channel
- —
- simulation
- —
- sample avg / p95
- —
- backend
- WebGL2
- scope
- gravity + merge
Derived from the pinned classic GPGPU protoplanet example. This route uses a deterministic 32×32 field and local controls in place of the official random initialization, GUI/Stats presentation, and exact frame; broad device/compiler/performance coverage, context-loss/leak stress, and whole-example fidelity remain separate.