Search Unity

HDRP Unlit Shader Graph Shaders Missing GPU Instancing Checkbox

Discussion in 'High Definition Render Pipeline' started by Korindian, Nov 15, 2019.

  1. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    When creating a material with a HDRP Unlit shader graph shader, there is no "Enable GPU Instancing" checkbox in the inspector under "Exposed Properties".

    Built-in HDRP Unlit shader has a GPU instancing checkbox, but not the Shader Graph version.

    HDRP Eye, Fabric, Hair, Lit, and Stacklit shader graph shaders all have a GPU instancing checkbox, but Unlit is missing it. Even the non-HDRP Unlit Shader Graph shader also has a GPU instancing checkbox.

    Can it be added? Thanks.
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    HDRP doesn't use GPU instancing at the same time as SRP batching as SRP batching replaces it. The fact it's present on materials is a UI problem where SRP batcher is concerned.
     
    Korindian likes this.
  3. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Thank you @hippocoder I didn't know that SRP batching completely replaced GPU instancing. I did see the materials getting batched in the frame debugger and stats window, but wasn't sure if having GPU instancing would be of any benefit.

    Following this article, I could enable/disable the SRP Batcher at runtime to see the difference.

    Perhaps the GPU instancing checkbox is there for those who are not using the SRP Batcher?
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723