Examples /

Pigment marbling

Comb indigo, vermilion and gold through a bath of warm ivory.

Initializing WebGPUwgpu-kit 2.2.0

Drag the needle to comb the ink. Switch to Drop pigment to add color, or Ivory to open a clear path. Your marks stay in the fluid.

How it works

A velocity grid is advected, stirred, projected through a Jacobi pressure solve and then used to advect a separate, finer pigment buffer. The full pipeline stays on the GPU. Bilinear sampling preserves smooth color bands, while a needle and pigment brush make persistent changes. This is a bounded incompressible-fluid approximation for an interactive marbling bath.

Read the related guide →

Search concepts, APIs, and examples