Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

GPU instancing - HDRP ShaderGraph

Discussion in 'Graphics Experimental Previews' started by DenizCetinalp, Jul 28, 2018.

  1. DenizCetinalp

    DenizCetinalp

    Joined:
    Feb 8, 2014
    Posts:
    16
    Is there an estimate on when we expect this feature to arrive? Its already part of the LWRP, so hopefully soon. GPU instancing is required for ECS, so unfortunately I can't upgrade my project to use HDRP yet.
     
    ju_my likes this.
  2. ju_my

    ju_my

    Joined:
    Mar 7, 2017
    Posts:
    23
    If you find any response somewhere... ^^
     
  3. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    GPU Instancing for shader graph is working.
    I tested using HDRP 4.8.0 in Unity 2018.3.2f and it's working fine.
     
    ju_my likes this.
  4. ju_my

    ju_my

    Joined:
    Mar 7, 2017
    Posts:
    23
    Ok nice thank you
     
  5. TigerFudo

    TigerFudo

    Joined:
    Nov 30, 2012
    Posts:
    27
    Is there any sample on how to setup intancing in shadergraph?
     
  6. darkydoodle

    darkydoodle

    Joined:
    Oct 27, 2018
    Posts:
    64
    Fine except for material property block parameters...
     
    TigerFudo likes this.
  7. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    You make your shader as you would.
    You can only enable instancing from a material so when you assign it to a material you will see "Enable GPU Instancing" on that material.

    upload_2019-2-5_12-4-2.png
     
    TigerFudo likes this.
  8. TigerFudo

    TigerFudo

    Joined:
    Nov 30, 2012
    Posts:
    27
    got it ,thx
     
  9. opponent019

    opponent019

    Joined:
    Feb 6, 2014
    Posts:
    28
    But if I do this it just turns black, any idea how to fix that?
     
  10. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,898
    Hi,

    I use the HDRP Lit shader and enabled this for objects copied and scaled - rotated around, but the batches are still enormous (like 3000) and "saved by batching' metric reports a minus -2000, is this meaning the batching is working ?
     
    Carrotpie likes this.