# WebGLRenderer.info and autoReset

**URL:** <https://discourse.threejs.org/t/webglrenderer-info-and-autoreset/91823>\
**Category:** Questions\
**Tags:** webgl-renderer\
**Created:** [May 24, 2026, 6:16pm UTC](https://discourse.threejs.org/t/webglrenderer-info-and-autoreset/91823 "2026-05-24T18:16:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ldaoust01](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ldaoust01/32/68078_2.png) [@ldaoust01](https://discourse.threejs.org/u/ldaoust01)\
**Post date:** [May 24, 2026, 6:16pm UTC](https://discourse.threejs.org/t/webglrenderer-info-and-autoreset/91823/1 "2026-05-24T18:16:54Z")

</div>

**### 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 ?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [May 26, 2026, 12:52pm UTC](https://discourse.threejs.org/t/webglrenderer-info-and-autoreset/91823/2 "2026-05-26T12:52:30Z")

</div>

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

> <https://github.com/mrdoob/three.js/blob/14e6e6c1453bb55967382acef543ec3f8bc20c08/src/renderers/WebGLRenderer.js#L1712>

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.

---

<div class="post-metadata">

**Author:** ![ldaoust01](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ldaoust01/32/68078_2.png) [@ldaoust01](https://discourse.threejs.org/u/ldaoust01)\
**Post date:** [May 26, 2026, 10:58pm UTC](https://discourse.threejs.org/t/webglrenderer-info-and-autoreset/91823/3 "2026-05-26T22:58:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [May 30, 2026, 8:41pm UTC](https://discourse.threejs.org/t/webglrenderer-info-and-autoreset/91823/4 "2026-05-30T20:41:37Z")

</div>

PR:

> <https://github.com/mrdoob/three.js/pull/33688>
>
> \[Related Discourse\](https://discourse.threejs.org/t/webglrenderer-info-and-autor…eset/91823)
> 
> \*\*Description\*\*
> 
> With info.autoReset = true, WebGLRenderer statistics are reset \*\*after\*\* a call to shadowMap.render which excludes those stats. This fix moves the reset call before the shadowMap.render call so that statistics are properly accounted for.

The issue will be fixed starting from r185.

@ldaoust01 Thanks for the contribution!
