Search Unity

Feature Request [PerRendererData] in Shader graph

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

  1. JotaRata

    JotaRata

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

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    8,096
    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.
     
unityunity