Search Unity

LWRP Gpu Instancing = worse performance?

Discussion in 'Universal Render Pipeline' started by Gekigengar, Jun 17, 2019.

  1. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Hello, using Unity 2019.1.3f, LWRP.

    I created a simple material in Shader Graph with Texture and Normal input, and attached them to simple dungeon blocks (Just cubes) in a procedural dungeon generation.

    Since I am using the same material for each simple blocks, I figured instancing would improve performance..

    But it seems not..?
    What seems to be the issue?
    GPU Instancing OFF.png
    GPU Instancing ON.png
     
    Last edited: Jun 17, 2019
  2. tylo

    tylo

    Joined:
    Dec 7, 2009
    Posts:
    154
    You use the Frame Debugger to find out more about what is going on with your draw calls. And then you may also want to look into the Profiler to see where your CPU/GPU time is being spent.

    I can't say for sure off the top of my head here.
     
  3. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    307
    standart renderer have same issue, better turn it off or use GPU instancer from asset store.
     
  4. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    400
    LWRP uses SRP batcher, and it's faster that generic unity instancing. Of course manual drawing with DrawInstanced will be fastest.
     
  5. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    GPU instacing does not work for low poly objects below 32 tris well.

    There is a blog post about GPU instancing and an asteroid field you should read about.
     
  6. liiir1985

    liiir1985

    Joined:
    Jul 30, 2014
    Posts:
    147
    I assume your gpu instance object has the light probe on? it'll break instancing and make it perform worse than no instancing