Search Unity

Should we untick static batch when using GPU instancing

Discussion in 'General Graphics' started by mahdiii, Jun 12, 2021.

  1. mahdiii

    mahdiii

    Joined:
    Oct 30, 2014
    Posts:
    856
    I would like to know if we use GPU instancing for objects like instantiated prefabs, should we untick static batch for them or disable static batching in that shader? Because I see a warning in the inspector, "You use GPU instancing and static batching at the same time"

    By the way, I see some of them can be batched using GPU instancing in the frame debugger tool!
    These objects have been instantiated. How can be batched statically? if they can not, why I see that warning

    For example, I instantiated a prefab (it has two parts) seven times.
    They can be batched by GPU instancing but like below
    1+2+2+2
    The max batch count is two.
    The reason is that "Rendering different meshes or submeshes ..." even when they are batched, I can see that error
    All instantiated objects have the same mesh, part 1 and part 2 (700 tri + 320 tri)
     

    Attached Files:

    Last edited: Jun 12, 2021
  2. mahdiii

    mahdiii

    Joined:
    Oct 30, 2014
    Posts:
    856
    OK, the problem is about render order, solved.