A GPU-accelerated N-body particle simulation using WebGPU. Simulates gravity and collisions between thousands of particles in real-time.
- N-body gravitational simulation with 1000s of particles
- Particle collisions and merging with conservation of momentum
- GPU-accelerated computation using WebGPU compute shaders
- Interactive 3D camera controls
- Billboarded particle rendering with size and color based on mass
- WebGPU for GPU compute and graphics
- WGSL shaders for particle physics and rendering
- Compute shader handles particle updates in parallel
- Point sprite rendering with geometry generated in vertex shader
Requires a browser with WebGPU support (e.g. Chrome).
- Click and drag to rotate view
- Mouse wheel to zoom