Feature Library

Frost growing over a word

1.71 GPU · 0.22 CPU ms
A still of the Frost growing over a word demo
Still
The live demo starts when it’s in view.Touch or drag to grow frost where you like · the light follows the pointer

Ice crystals that grow over a word, a logo or any shape.

What it costs a frame

1.71 ms
0.22 ms
GPU
1.71 ms
CPU, median
0.22 ms
CPU, 95th pct
0.31 ms
Draw calls
0
Weight
Moderate

Measured 11 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured looping by itself: the word grows over its grow time (about seven phase-field steps a frame on the 640-column grid, more while it melts back), holds, melts and grows again; one draw pass over the word each frame. Timed with its own timestamp queries. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool1.710.220.31
apple · Apple A19 Proin a browser tab · 16 November 20267.280.300.50
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 20260.330.360.64

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.

What it needs

Renders with
WebGPUNeeds WebGPU: current Chrome and Edge, Safari 26+, Firefox 141+ on Windows.
Your browser
Checking…Looking for WebGPU
Depends on
NothingNo other packages

What it’s for

  1. Title cards and splash screens
  2. Winter and seasonal themes
  3. Logo reveals
  4. Game menus and loading screens
  5. Frozen states in UI (a locked or paused card)

Pitfalls, in brief

  1. The steps are explicit: the source’s DT, DX and constants sit near the edge of stability.
  2. Crystals keep their size in cells, so a finer grid grows finer frost and needs proportionally more steps (the module scales them): the cost grows with the cube of the columns.
  3. Never queue more than one frame ahead: draw() skips while its last submit is still on the GPU, and the steps it would have run wait for the next draw.
  4. Going back in growth starts again from nothing and catches up (at most cap steps a draw): scrubbing backwards costs a burst of steps.
  5. The mask must have room round the shape (pad in drawWordMask): the frost feathers a little past the edges and the grid stops at the mask’s border.
2 more in brief
  1. Load the font before drawing the word mask, or the frost grows over the fallback font.
  2. The target is premultiplied alpha: configure the canvas with alphaMode "premultiplied" to see what is under it.
7 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From SpaciousPro. Fully custom code.

Ryo Kobayashi, Modeling and numerical simulations of dendritic crystal growth (Physica D 63, 1993): The phase-field model and its anisotropy terms; the source’s constants are close to the paper’s.

Mark Jarzynski & Marc Olano, Hash Functions for GPU Rendering (2020): Their PCG hash, for the noise at the tips, the specks of dust and the glints.

phase fieldcrystal growthdendriteskobayashicomputewgslraw webgputext effects

Near it in the frame