Feature Library

A living skin the page steers

2.95 GPU · 0.28 CPU ms
A still of the A living skin the page steers demo
Still
The live demo starts when it’s in view.Drag on the open tissue to paint · click to seed · hover a bar to feed it

A Gray–Scott reaction–diffusion culture under a page, in raw WebGPU, steered by the DOM.

What it costs a frame

2.95 ms
0.28 ms
GPU
2.95 ms
CPU, median
0.28 ms
CPU, 95th pct
0.49 ms
Draw calls
0
Weight
Heavy

Measured 13 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged GPU 1.74–4.49, CPU 0.28–0.38 ms). What ran: Fine cells (2 CSS px: 960 × 540 at 1920 × 1080), living growth at about 16 Gray–Scott steps a frame, a dab painted round a loop on the open tissue every frame; field, steps, surface, shading and five glass panes; timed with its own timestamp queries. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool2.950.280.49
apple · Apple A19 Proin a browser tab · 16 November 20267.100.620.76
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 20264.330.500.81

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

How steadily it runs on Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258V · in a browser tab

Typical frame ?
16.73 ms
1% low ?
55 fps
Varies by ?
±0.46 ms
All metricsIntel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258V · in a browser tab
p50p95p9916.00 ms18.00 ms +
How long each frame took. Most frames sit in the tall bars; a long tail to the right is hitching.

Frames run on a 60 Hz timer (a page demo), so most frames take about one tick, 16.7 ms: the spread around it is what matters.

Frames

Median (p50) ?
16.73 ms
p95 ?
17.70 ms
p99 ?
17.98 ms
Slowest ?
18.14 ms
Mean ?
16.76 ms
Standard deviation ?
0.46 ms
1% low ?
55 fps
0.1% low ?
55 fps
Hitches ?
0 of 600
Over budget ?
0 of 600

Main thread

Long tasks ?
0
Long frames ?
0
Event-loop delay ?
0.1 / 0.8 / 0.9 ms

Input

No input during this run. A browser-tab run plays none.

Memory

JavaScript heap ?
84.4 → 84.3 MB
Growth ?
-0.02 MB

What it needs

Renders with
WebGPU or WebGLWebGPU where there is one, WebGL2 where there is not.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. A living background that keeps out from under text
  2. Charts whose bars grow as tissue
  3. A dashboard that answers hover and focus
  4. Glass panels framed by growth
  5. Teaching pattern formation (five regimes side by side)
  6. A page you can paint on

Pitfalls, in brief

  1. Mark text and controls data-ink (or put them in a data-pane): the culture grows anywhere it is not held back, and tissue under small text makes it unreadable.
  2. Shapes are read in DOM order and each blends over the last, so a child undoes its parent: a bar (data-feed) inside a plot marked data-ink grows inside the clearing.
  3. Read the rects every frame you draw (collect does): scrolling, a reflow or a CSS transition moves the elements, and a field from the last layout grows the culture in the wrong place.
  4. Steps are per frame, not per second: tie them to real time (stepsFor), or a 144 Hz screen grows the culture more than twice as fast as a 60 Hz one.
  5. A frame with no steps leaves the culture exactly as it is, queued dabs included: when nothing moves, skip the frame altogether and the skin costs nothing.
8 more in brief
  1. Several dispatches in one compute pass see each other’s writes, so the steps can go in one pass; but writeBuffer is ordered by submits, so only one frame’s uniform reaches a submit.
  2. Under reduced motion, grow the first settled state unseen (frames with draw: false) and show it once; ripples off, no living growth.
  3. cellPx sets the cost: 2 CSS px a cell at 1920 × 1080 is 960 × 540 cells, each step a 9-tap read.
  4. The canvas is opaque and owns the colour of the page under the DOM: give the DOM text the look’s own ink colours (the light and dark looks are paired with them), not the host’s, when the look can differ from the site’s theme.
  5. A new resize stretches the old culture onto the new grid; a grid more than twice as wide or as tall reseeds instead.
  6. A WebGPU device can be lost (a driver reset, a sleeping laptop): frame() then returns false for good and the canvas is cleared.
  7. The canvas is kept within the device’s largest texture (8192 px on most): a wider one (a 5K screen at a pixel ratio of 2) draws at a lower pixel ratio rather than failing.
  8. Without WebGPU, createRdSkin returns the WebGL2 port: the same look and API, the steps as render-target ping-pong on RGBA16F.
13 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac. Fully custom code.

P. Gray & S. K. Scott (1983); John E. Pearson, Complex patterns in a simple system (Science, 1993): The reaction–diffusion model, and the pattern classes the regime path runs through.

Karl Sims, Reaction-diffusion tutorial: The grid form each step uses: diffusion 1.0 and 0.5, the 3×3 Laplacian weights, a time step of 1.

Robert Munafo, Xmorphia (the Pearson parameter map): Where each class sits in feed and kill; the five points were chosen by eye along it.

Inigo Quilez, 2D distance functions: sdRoundBox, the shape of every panel, rect and hole, kept as ported with this credit.

Inigo Quilez, Palettes: The cosine palette behind the thin-film tint.

Mark Jarzynski & Marc Olano, Hash Functions for GPU Rendering (2020): The PCG hash under the seeding, the noise and the grain (it replaces the mock-up’s own integer hash).

Irwin Sobel & Gary Feldman (1968): The Sobel kernel that turns the tissue’s height into normals.

WAI-ARIA Authoring Practices Guide (W3C): The radio group pattern for the five wells (one Tab stop, the arrows move).

reaction-diffusiongray-scottdom + gpusteered by the domfield mapraw webgpuwgslcomputestorage textureping-pongglassbackgroundchartspainttimestamp queriesrests when idlewebgl2 fallbackno dependencies

Near it in the frame