Unity Draw Calls Optimization gain FPS:

What is draw call: -

A draw call contains all the information telling by CPU to GPU about textures, rendering objects, materials, sprites, lighting effects, states, shaders, etc. encapsulated as CPU work that prepares drawing resources for the graphics card. But you can note that-

So why do we need to reduce Draw call: -

Draw calls never occur problem until we add one more element and suddenly render thread becomes a new bottleneck. The main reason to make fewer draw calls is that graphics hardware can transform and render triangles much faster than you can submit them. If you submit a few triangles with each call, you will be completely bound by the CPU, and the GPU will be idle. The CPU won’t be able to feed the GPU fast enough.

I know these 2 techniques to reduces Draw Calls: -

1. Sprite Sheet.

Part 01:-

Using of Sprite Sheet: -

Image is loading. Please wait.
Total Draw Call using all sprites and sprite sheets
Image is loading. Please wait.
With Multi Sprites files it produces 11 Draw calls
Image is loading. Please wait
With Single Sprite Sheet, it produces only 3 Draw calls

Now why this magic happens: -

I used several sprite files for the “Multi Sprite” parent object with 9 child image objects. So, CPU has the read those files, particularly in several memory locations, and command to the GPU to render those images from those several files. So, CPU has to command several times how many several files are there to the GPU to render.

Game & Software Engineer