0%

0000000

0x00

Three.js Frame Drops: 110 Draw Calls Hid 1.8M Vertices

Black card: 110 draws. 1.8M vertices. A bar of one frame's triangles, lines and points re-weighs from draw count to vertex count. Looping GIF.

To find Three.js frame drops, count what each draw call submits, not just the calls. One about-page frame made 110 calls and sent 1.8 million vertices and indices, mostly text.

On 25 November 2026 I counted every WebGL draw call that the Three.js scene on my about page makes in one frame. There were 110. For a scene with a wireframe tube, 55 small wireframe octahedra, a starfield and a few dozen lines of floating text, 110 looked harmless, and draw calls are the first thing most Three.js frame drops advice I found tells you to cut.

The same frame submitted 1,823,156 vertices and indices. 1,777,368 of them came from 49 triangle draws, and 47 of those draws were text. In a local harness I removed 91% of the text's triangles and changed under 1% of the pixels.

TL;DR: To diagnose Three.js frame drops, wrap drawArrays and drawElements and count what each call submits, split by primitive. Do not trust renderer.info.render under EffectComposer with bloom: on three.js 0.167.1 it reported 1 call and 1 triangle for a frame that made 75. On my scene, swapping extruded TextGeometry for flat ShapeGeometry cut submitted primitives by 79% and changed at most 0.87% of pixels. Whether that fixes frame time on a real GPU, I have not measured yet.

How Do You Find What Causes Three.js Frame Drops?

Count the work each frame submits, broken down by primitive type, before changing anything. Three.js frame drops have several possible causes (draw calls, vertex count, fill rate from post-processing, pixel ratio), and a single number such as the draw call count cannot tell them apart.

I wrapped the two WebGL draw functions in a Playwright script and logged every call for one frame: the primitive mode, the vertex or index count, and the viewport it drew into. The script ran against the live page and against a local harness that loads the site's own ThreeJSScene.js unchanged. Both gave the same counts. One frame at 1440 x 900, device pixel ratio 1, with autoplay running:

  • TRIANGLES at 1440 x 900: 49 draws, 1,777,368 vertices (47 text meshes and 2 full-size bloom quads).
  • LINES at 1440 x 900: 48 draws, 43,752 indices (the tube wireframe, 42,624 of them, plus 47 octahedron edge sets).
  • POINTS at 1440 x 900: 1 draw, 2,000 vertices (the starfield).
  • TRIANGLES at 720 x 450 down to 45 x 29: 12 draws, 36 vertices in total (the rest of the bloom chain's fullscreen quads).

That is 110 draws and 1,823,156 vertices and indices. The tube and the octahedra use wireframe materials, which three.js submits as LINES, so every full-size triangle draw apart from two bloom quads was text. The 48 text meshes hold 605,796 triangles between them, and the text draws in that frame submitted 592,454, so almost the whole text set went to the GPU on every frame.

The wrapper is short. It is the measurement I would add first to any scene:

const gl = renderer.getContext()
const st = { draws: 0, prims: 0 }
for (const fn of ['drawArrays', 'drawElements']) {
  const orig = gl[fn].bind(gl)
  gl[fn] = (...a) => {
    st.draws++
    st.prims += fn === 'drawArrays' ? a[2] : a[1] // vertex count or index count
    return orig(...a)
  }
}
// reset st once per requestAnimationFrame, not once per render() call

What Does renderer.info Count When EffectComposer Runs Bloom?

With the default settings, renderer.info.render counts only the last pass. WebGLRenderer.render() resets the counters at the start of every call when info.autoReset is true, and post-processing passes call render() for every fullscreen quad they draw. UnrealBloomPass alone makes 14 of those calls per frame here, so the counters end up holding only the final quad.

I checked it on 2 December 2026 at two camera positions on the about page scene:

position 0.05, bloom on    gl draws 75   renderer.info: calls 1,  triangles 1
position 0.05, bloom off   gl draws 61   renderer.info: calls 61, triangles 407,114
position 0.50, bloom on    gl draws 34   renderer.info: calls 1,  triangles 1
position 0.50, bloom off   gl draws 20   renderer.info: calls 20, triangles 126,412

Setting renderer.info.autoReset = false and calling renderer.info.reset() once before composer.render() brought the bloom frames back to the full figures: 75 calls and 407,128 triangles at position 0.05, matching the wrapped gl count. The three.js docs for info suggest exactly this pattern "when using post processing". A stats panel reading renderer.info behind bloom shows a scene that costs nothing.

Is UnrealBloomPass the Reason the Three.js Scene Is Slow?

By count, no. By software-rendered frame time, yes. The two measurements disagree, and only one of them transfers to a real GPU.

The about page runs UnrealBloomPass with a threshold of 0.002 and a strength of 3.5, so almost every lit pixel blooms. I rendered five fixed camera positions along the tube, five times each, with configurations interleaved so machine load hit them alike, and took the median per frame:

  • Bloom on: 31 draws, 331,802 primitives, 1,480.8 ms.
  • Bloom off: 17 draws, 331,760 primitives, 239.9 ms.

Bloom adds 14 draws and 42 primitives. Those are fullscreen quads: cheap to submit, expensive to fill, because each one shades every pixel of its target. My harness runs in headless Chromium with SwiftShader, a software rasterizer with no GPU, where filling pixels is slow. A 6x frame time gap there says bloom is costly to rasterize in software. It does not say how bloom costs on a laptop GPU or a phone.

Turning bloom off is also not a free change. It altered more than 16/255 on up to 67% of the pixels in a frame, which is the look of the page, not a detail.

How Many Triangles Does Extruded TextGeometry Add, and What Removes Them?

On this scene, the 48 text meshes hold 605,796 triangles, and a flat version of the same glyphs holds 53,654. All 48 are TextGeometry with curveSegments: 12: 47 narrative lines in Space Mono and one "Created by" line in Press Start 2P. The narrative lines are extruded to a depth of 0.001, so their side walls and back faces are there but too thin to see.

I swapped each text mesh's geometry for a flat ShapeGeometry built from the same glyph shapes with 4 curve segments, from outside the class so the site code stayed unchanged:

const flat = new ShapeGeometry(textMesh.geometry.parameters.shapes, 4)
textMesh.geometry = flat

That swap makes two changes at once: no extrusion, and 4 curve segments instead of 12. I did not measure them separately, so I cannot say how much of the cut each one makes. Together they took the text from 605,796 triangles to 53,654, a 91% cut. Across the five positions the median submitted primitives went from 331,802 to 70,199, a 79% cut, and the frame changed by more than 16/255 on at most 0.869% of its pixels. Median frame time in SwiftShader moved from 1,480.8 ms to 1,394.1 ms, which is consistent with the bloom reading above: in software, frame time followed fill far more than vertex count.

Draw count did not move at all (31 both ways). A guide that measures only draw calls would have called this change useless.

Does Fog Stop Three.js Drawing Objects the Camera Cannot See?

No. Fog in three.js is a colour mix in the fragment shader, applied after the object has been submitted and its vertices processed. The scene uses FogExp2(0x666666, 0.4) with a camera far plane of 1000. With that density the fog factor 1 - exp(-(0.4 d)^2), where d is view-space depth, is above 99.6% beyond a depth of 6 units, yet everything out to 1000 units is still drawn.

Setting camera.far = 6 halved the work: summed over the five positions, submitted primitives fell from 2,269,276 to 1,138,096. Draws went from 31 to 26. But the frame changed by more than 16/255 on up to 10.8% of its pixels. My reading is that the clipped region shows the black clear colour, while the fogged geometry it replaced was grey, because the scene sets a fog colour but no background. I have not tested a matching background colour, so treat that as a hypothesis.

Combining the two (far plane 6 and flat text) took the summed primitives to 304,114, 87% below the original, with about the same pixel change as the far plane alone (10.85% against 10.82%).

How Do You Check a Three.js Fix Without a GPU?

Check counts and pixels, and do not read frame time. Draw and primitive counts come from the scene graph and frustum culling in JavaScript, so I expect a GPU to see the same ones, though I have not checked that on one yet. Frame times are a property of the rasterizer, and a software one has a very different cost profile.

The far plane run shows why. It halved submitted primitives, and its median SwiftShader frame time went up, from 1,480.8 ms to 1,875.8 ms. I cannot explain that rise, and that is the point: in software, frame time did not follow submitted work.

What I use instead, per configuration:

  1. Wrapped gl draw and primitive counts, reset once per frame.
  2. A pixel diff of each configuration against the original frame at the same camera position, reporting the share of pixels that moved by more than 16/255.
  3. Configurations interleaved and repeated, medians only.

A change that cuts primitives and moves under 1% of pixels is a candidate. Frame time has to come from a real device. The renderer's lifecycle on this page, contexts and dispose(), is a different problem, written up in Three.js too many active WebGL contexts after dispose(); none of the counts here involve it.

Limitations

  • Every figure comes from headless Chromium 156.0.8078.4 with SwiftShader, three.js 0.167.1, at 1440 x 900 and device pixel ratio 1. A run at pixel ratio 2 and a repeat run at pixel ratio 1 both timed out and produced no data; only the first pixel ratio 1 run is reported.
  • There is no real-GPU frame time in this post. I do not know yet how much of the about page's frame cost on a real device is text vertices and how much is bloom fill.
  • The flat text and far plane changes were applied from outside the class in a local harness. Nothing on the live about page has changed.
  • The far plane pixel change is explained by a hypothesis (black clear colour against grey fog) that I have not tested.
  • Box positions are randomised on each page load (Math.random() in the constructor), so counts at one camera position can vary slightly between runs and page loads.

If you have profiled UnrealBloomPass against a heavy text scene on a real GPU, which one cost more frame time? More of the about page's internals are in the project write-up and the Browser Creative category.

References

  • three.js r167 docs source: WebGLRenderer, info: the autoReset property and its advice for post processing, read on 2 December 2026.
  • three.js 0.167.1 source in node_modules: WebGLRenderer.render() calling info.reset() when autoReset is true, WebGLInfo.js, examples/jsm/postprocessing/Pass.js (FullScreenQuad.render), UnrealBloomPass.js (five mip levels), TextGeometry.js and the fog shader chunk fog_fragment.glsl.js.
  • The site's ThreeJSScene.js at git HEAD on 25 November 2026: the fog, camera, bloom and text settings quoted above.
  • My own measurement harness and captures, run on 25 November and 2 December 2026. The primary source for every count and time above.