The §36 GPU particle integrator (R-31's simulation half) — semi-implicit
Euler under constant gravity, @fourjs/particles' documented step order
(v += g·dt, then p += v·dt) over the pool's flat x,y,z Float32Array
lanes.
positions — array<f32>, 3 lanes per particle, "read-write";
velocities — array<f32>, 3 lanes per particle, "read-write".
One invocation integrates one particle; invocations past count return —
the workgroup rounding of particleIntegratorWorkgroups makes the
overshoot at most one workgroup.
The §36 GPU particle integrator (R-31's simulation half) — semi-implicit Euler under constant gravity,
@fourjs/particles' documented step order (v += g·dt, thenp += v·dt) over the pool's flat x,y,zFloat32Arraylanes.Bindings, in ComputePassDescriptor.bindings order:
"read-only"(see writeParticleSimulationParams);array<f32>, 3 lanes per particle,"read-write";array<f32>, 3 lanes per particle,"read-write".One invocation integrates one particle; invocations past
countreturn — the workgroup rounding of particleIntegratorWorkgroups makes the overshoot at most one workgroup.