The live demo starts when it’s in view.Click, tap or press → for the next picture · scrub with Progress
Six ways from one picture to the next on WebGPU.
What it costs a frame
GPU
0.28 ms
CPU
<0.01 ms
02468101216.7 ms
GPU
0.28 ms
CPU, median
<0.01 ms
CPU, 95th pct
<0.01 ms
Draw calls
0
Weight
Light
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: Plays all six transitions back to back, one picture to the next, at the stage’s size: one full-screen pass each (the shatter adds 288 shard triangles over it), timed with its own timestamp queries. Phones: tiers are being measured next.
apple · Apple A19 Proin a browser tab · 16 November 2026
6.15
<0.01
0.02
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026
0.33
<0.01
<0.01
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
Slide decks and presentations
Image galleries and carousels
Scene changes in games
Onboarding steps
Video and photo editors
Title sequences
Pitfalls, in brief
The pictures must be loaded when you hand them over: copyExternalImageToTexture copies what is there now (an image still loading copies nothing; await img.decode() first).
It draws at the canvas’s own width and height: size the canvas (CSS size × devicePixelRatio) before drawing, or it draws at 300 × 150.
Progress 0 is the first picture exactly and 1 the second exactly, so you can swap a DOM view for the canvas at either end without a jump.
Pictures are cover-fitted to the canvas (cropped at the edges); pass fit: 'stretch' to keep them whole, or draw them at the canvas’s shape.
Light over 1 clips to white: there is no bloom.
2 more in brief
draw() and play() each stop a play in progress (its promise resolves false): chain plays with await, and check the result before moving on.
Never more than one draw on the GPU at a time: a draw asked for meanwhile waits and only the latest is drawn, so scrubbing fast never queues frames up.
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.
Mark Jarzynski & Marc Olano, Hash Functions for GPU Rendering (2020): Their pcg2d, on the float’s bits, replaces the original shader’s hash.
Inigo Quilez, 2D distance functions: The digits’ segments use his box distance (sdBox).
Robert Penner, easing equations: The cubic in, out and in-out eases are the well-known forms of his curves.
Air that bends what is behind it: shimmering heat over fires and blasts, and sonic shockwaves (rings, shells and a flying core) animated on the GPU from their…
Ambient occlusion (GTAO from the frame’s own depth), bloom that only takes light brighter than lit white, specular anti-aliasing in every lit material and a…