- Home /
Why does a mesh ( one material ) take 2 draw call?
I did some tests. Scene 1: Had one camera. Draw calls : 1;
Scene 2: Had one camera and one cube( one material ). Draw calls : 3;
Scene 3: Had one camera and 2 cubes( share one material ). Draw calls : 5;
The result bothers me. Why does one mesh take 2 draw calls?
did you use light? Ive got the same numbers if i put in a point light. But if i dont use lights i get n+1 draw calls if i got n cube.
Actually exactly this is the power of lightmapping :)
Answer by zharik86 · Oct 25, 2014 at 06:28 PM
These draw call depend on a shader. For example, standart Diffise shader)(I think, you use it) traces Mesh in 2 pass: the first, for the main light, the second - forwardadd. But if you use, for example, Mobile Diffuse, that 1 draw call for 1 mesh. Be attentive: than the shader is more difficult and more pass into them, that more draw call per one mesh. For more case, count pass into shader is equal draw call for one mesh. And not completely dynamic batching works. I hope that it will help you.