ABOUT THIS SIMULATION
A real-time fluid dynamics simulation using the stable-fluids method (Stam, 1999). All computation happens on the GPU via WebGL 2.0 fragment shaders — the CPU only handles input events.
The simulation runs at full resolution (matching your screen’s pixel density) at a sustained 60fps on any modern GPU.
METHOD
- Advection — Semi-Lagrangian advection with bilinear interpolation
- Diffusion — Jacobi iteration (8 passes)
- Pressure solve — Gauss-Seidel with 20 iterations
- Projection — Divergence-free velocity field via curl
REFERENCES
Stam, J. (1999). Stable fluids. SIGGRAPH ‘99.