Search Unity

Draw call not being batched because of shadow?

Discussion in 'General Graphics' started by binho123, Jun 15, 2019.

  1. binho123

    binho123

    Joined:
    May 28, 2019
    Posts:
    18
    I have two instances of the same prefab in my scene, without modifications. They are static (batching & lighmap).

    The frame debugger tells me they can’t be batched because of lighting, possibly because they have “receive shadows” turned on.

    They do have it on but lighting is baked. I don’t understand why they cannot be batched.
     
  2. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Could they be in different shadow cascades?
     
  3. binho123

    binho123

    Joined:
    May 28, 2019
    Posts:
    18
    Thank you. That was a good one but no, the project isn’t using cascades.
     
  4. binho123

    binho123

    Joined:
    May 28, 2019
    Posts:
    18
    I found out that it wasn't baked because of Shadow Distance settings. One object was further away so it ignored its baked shadow making it be drawn in a different batch.

    What I don't know now is if I should increase the distance or letting it draw in a different batch, if I want performance.