Feature Library

Laser cutting steel plate

5.97 GPU · 0.20 CPU ms
A still of the Laser cutting steel plate demo
Still
The live demo starts when it’s in view.Drag or use the arrow keys to look around · type a Word to cut it · scrub with Progress

A CNC laser cutting any shape out of thick steel.

What it costs a frame

5.97 ms
0.20 ms
GPU
5.97 ms
CPU, median
0.20 ms
CPU, 95th pct
0.33 ms
Draw calls
0
Weight
Heavy

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 cutting the default word over and over from the tray, at the defaults: 128k spark slots stepped and drawn, the shop ray-traced at half size with extra rays on the cut’s edges, a quarter-size bloom; 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 tool5.970.200.33
apple · Apple A19 Proin a browser tab · 16 November 20267.850.801.04
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 20263.210.440.65

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
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. Title and logo reveals
  2. Product and manufacturing visualisation
  3. Loading and splash screens
  4. Game workshops and crafting
  5. Teaching heat and the jump flood

Pitfalls, in brief

  1. Plan once, draw often: planCut() traces the outlines and simulates every slug’s fall up front (tens of ms for a word).
  2. The field is in the mask’s px: the shaders turn the world into them by the plan’s mpp and mid.
  3. Without bridges a counter (the hole in an “e”) would fall out with its letter. bridgesOf() leaves a thin strap across each, as a stencil does; the plate keeps its islands.
  4. The sparks step from 2.7 s before the moment after a jump (a scrub or a replay): up to 420 small dispatches in one frame.
  5. rgba16float holds how far along an outline a texel is to about 1/2000: on a very long outline, sample the cut-time table rather than doubling up on precision.
5 more in brief
  1. Draw only while something changes: the cut has settled and cooled about 15 s after its last kerf, and nothing moves after that.
  2. Without WebGPU, start createLaserCutGl on the same canvas: the same picture on WebGL 2, its compute passes (the jump flood, the spark step) as fragment passes between float targets.
  3. A canvas gives one kind of context: once it has a WebGPU context it cannot give a WebGL 2 one. createLaserCut returns null before it touches the canvas when there is no WebGPU, so the twin can take the same canvas; if WebGPU fails later, start the twin on a new canvas.
  4. The twin’s ray tracer takes seconds to compile the first time on Windows, where ANGLE turns GLSL into HLSL for a compiler that inlines every call (about 9 s on a fast laptop CPU, more on a slow one; it was two minutes before its materials shared one light() and its marches got bounds the compiler cannot unroll, so keep both if you change it). createLaserCutGl compiles in the background (KHR_parallel_shader_compile), so show a loading state for the first start; the browser keeps the program for later visits.
  5. draw() returns false when it skipped a frame (the last one still on the GPU): keep the frame due and draw again, or a scrub or a held moment that lands on a busy frame is never drawn.
10 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.

Guodong Rong & Tiow-Seng Tan, Jump Flooding in GPU with Applications to Voronoi Diagram and Distance Transform (2006): The distance field is their jump flood, with their two extra passes at strides 2 and 1 (JFA+2).

Mark Jarzynski & Marc Olano, Hash Functions for GPU Rendering (2020): The sparks’ randoms and the surface noise use their PCG hash; it replaces the original’s float hashes.

Max Planck, black-body radiation: The glow’s colour is Planck’s law at three wavelengths; the strength curve is the source’s own.

Walter, Marschner, Li & Torrance, microfacet BRDF (2007), with Schlick’s Fresnel: The metal’s highlights are the standard GGX form.

jump floodingdistance fieldblackbodytemper colourssparksrigid bodyray tracingwgslraw webgpuwebgl2 fallback

Near it in the frame