Aurora.

Real-time fluid dynamics on your GPU.
Move, drag, play.

Source

How it works

Aurora solves the incompressible Navier–Stokes equations every frame, entirely on the GPU, using Jos Stam's Stable Fluids method. Each step is a full-screen fragment-shader pass that writes into half-float textures:

  1. Curlmeasure local rotation of the velocity field
  2. Vorticity confinementpush energy back into small swirls lost to numerical diffusion
  3. Divergencefind where fluid is being created or destroyed
  4. Pressure ×NJacobi iterations solve the Poisson equation ∇²p = ∇·u
  5. Projectionsubtract ∇p, so the flow becomes divergence-free
  6. Advectionsemi-Lagrangian back-tracing moves velocity and dye
  7. Displaytone mapping, normal-based shading, dithering

Press 2, 3 or 4 to see the raw velocity, pressure and vorticity fields the solver works with. Settings live in the URL, so Share gives a link that reproduces your setup. If the GPU struggles, dye resolution is lowered automatically.

Raw WebGL2 · under 1,000 lines of JavaScript and GLSL · no libraries · no build step.

Aurora.

This demo needs WebGL2 with floating-point render targets.