Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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