Search Unity

Question Prioritize Dynamic Batching over Instancing, instancing as fallback?

Discussion in 'Universal Render Pipeline' started by o1o101, Jul 13, 2021.

  1. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    Is there anyway in URP to prioritize dynamic batching over instancing? According to the docs the order is Static batching > instancing > dynamic batching.

    Dynamic batching is very useful when working with large atlases, but instancing really breaks things up due to different meshes on the same material.

    Though shadows do not appear to be dynamically batched from what I can tell, so the material toggle for instancing is a must in that case.

    Any ideas?
     
    Last edited: Jul 13, 2021
  2. CaffeinatedCoolaid

    CaffeinatedCoolaid

    Joined:
    May 10, 2021
    Posts:
    59
    Unfortunately, I don't think this is possible. It's more related to the lack of Rendering options in the core portion of SRP API, I do know if you assign a MaterialPropertyBlock to Renderers it will force instancing on those renderers.

    I am pretty sure dynamic batching of shadows does not work in BIRP as well..
     
  3. CaffeinatedCoolaid

    CaffeinatedCoolaid

    Joined:
    May 10, 2021
    Posts:
    59
    Actually I just noticed this "enableDynamicBatching" and "enableInstancing" as properties to DrawingSettings. You might be able to accomplish something with a scriptable renderer pass.