A real fluid simulation (the Stable Fluids family) advects a velocity field and solves pressure for incompressibility every frame, bouncing between several render targets — roughly the gpgpu ping-pong pattern extended two or three times over. This demo takes a shortcut: a single fragment shader doing "domain warping" to fake a similar impression.
Domain warping doesn’t use fbm(coordinate) directly — it feeds that result back into the coordinate and computes fbm again, repeatedly: q = fbm(p), r = fbm(p + q), color = fbm(p + r). Each step means the noise itself perturbs the coordinates the next noise layer reads, so distortion compounds across layers into swirling, stretched, ink-like patterns. Letting p drift with time animates that pattern as continuous bleeding.
This approach costs just one GPU pixel-shader pass — no render targets, no advection — so it’s far cheaper, but it never actually reacts to obstacles or external forces (like a mouse drag) the way real fluid does. A genuinely interactive fluid needs Stable Fluids implemented with render-target ping-pong; this demo is the lighter, look-alike stand-in before that step.
When to use
Decorative "organically flowing" backgrounds — ambient backdrops, loading screens, marketing pages — where the fluid doesn’t need to react to input.