Examples /

Reaction diffusion

Two chemicals, a neighborhood stencil, and evolving structure.

Initializing WebGPUwgpu-kit 2.2.0

Press and drag to seed new reactions. Feed and kill rates change the evolving pattern.

How it works

A Gray–Scott reaction equation samples an eight-neighbor stencil. PingPong keeps the previous state separate from the next. A second kernel maps chemical concentration to color.

Read the related guide →

Search concepts, APIs, and examples