Modify surface options without changing your graph
Description
Enable Allow Material Override to modify a specific set of properties for Universal Render Pipeline Lit and Unlit Shader Graphs and for Built-In Render Pipeline Shader Graphs in the Material Inspector.
Property | URP Lit | URP Unlit | Built-In Render Pipeline |
Workflow Mode | See the URP documentation for the Lit URP Shader. | Not applicable. | Not applicable. |
Receive Shadows | |||
Cast Shadows | This property is only exposed if Allow Material Override is enabled for this Shader Graph. Enable this property to make it possible for a GameObject using this shader to cast shadows onto itself and other GameObjects. This corresponds to the SubShader Tag ForceNoShadowCasting. | Not applicable. | |
Surface Type | See the URP documentation for the Lit and Unlit Shaders. | In the Built-In Render Pipeline, this feature has the same behavior as in URP. Consult the URP documentation. | |
Render Face | In the Built-In Render Pipeline, this feature has the same behavior as in URP. Consult the URP documentation. | ||
Alpha Clipping | In the Built-In Render Pipeline, this feature has the same behavior as in URP. Consult the URP documentation. | ||
Depth Write |
This property is only exposed if Allow Material Override is enabled for this Shader Graph. Use this property to determine whether the GPU writes pixels to the depth buffer when it uses this shader to render geometry. Options:
| ||
Depth Test | This property is only exposed if Allow Material Override is enabled for this Shader Graph. Use this property to set the conditions under which pixels pass or fail depth testing. The GPU does not draw pixels that fail a depth test. If you choose anything other than LEqual (the default setting for this property), consider also changing the rendering order of this material. Options:
| ||
Support VFX Graph | This property is only available if the Visual Effect Graph package is installed. Indicates whether this Shader Graph supports the Visual Effect Graph. If you enable this property, output contexts can use this Shader Graph to render particles. The internal setup that Shader Graph does to support visual effects happens when Unity imports the Shader Graph. This means that if you enable this property, but don't use the Shader Graph in a visual effect, there is no impact on performance. It only affects the Shader Graph import time. | Not applicable. |
How to use
To use the Material Override feature:
- Create a new graph in Shader Graph.
- Save this graph.
- Open the Graph Inspector.
- Set Active Targets to Universal or Built In.
- In the Graph Inspector’s Universal or Built In section, enable Allow Material Override.
- Create or select a Material or GameObject which uses your Shader Graph.
- In the Material Inspector, modify Surface Options for the target Material or GameObject.