Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity 4.6 UI Mask Component takes 2 draw calls?

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by RakshithAnand, Nov 13, 2014.

  1. RakshithAnand

    RakshithAnand

    Joined:
    Jun 30, 2013
    Posts:
    55
    Ok so if i have a mask component on an object, it increases draw calls by 2! why does this happen?

    Thanks.
     
  2. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,143
    Because of how masking works. It needs a drawcall to create the stencil command and one to destroy it and it can't be batched with anything else.
     
    RakshithAnand likes this.
  3. RakshithAnand

    RakshithAnand

    Joined:
    Jun 30, 2013
    Posts:
    55
    Thank you! good to know :)
     
  4. Luffy19901222

    Luffy19901222

    Joined:
    May 13, 2015
    Posts:
    2
    I add a mask on a List (with many items), and the mask take 5 draw calls. why does this happen?