Skip to content

Draw Calls & Instancing

Draw the same object ten thousand times and watch where the time actually goes.

What you should come away with: Why the number of draw calls matters more than the number of triangles.

Assumes: Compute & Particles. It will still make sense without it, but that one comes first.

Why this API: The lesson is CPU cost per draw call, which is precisely where WebGPU differs most from WebGL.

Checking for WebGPU…

Drag to orbit · 1 draw call per frame

What the frame cost

Draw calls
1
Triangles
48,000
CPU per frame
0.00 ms
Frame rate
0 fps

Switch the mode and watch which number moves. The triangle count does not change, the shader does not change, and the buffer does not change — the GPU is asked for exactly the same picture either way, and produces it. What changes is how many times it was asked, and on a real scene that is usually the number standing between you and the frame budget. This is why engines batch, why materials get merged, and why “reduce your poly count” is so often the wrong advice.

CPU per frame is measured around encoding and submitting the pass, so it is the cost of asking rather than of drawing. It is a real measurement from your machine, and it will differ from anyone else’s.

On a fast machine the frame rate may not move at all, and that is worth understanding rather than hiding: ten thousand cubes is a small scene, and the milliseconds here are being spent out of a budget nothing else is competing for. The figure to carry away is the ratio, not the absolute — whatever the CPU cost of one call is on your hardware, per-object drawing pays it ten thousand times, and a real frame has a game in it as well.