Fluid Simulation
A real Navier-Stokes fluid solver running on your graphics card. Stir glowing ink with your mouse, or drop in a photo and melt it into liquid. Every frame is computed on your GPU — no server, no upload.
⚡ 100% on-device — your GPU solves every frameHow does a real fluid run in your browser?
Every frame the simulation does the full incompressible fluid pipeline on your GPU through WebGPU compute shaders. It advects the velocity field along itself, adds a little vorticity so small eddies keep their spin, measures how much the flow is compressing or expanding (its divergence), then runs a batch of Jacobi iterations to solve for the pressure that cancels that divergence and subtracts the pressure gradient back out. The result is a velocity field that conserves mass, and the ink you paint is simply carried along by it. Because each grid cell is updated by its own GPU thread, a laptop can solve a grid of hundreds of thousands of cells dozens of times per second without ever touching a server.
What you are looking at
This is the same family of math used for smoke, water, and explosions in films and games — Jos Stam's stable fluids method, which stays numerically stable no matter how hard you stir. Drag to push the fluid and inject ink, and the swirls, vortices, and mixing you see are not painted by hand; they fall out of the equations. Switch the ink to True color and drop in a photo to load your own image as ink, then watch your picture dissolve into flowing liquid.
Things to try
Crank Swirl up for tight, energetic vortices or down for slow lazy currents. Drop Ink fade to near zero and the colors build into dense marbled paint; raise it for wispy trails that vanish. Lower Drag so the fluid keeps its momentum and sloshes for a long time after you let go. Hit Splat for a burst of random jets, Drop a photo to liquefy an image, and when you find a look you like, Record a clip or Save PNG for a wallpaper. Copy share link packs your exact settings into the URL.
Privacy and performance
Nothing is uploaded and there is no account. The solver, the rendering, the photo you drop, and the clip you record all stay on your machine. It needs a WebGPU-capable browser — recent Chrome, Edge, or Safari work well; Firefox needs WebGPU enabled. If your device is modest, the grid resolution and pressure quality scale down automatically to hold a steady frame rate.
How can a real fluid simulation run client-side?
WebGPU exposes your graphics card to the page. The velocity field, the ink, the divergence, and the pressure all live in GPU buffers, and compute shaders update every cell in parallel — so there is no per-cell JavaScript loop and no server round trip.
What solver is this?
A grid-based Navier-Stokes solver using Jos Stam's stable-fluids approach: semi-Lagrangian advection, vorticity confinement, and a Jacobi pressure projection that keeps the fluid incompressible. The "Pressure quality" slider sets how many Jacobi iterations run per frame.
Can I melt my own photo?
Yes. Click "Drop a photo" (or drag an image onto the canvas) and its pixels are loaded straight into the ink field, so you can stir and swirl your own picture into liquid, then record it. The image never leaves your device.
My browser says it is not supported.
It needs WebGPU. Update to a current Chrome, Edge, or Safari, or enable WebGPU in Firefox. A desktop GPU gives the smoothest result.
Is it really private?
Yes. The whole thing is one HTML file that runs locally on your GPU. No upload, no tracking of your inputs, no sign-up.
I build things like this for a living.
Senior full-stack engineer comfortable from WebGPU compute shaders to production backends, available for senior or contract work, fully remote. See the rest of the lab or get in touch.