Each shadow caster mesh result in a 6 draw call increment?

A simple scene with 945 draw call:

Is this a normal situation? How can i optimize it?

cc @Evgeni_Popov

You get 6 additional draw calls per mesh you add as a shadow caster because your light is a point light: in this case, we must create a cube texture for the shadow map, which means 6 rendering, one per face of the cube.

There’s no way around it, so, if possible, you should avoid casting shadows from a point light and use a directional or a spot light instead.

3 Likes

OK, i got it.
Modified version: https://playground.babylonjs.com/#7TTFVB#3