Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The [Lit](Lit-Shader.md), [LayeredLit](Layered-Lit-Shader.md), and [Unlit](Unlit
To create a Material that uses a Shader Graph (for example, a StackLit Graph), follow these steps:

1. Create a Shader with the Shader Graph that you want the Material to use.
1. Go to **Assets > Create > Shader > HDRP** to find the list of HDRP Shader Graphs. For this example, click **StackLit Graph**.
1. Go to **Assets > Create > Shader Graph > HDRP** to find the list of HDRP Shader Graphs. For this example, click **StackLit Graph**.
1. Give the Shader Graph a unique name. This is important, because you need to reference this Shader Graph in the Material.
1. Create a Material from the Shader.
1. In your Project window, find the Shader that you just created and right-click it.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Decal Projector

The High Definition Render Pipeline (HDRP) includes the Decal Projector component, which allows you to project specific Materials (decals) into the Scene. Decals are Materials that use the [Decal Shader](Decal-Shader.md) or [Decal master node](Master-Node-Decal.md). When the Decal Projector component projects decals into the Scene, they interact with the Scene’s lighting and wrap around Meshes. You can use thousands of decals in your Scene simultaneously because HDRP instances them. This means that the rendering process is not resource intensive as long as the decals use the same Material.
The High Definition Render Pipeline (HDRP) includes the Decal Projector component, which allows you to project specific Materials (decals) into the Scene. Decals are Materials that use the [Decal Shader](Decal-Shader.md) or [Decal Master Stack](master-stack-decal.md). When the Decal Projector component projects decals into the Scene, they interact with the Scene’s lighting and wrap around Meshes. You can use thousands of decals in your Scene simultaneously because HDRP instances them. This means that the rendering process is not resource intensive as long as the decals use the same Material.

The Decal Projector also supports [Decal Layers](Decal.md) which means you can control which Materials receive decals on a Layer by Layer basis.

Expand Down Expand Up @@ -54,7 +54,7 @@ Using the Inspector allows you to change all of the Decal Projector properties,

## Limitations

- The Decal Projector can affect opaque Materials with either a [Decal Shader](Decal-Shader.md) or a [Decal master node](Master-Node-Decal.md). However, it can only affect transparent Materials with the [Decal Shader](Decal-Shader.md).
- The Decal Projector can affect opaque Materials with either a [Decal Shader](Decal-Shader.md) or a [Decal Master Stack](master-stack-decal.md). However, it can only affect transparent Materials with the [Decal Shader](Decal-Shader.md).
- Decal Emissive isn't supported on Transparent Material.
- The **Receive Decals** property of Materials in HDRP does not affect emissive decals. HDRP always renders emissive decals unless you use Decal Layers, which can disable emissive decals on a Layer by Layer basis.
- If you project a decal onto a transparent surface, HDRP ignores the decal's Texture tiling.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Decal

The High Definition Render Pipeline (HDRP) includes two ways to create decals in a Scene. You can either use a decal Mesh and manually position the decal or use the [Decal Projector](Decal-Projector.md) component to project the decal. Both of these methods require that you create a decal Material, which is a Material that uses either the [Decal Shader](Decal-Shader.md) or [Decal master node](Master-Node-Decal.md). You can use either to create decal Materials that you can place or project into a Scene.
The High Definition Render Pipeline (HDRP) includes two ways to create decals in a Scene. You can either use a decal Mesh and manually position the decal or use the [Decal Projector](Decal-Projector.md) component to project the decal. Both of these methods require that you create a decal Material, which is a Material that uses either the [Decal Shader](Decal-Shader.md) or [Decal Master Stack](master-stack-decal.md). You can use either to create decal Materials that you can place or project into a Scene.

![](Images/HDRPFeatures-DecalShader.png)

**Limitation and compatibility**

The Decal Projector can affect opaque Materials with either a [Decal Shader](Decal-Shader.md) or a [Decal master node](Master-Node-Decal.md). However, it can only affect transparent Materials with the [Decal Shader](Decal-Shader.md). It does not support emissive on Transparent Materials and does support Decal Layers.
Decal Meshes can only affect opaque Materials with either a [Decal Shader](Decal-Shader.md) or a [Decal master node](Master-Node-Decal.md). They also do not support Decal Layers.
The Decal Projector can affect opaque Materials with either a [Decal Shader](Decal-Shader.md) or a [Decal Master Stack](master-stack-decal.md). However, it can only affect transparent Materials with the [Decal Shader](Decal-Shader.md). It does not support emissive on Transparent Materials and does support Decal Layers.
Decal Meshes can only affect opaque Materials with either a [Decal Shader](Decal-Shader.md) or a [Decal Master Stack](master-stack-decal.md). They also do not support Decal Layers.

# Decal Layers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ The StackLit Shader improves on the Lit Shader in favor of quality over performa

![](Images/HDRPFeatures-HairShader.png)

The Hair Shader is purpose-built to accurately render realistic hair in your Unity Project. It uses an improved Kajiya Kay lighting model which features better energy conservation and provides you with more flexibility. For more information, including a full list of Shader properties, see the [Hair Shader documentation](Master-Node-Hair.md).
The Hair Shader is purpose-built to accurately render realistic hair in your Unity Project. It uses an improved Kajiya Kay lighting model which features better energy conservation and provides you with more flexibility. For more information, including a full list of Shader properties, see the [Hair Shader](hair-shader.md) and [Hair Master Stack](master-stack-hair.md) documentation.

### Fabric Shader

![](Images/HDRPFeatures-FabricShader.png)

The Fabric Shader allows you to render realistic fabric Materials in HDRP. You can use the cotton wool or silk lighting model to create a wide variety of fabrics. For more information, including a full list of Shader properties, see the [Fabric Shader documentation](Master-Node-Fabric.md).
The Fabric Shader allows you to render realistic fabric Materials in HDRP. You can use the cotton wool or silk lighting model to create a wide variety of fabrics. For more information, including a full list of Shader properties, see the [Cotton/Wool Shader](cotton-wool-shader.md), [Silk Shader](silk-shader.md), and [Fabric Master Stack](master-stack-fabric.md) documentation.

### AxF Shader

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This Sample includes various examples of lit and unlit particle effects.

![Material Samples](Images/MaterialSamples.png)

This Sample includes various examples of Materials. It includes Materials that use the [Lit Shader](Lit-Shader.md), [Fabric Master Node](Master-Node-Fabric.md), [Hair Master Node](Master-Node-Hair.md), [Eye Shader](eye-shader.md) and [Decal Master Node](Master-Node-Decal.md). The included Materials use effects such as subsurface scattering, displacement, and anisotropy. The **MaterialSamples** Scene requires Text Mesh Pro to display the text explanations.
This Sample includes various examples of Materials. It includes Materials that use the [Lit Shader](Lit-Shader.md), [Fabric Master Stack](master-stack-fabric.md), [Hair Master Stack](master-stack-hair.md), [Eye Shader](eye-shader.md) and [Decal Master Stack](master-stack-decal.md). The included Materials use effects such as subsurface scattering, displacement, and anisotropy. The **MaterialSamples** Scene requires Text Mesh Pro to display the text explanations.

The Fabric, Hair and Eye Master Nodes usually require various work from artists inside the Shader Graph and the Samples are a good head start.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
* [Autodesk Interactive Transparent Shader](Autodesk-Interactive-Shader-Transparent.md)
* [AxF Shader](AxF-Shader.md)
* [Decal Shader](Decal-Shader.md)
* [Cottom/Wool Shader](cotton-wool-shader.md)
* [Cotton/Wool Shader](cotton-wool-shader.md)
* [Eye Shader](eye-shader.md)
* [Hair Shader](hair-shader.md)
* [Layered Lit Shader](Layered-Lit-Shader.md)
Expand All @@ -105,13 +105,17 @@
* [Silk Shader](silk-shader.md)
* [Terrain Lit Shader](Terrain-Lit-Shader.md)
* [Unlit Shader](Unlit-Shader.md)
* Shader Graph Master Nodes
* [Customizing Materials Using Master Nodes](Customizing-HDRP-materials-with-Shader-Graph.md)
* [Decal](Master-Node-Decal.md)
* [Fabric](Master-Node-Fabric.md)
* [Hair](Master-Node-Hair.md)
* [Lit](Master-Node-Lit.md)
* [Unlit](Master-Node-Unlit.md)
* [Master Stacks in HDRP](master-stack-hdrp.md)
* [Contexts and Blocks](ss-contexts-and-blocks.md)
* [Vertex](ss-context-vertex.md)
* [Fragment](ss-context-fragment.md)
* [Decal Master Stack](master-stack-decal.md)
* [Eye Master Stack](master-stack-eye.md)
* [Fabric Master Stack](master-stack-fabric.md)
* [Hair Master Stack](master-stack-hair.md)
* [Lit Master Stack](master-stack-lit.md)
* [StackLit Master Stack](master-stack-stacklit.md)
* [Unlit Master Stack](master-stack-unlit.md)
* [Shader Graph Nodes](Shader-Graph-Nodes.md)
* Lighting
* [Reflection in HDRP](Reflection-in-HDRP.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The type of fibers that make up the fabric, as well as the fabric's knit or weav

![](Images/HDRPFeatures-CottonShader.png)

Under the hood, the Cotton/Wool shader is a pre-configured Shader Graph. To learn more about the Cotton/Wool shader implementation, or to create your own Fabric shader variant, see the Shader Graph documentation about the [Fabric Master Node](Master-Node-Fabric.md).
Under the hood, the Cotton/Wool shader is a pre-configured Shader Graph. To learn more about the Cotton/Wool shader implementation, or to create your own Fabric shader variant, see the Shader Graph documentation about the [Fabric Master Stack](master-stack-fabric.md).

## Importing the Cotton/Wool Fabric Sample

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ The Eye Shader is your starting point for rendering eyes in the High Definition

![](Images/HDRPFeatures-EyeShader.png)

Under the hood, the Eye shader is a pre-configured Shader Graph. To learn more about the Eye shader implementation, or to create your own Eye shader variant, see the Shader Graph documentation about the [Eye Master Node](Master-Node-Eye.md).
Under the hood, the Eye shader is a pre-configured Shader Graph. To learn more about the Eye shader implementation, or to create your own Eye shader variant, see the Shader Graph documentation about the [Eye Master Stack](master-stack-eye.md).

## Eye anatomy

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Decal

The Decal Master Stack material type enables you to author decals that you can [project](Decal-Projector.md) or place into your Scene. The Decal Master Stack material type is similar to the standard [Decal Shader](Decal-Shader.md), except that you cannot use this version to author decals projected on transparent materials.



![](Images/HDRPFeatures-DecalShader.png)

## Creating a Decal Shader Graph

To create a Decal material in Shader Graph, you can either:

* Modify an existing Shader Graph.
1. Open the Shader Graph in the Shader Editor.
2. In **Graph Settings**, select the **HDRP** Target. If there isn't one, go to **Active Targets,** click the **Plus** button, and select **HDRP**.
3. In the **Material** drop-down, select **Decal**.

* Create a new Shader Graph.
1. Go to **Assets > Create >Shader Graph > HDRP** and click **Decal Shader Graph**.

## Contexts

[!include[](snippets/master-stacks-contexts-intro.md)]

### Vertex Context

#### Default

<table>
<tr>
<th>Property</th>
<th>Description</th>
<th>Setting Dependency</th>
<th>Default Value</th>
</tr>
[!include[](snippets/shader-graph-blocks/vertex-position.md)]
[!include[](snippets/shader-graph-blocks/vertex-normal.md)]
[!include[](snippets/shader-graph-blocks/vertex-tangent.md)]
</table>

#### 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:

<table>
<tr>
<th>Property</th>
<th>Description</th>
<th>Setting Dependency</th>
<th>Default Value</th>
</tr>
[!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)]
</table>

#### 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 is projected or placed on. |
| **Affect Normal** | Indicates whether the decal shader affects the normals of GameObjects it is 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 is 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 is 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 is 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 is 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 does not work with receiving Materials that are transparent. |
Loading