Decal
The Decal Master Stack material type enables you to author decals that you can project or place into your Scene. The Decal Master Stack material type is similar to the standard Decal Shader, except that you can't use this version to author decals projected on transparent materials.
Creating a Decal Shader Graph
To create a Decal material in Shader Graph, use one of the following methods:
- Modify an existing Shader Graph.
- Open the Shader Graph in the Shader Editor.
- In Graph Settings, select the HDRP Target. If there isn't one, go to Active Targets, click the Plus button, and select HDRP.
- In the Material drop-down, select Decal.
- Create a new Shader Graph. Go to Assets > Create > Shader Graph > HDRP and click Decal Shader Graph.
Contexts
This Master Stack material type has its own set of Graph Settings. Because of the relationship between settings and Blocks, this has consequences on which Blocks are relevant to the Graph. This section contains information on the Blocks this Master Stack material type adds by default, and which Blocks set properties for this Master Stack material type's Graph Settings.
For more information about the relationship between Graph Settings and Blocks, see Contexts and Blocks.
Vertex Context
Default
[!include[](snippets/shader-graph-blocks/vertex-position.md)] [!include[](snippets/shader-graph-blocks/vertex-normal.md)] [!include[](snippets/shader-graph-blocks/vertex-tangent.md)]Property | Description | Setting Dependency | Default Value |
---|
Relevant
This Master Stack material type adds all its Vertex Blocks to the Vertex Context by default and has no extra relevant Blocks.
Fragment Context
Default
When you create a new Decal Master Stack, the Fragment Context contains the following Blocks by default:
[!include[](snippets/shader-graph-blocks/base-color.md)] [!include[](snippets/shader-graph-blocks/alpha.md)] [!include[](snippets/shader-graph-blocks/normal-tangent-space.md)] [!include[](snippets/shader-graph-blocks/normal-alpha.md)] [!include[](snippets/shader-graph-blocks/metallic.md)] [!include[](snippets/shader-graph-blocks/ambient-occlusion.md)] [!include[](snippets/shader-graph-blocks/smoothness.md)] [!include[](snippets/shader-graph-blocks/maos-alpha.md)] [!include[](snippets/shader-graph-blocks/emission.md)]Property | Description | Setting Dependency | Default Value |
---|
Relevant
This Master Stack material type adds all its Fragment Blocks to the Fragment Context by default and has no extra relevant Blocks.
Graph Settings
Surface Options
Setting | Description |
---|---|
Affect BaseColor | Indicates whether the decal shader affects the base color of Materials it's projected or placed on. |
Affect Normal | Indicates whether the decal shader affects the normals of GameObjects it's projected or placed on. When enabled, the shader uses the Normal Block to override the receiving Material's normals. |
Affect Metal | Indicates whether the decal shader affects the metallic property of Materials it's projected or placed on. When enabled, the shader uses the Metallic Block to override the receiving Material's metallic property. |
Affect Ambient Occlusion | Indicates whether the decal shader affects the ambient occlusion property of Materials it's projected or placed on. When enabled, the shader uses the Ambient Occlusion Block to override the receiving Material's ambient occlusion. |
Affect Smoothness | Indicates whether the decal shader affects the smoothness property of materials it's projected or placed on. When enabled, the shader uses the Smoothness Block to override the receiving Material's smoothness property. |
Affect Emissive | Indicates whether the decal shader affects the emission property of Materials it's projected or placed on. When enabled, the shader uses the Emission Block to override the receiving Material's emission property. Emissive Materials appear self-illuminated and act as a visible source of light. This property doesn't work with receiving Materials that are transparent. |