Case study: instances and the new DRW: Refactor to support draw call batching

Intrigued by the new DRW: Refactor to support draw call batching features I did tests with the class room demo file which contains many instantiated objects …

But I have not found strong improvement in the compilation of the shaders, compared to the previous versions … I am a bit confused, I would have expected that the compilation of material shaders with textures, since they are also instantiated, would undergo a great performance improvement, but it is not so…

maybe my GPU has some limitations … could you do some comparison tests too?

DRW: Refactor to support draw call batching

This has a great impact on CPU usage when using lots of instances. Even if the biggest bottleneck in these situations is the depsgraph iteration, the driver overhead when doing thousands of drawcalls is still high.

The draw call batching is about grouping the same data so they can be sent to the GPU memory together in large numbers. it has nothing to do with compiling shaders I think…

1 Like

batching It’s about minimizing the number of drawcalls to the gpu,the compilation of shaders has nothing to do with it, so it’s not that strange you’re not seeing any improvements there.

1 Like

Now it’s clear.
I thought it was a technology that also included this …
but now a question arises, is there room for optimizing shader instances?
From the time of computation, it seems obvious to me that currently every shader of objects instantiated is considered a new object … paradoxically in this phase cycles are faster than eevee … (I assume that cycles has optimizations for shaders of instantiated objects.