Search Unity

GPU instancing and Dynamic Batching

Discussion in 'iOS and tvOS' started by eco_bach, Apr 20, 2019.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Hi
    Can anyone tell me if GPU instancing is enabled by default when you choose 'Metal' in Player settings?

    And should you disable 'Dynamic Batching' for GPU instancing to take effect?
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    You need to enable GPU Instancing in each material as well.

    One of my learnings: If you use mobile shaders, such as "Mobile/Diffuse", these do not support GPU Instancing in their shadow/depth passes.

    It's best to use a Profiler to measure different DynamicBatching/GpuInstancing/etc setups and draw your conclusions from there. At least this yielded the best and most surprising results for me.
     
  3. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Thanks.
    It seems it doesn’t work with Static objects as well.