Hi @DevDunk,
We only backport bug fixes, not features.
This feature is also quite involved.
Let me share more details about it:
Keywords
Before Unity 6.3, you could already add keywords in sub graphs, but with limitations:
- only one level of nesting
- could not generate a property for them
- mostly relevant for multi-compile and overridable keywords you would set globally
- or you also had to add the same keyword in the main graph
In Unity 6.3, you can now:
- add them in nested sub graphs
- generate and promote their property to the main graph
- which allows for any keyword (shader feature, multi-compile or dynamic branch) to automatically appear in material instances
Properties
Before Unity 6.3, subgraph properties would only serve as input ports for the subgraph.
In Unity 6.3, you can now promote a subgraph property, which will not generate an input port, but instead add it as a material property to the main graph.
Globals
Before Unity 6.3, using a Custom Function Node, you could declare a uniform and fetch it as a global property from within a subgraph.
In Unity 6.3, this is much easier as you can just add a property to a subgraph and promote it as a global.
Per Material
Promoted properties work just as main graph properties. You can decide whether you want to show them in the material inspector and adjust their settings the same.
Categories & Duplicates
Properties put in categories will show in the material inspector in the category foldout.
Root properties will show in a foldout named after the subgraph.
If a promoted property is used in different subgraphs, given their name, type and category path all match, they will appear as one property.
Say you have a “material permeability” property that’s meant to tell how much a material will absorbe water for example. You may want to use it in several subgraphs, for adding rain, snow, mud, etc.
Each of those subgraphs can expose and promote that same property, in a category “material properties”, and it will appear only once in the material.
Under the hood, this will generate only one uniform, and only one ShaderLab property.
VFX Graph
Note to VFX Graph users.
Please note that those promoted properties will not show as input ports in a Shader Graph Output Block.
We do appreciate how useful this would be for uber VFX shaders, and further improvements are under consideration.
I hope this helps you discover this new feature better while we’re working on the documentation.