Search Unity

Feature Request Allow Properties to appear in Property Block but be excluded from PerMaterial CBuffer

Discussion in 'Shader Graph' started by equalsequals, Feb 27, 2020.

  1. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    154
    As of 7.x there doesn't seem to be a way to do this as far as I know. Currently we are able to exclude a Property from the Property Block in the Blackboard which in turn excludes it from the CBuffer, but it would be useful if we could allow for a property to be in the Property Block but excluded in the UnityPerMaterial CBuffer.

    We've used this in the past with hand-written Shaders and ShaderGUI to serialize some extra data with the Material that may be useful. In our custom SubShader we can inject properties analytically on generation but as far as I can tell there is no way to do this without modifying the source ShaderGraph code, which I'd like to keep to a minimum.