WebGLRenderer.info and autoReset

### WebGLRenderer.info
2026/05/24
Three.js release 184

Statistics from WebGLRenderer.info do not give the same numbers when used with autoReset=false.

To reproduce:

  1. create renderer with shadowMap.enabled=true
  2. set renderer.info.autoReset = false;
  3. before the call to renderer.render, call renderer.info.reset();

What I noticed:

  • Numbers are much higher:
  • triangles are trippled
  • calls are quadrupled
  • In the source code of WebGLRenderer, when autoReset is true, the info.reset() call happens after a call to shadowMap.render().

My assumption is that the shadowMap.render generates values in the info object, which are then reset, and then the real render call happens.

  • When autoReset is false, the manual reset is obviously not occuring at the same place, hence the difference.
  • With autoReset = false, If I disable renderer shadowMap, the number of triangles and calls match exactly.

My concern:
I use this info to keep track of the number of calls and triangles mainly for optimisation. Very usefull. After adding a module that uses the EffectComposer, the renderrer.info values were not the same. From the Three.js docs, setting info.autoReset to false and calling info.reset manually is the solution, which I believe is not quite right.

My questions:

  • Am I doing something wrong ?
  • Is the info.reset in the WebGLRenderer source code doing the right thing ?
  • Should the numbers from the shadowMap.render call be considered ?

I think what you have reported is a bug. Below line should be before the shadow map pass.

Ideally right under this.info.render.frame ++;. Would that fix the statistics on your side?

If so, would you be willing to file a PR at GitHub with this fix.

If I move the line specified just after the frame++, it does fix the issue for me. This seems to be a long time ‘bug’ that went undetected. Unless not many people use shadow maps.

I’ll try my hand at filing a PR.

Thank you for your help.

PR:

The issue will be fixed starting from r185.

@ldaoust01 Thanks for the contribution!