100,000 particles are advected through a curl noise velocity field. The curl of a potential field is mathematically guaranteed to be divergence-free: it has no sources or sinks, so particles neither clump together nor scatter apart. They flow in swirling, incompressible streams. The underlying potential is 3D Perlin or simplex noise evaluated at (x, y, time), so the field evolves smoothly and the turbulence feels organic rather than random.
The key parameters are noise frequency, octave count, and time scale. Higher frequency produces tighter, more intricate swirls. More octaves layer fine detail on top of broad flow structure. The time scale controls how quickly the field morphs. Together they determine whether the flow looks like slow smoke, river currents, or violent turbulence.
Particle positions live in a GPU buffer and update each frame via transform feedback, which lets the vertex shader write updated positions back to the buffer without a CPU roundtrip. This keeps the entire simulation on the GPU. Trail persistence comes from rendering a semi-transparent quad over the previous frame instead of clearing it, so old positions fade by alpha rather than disappearing instantly.
Your mouse adds an attraction force that warps the flow locally. Additive blending makes the streams glow where particles converge, revealing the underlying vector field structure. Watch for saddle points where streams split and for vortex cores where trails spiral inward.
Bridson et al., Curl-Noise (2007)