Search Unity

Feature Request GPU Instancing variables on Shader Graph

Discussion in 'Shader Graph' started by james_unity988, Apr 6, 2019.

  1. james_unity988

    james_unity988

    Joined:
    Aug 10, 2018
    Posts:
    71
    Hi there,

    I am trying to use SRP with Pure ECS. I am building custom shaders in Shader Graph which require per-instance variables to be rendered properly. How can I achieve this? If not possible yet, please let me know how big of a priority it is. If I need to switch back to Classic rendering I will.

    Thanks
    James
     
  2. Kink3d

    Kink3d

    Joined:
    Nov 16, 2015
    Posts:
    45
    Hi,

    Assuming you are talking about `BatchRendererGroup`, I'm afraid this will not work (at least for now). This only supports Model matrices per instance and doesn't support arbitrary per-instance data. Core Graphics team is working on expanding this but I'm afraid I cant offer any real information or timelines.

    When we have the underlying implementation in place, Shader Graph will then need to look at supporting generation of arbitrary constant buffers.
     
    Gekigengar and SubPixelPerfect like this.
  3. james_unity988

    james_unity988

    Joined:
    Aug 10, 2018
    Posts:
    71
    That's great to know! I'll stick with classic render pipeline for now. Thanks!
     
  4. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Its 2020, any word on this?
     
  5. SeriouslyNot

    SeriouslyNot

    Joined:
    Nov 24, 2017
    Posts:
    121
    @Kink3d

    How about now?

    There is a "Hybrid Instanced (Experimental)" checkbox under Color and Vector1 in the Blackboard. Is that it?

    Can you please give a feedback.
     
  6. Foreman_Dev

    Foreman_Dev

    Joined:
    Feb 4, 2018
    Posts:
    82
    Any update on this in 2022? I have a Shader Graph material that I'd like to support GPU instancing but I couldn't find much info out there about it.
     
  7. Tudvari

    Tudvari

    Joined:
    Jun 3, 2014
    Posts:
    30
    Bump!
     
    Foreman_Dev likes this.
  8. riaarvr

    riaarvr

    Joined:
    Aug 15, 2018
    Posts:
    2
    bump.. 2022 dude! Whyyyy you can`t... ;(
     
    Foreman_Dev likes this.
  9. kulesz

    kulesz

    Joined:
    Jul 1, 2012
    Posts:
    140
    Bump as it's almost 2023?
     
    Foreman_Dev likes this.
  10. YiboInsane

    YiboInsane

    Joined:
    Jul 22, 2019
    Posts:
    16
    Bumpbump.XD
     
    Foreman_Dev likes this.
  11. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,165
    This is somehow very silenced even it was very important
     
    DJ_Design and Foreman_Dev like this.
  12. LawrenceWin

    LawrenceWin

    Joined:
    Dec 29, 2022
    Posts:
    1
    The InstanceID node can't even work properly in 2022.2... RenderMeshPrimitives can set the
    SV_InstanceID attribute in traditional shader file while InstanceID node in Shader Graph always return 0.
     
    Foreman_Dev likes this.
  13. DJ_Design

    DJ_Design

    Joined:
    Mar 14, 2013
    Posts:
    124
  14. TimRad96

    TimRad96

    Joined:
    Jan 3, 2022
    Posts:
    3
    wow
    No answer
     
    Foreman_Dev likes this.
  15. BBZ-Game

    BBZ-Game

    Joined:
    May 19, 2021
    Posts:
    10
    555,No answer until 2024
     
    Foreman_Dev likes this.
  16. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Its 2024, any word on this?
     
    Foreman_Dev likes this.
  17. duy_

    duy_

    Joined:
    Nov 2, 2021
    Posts:
    1
    add to wishlist
     
    Foreman_Dev likes this.
  18. mysticcoder

    mysticcoder

    Joined:
    Oct 9, 2014
    Posts:
    9