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 | Behavior |
|---|---|
| Workflow Mode | Refer to the URP documentation for the Lit URP Shader. Note: Not applicable to URP Unlit and the Built-In Render Pipeline. |
| Receive Shadows | Refer to the URP documentation for the Lit URP Shader. Note: Not applicable to URP Unlit and the Built-In Render Pipeline. |
| 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. Note: Not applicable to the Built-In Render Pipeline. |
| Surface Type | Refer to the URP documentation for the Lit URP and Unlit URP shaders. Note: In the Built-In Render Pipeline, this feature has the same behavior as in URP. |
| Render Face | Refer to the URP documentation for the Lit URP and Unlit URP shaders. Note: In the Built-In Render Pipeline, this feature has the same behavior as in URP. |
| Alpha Clipping | Refer to the URP documentation for the Lit URP and Unlit URP shaders. Note: In the Built-In Render Pipeline, this feature has the same behavior as in URP. |
| 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. The options are:
|
| 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. The options are:
|
| 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. Note: Not applicable to the Built-In Render Pipeline. |
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.