- Home /
Understanding draw calls
Guys I just need to get an idea how unity interprets draw calls.
In an empty scene I simply created a cube with no materials and i got a draw call of 2. Thereafter made 8 new copies of the same cube and still the draw call remained at 2 calls. Please refer the image bellow.
Then removed all the cubes and added a simple sphere which as usual gave a draw call of 2, I got same when i had a single cube. Now I did the same with sphere, made 8 copies of the sphere, and to my surprise the draw increased to 10 calls. Please refer the image bellow.
I know the fact that with increase in number of materials your draw will increase as well, but as all the sphere share the same mesh and material, as does the cube, why is the draw call shooting up with the spheres and not with the cubes?
Kindly, could someone please share some insights on this.
Regards,
Near the draw calls counter there is a number that shows 'Saved by batching' which in case #1 is 8 and in case #2 it is 0 which is why the draw calls have increased by 8.
Read more about draw call batching.
Probably you got dynamic batching working, but it works only if vertex count is low (300 or so, you'd better check the documentation). Spheres have way more vertices.
Thanks a lot guys, yes by enabling spheres for static batching i.e by enabling static on all 9 spheres, the combined draw call dropped to 2 draw calls.
There is indeed more stuffs to understand and learn static batching, texture atlasing, occlusion culling... There is surely more to learn, thanks a lot for helping out this newbie !
Thanks & Regards,