Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feature Request [PerRendererData] in Shader graph

Discussion in 'Shader Graph' started by JotaRata, Feb 7, 2020.

  1. JotaRata

    JotaRata

    Joined:
    Dec 8, 2014
    Posts:
    61
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    The
    PerRendererData
    doesn't actually do anything except hide the property from the Material inspector, and when it did do something was unrelated to instancing. It's unfortunate because the two articles everyone links to when they talk about it, one predates instancing and the other one is just straight up wrong.

    What you're asking about is per object settings via material property blocks for use with GPU instancing. In vertex fragment shaders these would be the properties you'd use the
    UNITY_DEFINE_INSTANCED_PROP
    macros with.

    No, Shader Graph doesn't support these. More recently versions of Shader Graph have added a "Hybrid instancing" option to properties, but I'm not entirely sure what these do yet as they do not appear to implemented fully, or require some other components I don't have installed. I know it's related to the DOTS Hybrid Renderer, but that's about it.
     
    ambre_m likes this.