Lets talk about draw calls.

I’ve been thinking on making a post about draw calls but havent had the time / will to do it, so lets just get over with and start :).

Lets first define what is a draw call.
A draw call is a command to the graphics card that tells the GPU to render a certain set of vertices as triangles with a certain state (shaders, blend states, etc).

Now a frame is built of draw calls, that means the lesser draw calls you have the faster a frame finishes rendering; hence higher frames per second.

So just check this video to understand better how a single frame gets rendered in the C4 engine:

So, after watching this your might ask: how can we reduce the number of draw calls in our project?.
Well its fairly easy, try to compress as many objects/parts of a model into the less number of textures as possible.

This means that if you have lets say 5 objects with 5 materials that use a metal shader, just remap the UVs of the objects to a single texture, pack the textures into a single texture and use just 1 material for the 5 objects.

Something like this:


By doing this in Unity you can reduce up to a third the number of draw calls that you currently have in your project without losing any quality on your work.


Its important to keep draw calls as minimum as possible, this is because you can render your frames faster and also can use some rendering time in other tasks like AI.

If you are in need to reduce the number of draw calls in your project and you don’t have the time / knowledge to re-map all the UVs of your meshes you can use this tool I wrote for free to reduce your draw calls in Unity from here.

Finally if you are still interested and want to get more deep on this topic, you should checkout the nVidia presentation Batch Batch Batch!, a bit old but covers the draw call performance topic.