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
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The version number for this package has increased due to a version update of a r
- Fixed a migration issue with the rendering queue in ShaderGraph when upgrading to 10.x;
- Fixed upside down XR occlusion mesh.
- Fixed precision issue with the atmospheric fog.
- Claryfied doc for the LayeredLit material.

### Changed
- Combined occlusion meshes into one to reduce draw calls and state changes with XR single-pass.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,22 @@ To create a new Layered Lit Material, navigate to your Project's Asset window, r
| **Height Transition** | Use the slider to set the transition blend size between the Materials in each layer. |
| **Lock Layers 123 Tiling With Object Scale** | Enable the checkbox to multiply the Material's tiling rate by the scale of the GameObject. This keeps the appearance of the heightmap consistent when you scale the GameObject. |

### Material To Copy
### Layer List

This section contains a list of the Materials that this Layered Material uses as layers. To assign a Material to a layer, either drag and drop a Material into the property field for that layer, or:

1. Click the radio button on the right of the layer to open the **Select Material** window.
2. Find the Material you want from the list of Materials in the window and double-click it.

To synchronize the properties between a referenced Material and the Layered Material, press the **Synchronize** button. This copies all of the properties from the referenced Material into the relevant Layered Material layer.
If you modify the referenced Material in any way, you can synchronize the properties by pressing the **Reset button**. This copies all of the properties from the referenced Material into the relevant Layered Material layer.

![](Images/LayeredLit1.png)

If you assign a Material made from a Shader Graph as a **Layer Material**, make sure the Reference of the properties matches the name of the corresponding properties in the LayeredLit Material.
For an example of what this means, see **_BaseColorMap** in the screenshot below:

![](Images/LayeredLit2.png)

### Layers

Unity exposes up to four Material layers for you to use in your Layered Material. Use the **Layer Count** slider to set the number of layers that Unity exposes. Every layer shares the same **Surface Inputs** and **Detail Inputs**. The only difference is between the **Main Layer** and the numbered layers (**Layer 1**, **Layer 2**, and **Layer 3**) which have separate **Layering Options**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ void DrawLayerListGUI()
resetRect.width = 50;
EditorGUI.LabelField(resetRect, Styles.resetButtonIcon);
}

if (m_MaterialLayers[layerIndex] != null && m_MaterialLayers[layerIndex].shader != null)
{
var shaderName = m_MaterialLayers[layerIndex].shader.name;
if (shaderName != "HDRP/Lit" && shaderName != "HDRP/LitTessellation")
EditorGUILayout.HelpBox("Selected material is not an HDRP Lit Material. Some properties may not be correctly imported.", MessageType.Info);
}
}

EditorGUIUtility.labelWidth = oldLabelWidth;
Expand Down