Where can I see the number of draw calls per frame?

Is there a way to find out how many draw calls are used in a scene?
I typed “renderer.info” on the “Debug Console” of VScode and I got a list that claims one draw call, for a scene that contains a medium complexity loaded textured obj, another group of objects and a couple more, each with their own materials, let alone the texture-rendertarget and post-processing…

renderer-info

It’s a bit dated, but the tool works fine. Tells me how many draw calls are in a scene.

It should be renderer.info.render.calls. It reports the amount of draw calls for a single render call. If you have multiple calls of WebGLRenderer.render() in order to produce a single frame, you need to set renderer.info.autoReset to false and call renderer.info.reset() manually at the end of your frame.

4 Likes

That tool is handy, thanks! It displays the number of draw calls live, so it follows changes of interaction and it is more precise (I noticed draw calls varying depending on interaction), vs a random capture on the debug console.

call renderer.info.reset() manually at the end of your frame.

Thanks for the additional info, but I did that and got zero (0) draw calls, which was funny LOL, obviously you meant at the beginning of the frame -I got 73 draw calls on one mode and 109 on another which were far more than I thought(!) -time for deep optimization…

Also Mugen87, is there a way to report the draw calls in every frame just like Awoken’s threex suggestion?
(I prefer native three.js solutions) if that’s not possible, I’ll keep using Awoken’s awesome suggestion.

is there a way to report the draw calls in every frame

Duh, that was too easy, I just used a function I’ve made to watch variables on-screen and supplied the info: renderer.info.render.calls that Mugen87 suggested at the end of the frame, for a simple, native, live, per/frame on-screen information of the number of draw calls. Totally satisfied, thanks everyone!