Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unexpected Draw Calls

Discussion in 'General Graphics' started by Justafin, Mar 19, 2015.

  1. Justafin

    Justafin

    Joined:
    Aug 6, 2012
    Posts:
    30
    I just started playing around with Unity5 and was wondering if someone could chime in on why I'm seeing unexpected draw call numbers in a simple test scene. If I place 4 cubes (no batching turned on) in an empty scene with a directional light I get 5 draw calls as expected (including 1 for the skybox). If I then enable shadowing on the light but turn off casting and receiving on all the cubes I jump up to 9 which is a little unexpected. If I move those cubes to a layer and set the culling mask on the light to not include that layer I still am at 9. I would expect both of these cases to still be at 5 draw calls. This is a little frightening once those 4 cubes become 100 cubes which are not even supposed to be affected by the light and my draw calls are doubled. This is all in forward rendering in case that matters.

    No shadows:

    1.jpg

    Shadows turned on but cast/receive turned off on cubes and culling mask on light set to not include cubes:

    2.jpg

    Thanks for any insight,

    Justin
     
  2. FrancisDuranceau

    FrancisDuranceau

    Joined:
    Aug 13, 2012
    Posts:
    10