Search Unity

Question [URP] Optimize objects that use the same material with different values.

Discussion in 'General Graphics' started by LianZH_, Oct 20, 2022.

  1. LianZH_

    LianZH_

    Joined:
    Sep 16, 2017
    Posts:
    12
    Hi all,

    I have a bunch of game objects that share the same material. During run-time, each game object will change color or fade individually. What are the best approaches with minimal overhead?

    Currently, each object is using a different material instance, so the draw call count is huge. I did some research and found "Instanced property" and "Per Renderer Data". Is it the correct approach to use them to minimize the draw call count?
     
  2. LianZH_

    LianZH_

    Joined:
    Sep 16, 2017
    Posts:
    12
  3. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    195
    Did this work for you? I was just reading about these and the docs say it will reduce performance in URP and HDRP and it isn't compatible with static batcher?