Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

[5.5b6] DrawMesh no longer batches draw calls when using instanced material (worked in 5.4)

Discussion in '5.5 Beta' started by Prodigga, Oct 11, 2016.

  1. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Hey guys, I was just doing some work that involved using the instancing feature. I am using the instanced version of the standard shader for this test. In 5.4, I call Graphics.DrawMesh multiple times using the same mesh and same material, but different material property block (providing different colors). In the frame debugger and profile, I can see that my DrawMesh calls have all been batched in to one draw call.

    However, in 5.5, each DrawMesh call is its own drawcall. No batching.

    Is something broken?
     
  2. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Infact, they dont even dynamically batch in 5.5 using a standard shader and rendering a cube. They are all just seperate draw calls when I use Graphics.DrawMesh.
     
  3. spraycanmansam

    spraycanmansam

    Joined:
    Nov 22, 2012
    Posts:
    254
    I noticed this today as well as after upgrading to b6.
     
  4. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    314
    There's now Graphics.DrawMeshInstanced, I guess try that instead?
     
  5. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    Yeah it has been fixed in beta 9.
     
    Prodigga likes this.
  6. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    So, approx. two weeks from now?