Feature Library

Combable shell fur

2.71 GPU · 0.20 CPU ms
A still of the Combable shell fur demo
Still
The live demo starts when it’s in view.Drag across the fur to comb it · hover lifts it · arrows comb the big coat when it has focus

Fur on the page’s own panels, in raw WebGPU (a WebGL2 twin draws the same fur where WebGPU is missing).

What it costs a frame

2.71 ms
0.20 ms
GPU
2.71 ms
CPU, median
0.20 ms
CPU, 95th pct
0.31 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 2.51–5.36, CPU 0.17–0.21 ms). What ran: Three pelts: a coat furred all over (about 560 × 380 px) and two framed panels with suede plates, 16 shells, wind on, a comb stroke drawn round the big coat every frame; the groom compute and the fur pass, timed with their 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.710.200.31
apple · Apple A19 Proin a browser tab · 16 November 202611.50.380.46
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 20266.880.380.53

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.72 ms
1% low ?
54 fps
Varies by ?
±0.47 ms
All metricsIntel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258V · in a browser tab
p50p95p9916.02 ms18.01 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.72 ms
p95 ?
17.58 ms
p99 ?
17.98 ms
Slowest ?
21.73 ms
Mean ?
16.78 ms
Standard deviation ?
0.47 ms
1% low ?
54 fps
0.1% low ?
46 fps
Hitches ?
0 of 600
Over budget ?
0 of 600

Main thread

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

Input

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

Memory

JavaScript heap ?
84.8 → 83.4 MB
Growth ?
-1.43 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 tactile, playful theme for panels and cards
  2. A comb-to-confirm control (stroke it flat), with a hold-to-confirm button beside it
  3. A hero surface people want to touch
  4. A fur, plush or velvet look for a children’s or pet app
  5. An animal’s coat seen from above, in 2D

Pitfalls, in brief

  1. Without WebGPU, createShellFur draws the WebGL2 twin (unless webgl: false): the same shader in GLSL, the groom stepped on the CPU.
  2. Read the pelts’ rects every frame you draw (readPelts): a scroll, a reflow or a transition moves the elements, and fur drawn from the last layout floats off its panel.
  3. The cost is per pixel of fur times shells: a pelt furred all over at 16 shells is far dearer than a 22 px frame.
  4. On a weak GPU pass tier (FUR_TIER: low draws 12 of 16 shells at most 1 pixel per CSS px, medium 14 at most 1.5).
  5. Text never goes on fur.
7 more in brief
  1. The comb lives in a buffer of the canvas’s size, one cell every 8 CSS px: it is where the strokes were on the page, not on the panel.
  2. A drag combs only when it starts on fur (furAt): on a plate, a control or the page it must stay a click, a selection or a scroll.
  3. One stroke a frame from the last pointer position is enough at 60 Hz; for a scripted stroke (a key, a hold) step along the path each frame (pointAlong), never jump to its end, or the comb marks one long straight line.
  4. Under reduced motion pass motion: 0: no sway, no hover lift and no bristle wave, but combing still works, because it follows the hand.
  5. The canvas is premultiplied: everything the shader returns must be colour times alpha, or the drop shadows and strand edges turn into bright fringes.
  6. The device can be lost after the fur starts (a driver reset, the GPU process gone): pass onLost, and on it dispose the fur and give the panels their plain background, and say so. frame() draws nothing after a loss.
  7. Resize on a new pixel ratio too: a ResizeObserver does not fire when the window moves to a screen with another ratio, so the fur stays at the old resolution.
12 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.

Jerome Lengyel, Emil Praun, Adam Finkelstein & Hugues Hoppe, Real-Time Fur over Arbitrary Surfaces (2001): Shell fur: the surface drawn again in concentric shells, each a slice of the hair.

James T. Kajiya & Timothy L. Kay, Rendering Fur with Three Dimensional Textures (1989): The hair’s tangent lighting; the two shifted lobes follow Marschner et al. (2003) and Scheuermann’s practical form.

Steven Worley, A Cellular Texture Basis Function (1996): The Voronoi cells behind the clumps, rosettes and scales.

Inigo Quilez, 2D distance functions: sdRoundBox and sdSegment, kept as ported with this credit.

Mark Jarzynski & Marc Olano, Hash Functions for GPU Rendering (2020): The PCG2D hash under the strands, clumps and noise (it replaces the mock-up’s shared hash).

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

furshell furhairstrandscombgroomkajiya-kayvoronoidom + gpuraw webgpuwgslcomputewebgl2glsltimestamp queriesrests when idletouchkeyboardno dependencies

Near it in the frame