Why does less draw calls increase the CPU overhead?

Hey hey,

I’ve been working on an atlas material for my characters to reduce draw calls count. I went from 8 materials to a single one, but the result I get are somewhat confusing.

Here are the stats for 200 characters with 8 materials :
8 materials

And the stats for 200 characters with a single material :
one material

The single material does reduce the draw calls count as expected, but also increases the game thread by a lot. Can someone explain me why?
Also with one material it takes ~7ms for 1000 draw calls, versus 3.5ms for 5200 draw calls with 8 materials. I would have expected the opposite…

My single material version has 410 instructions, while each one of the 8 material have around 260 instructions. I thought instructions were run by the GPU, but maybe I’m wrong? Also I would expect 260 * 8 instructions to be less performant than 410, but maybe I am missing something.

I checked UE documentation about CPU profiling, and the first sentence is :

If you are CPU bound in the render thread, it is likely because of too many draw calls.

I’m even more confused, isn’t the render thread a GPU thing? Also it implies that less draw call would reduce the CPU overhead, but it did the opposite in my case.

I think I am missing essential knowledge to understand all of this, I would appreciate if anyone could shed a light on it :slight_smile:

Judging by your screenshot it is your game logic that makes it run slower and not the rendering.

For now my game logic is just a basic character blueprint for jump and locomotion + the associated animation blueprint, nothing fancy.
And the game logic didn’t change between the 2 screenshots, so the 10ms increase must come from somewhere else.

Strange. But now I also saw that the drawing actually went up between the two screenshots so I spoke to soon.

I would run renderdoc and look what is going on. Also, maybe some instructions on your new material is really heavy.

Didn’t knew about renderdoc, I’ll try and post my results here.

Instructions in my Atlas material are the same as in my individual materials, just gathered all at the same place + a few maths operations to atlas each effect to the appropriate texture zone.

One question though, if my instructions are really heavy what is going to be affected in stat unit? Game, Draw or GPU line?

That can depend on what you are drawing and how, skeletal meshes and vfx can take different paths by choice or sometimes requirement depending on what your want to do.
My guess is that you have something that runs on the CPU, judging by your draw time that went up.