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 @@ -40,7 +40,6 @@ Use Volumes to localize environmental Scene settings and post-processing effects
HDRP Shaders allow you to use the following features:

- [Opaque/transparent surfaces](Surface-Type.md).

- Different blend modes for transparent surfaces.
- Transparent surfaces that work with fog.
- Refraction and distortion for transparent surfaces.
Expand Down Expand Up @@ -116,7 +115,7 @@ The Decal Shader allows you to place decals on surfaces in your Scene. To apply

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

The Terrain Lit Shader is compatible with the built-in terrain system and supports up to eight layers in a single draw call. This Shader uses the same lighting model as the Lit Shader.
The Terrain Lit Shader is compatible with the built-in terrain system and supports up to eight layers in a single draw call. This Shader uses the same lighting model as the Lit Shader. For more information, including the full list of Shader properties, see the [Terrain Lit Shader documentation](Terrain-Lit-Shader.md).

<a name="Lighting"></a>

Expand Down
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 @@ -65,6 +65,7 @@
* [Layered Lit Shader](Layered-Lit-Shader)
* [Lit Tessellation Shader](Lit-Tessellation-Shader)
* [Lit Shader](Lit-Shader)
* [Terrain Lit Shader](Terrain-Lit-Shader.md)
* [Unlit Shader](Unlit-Shader)
* Shader Graph Master Nodes
* [Customizing Materials Using Master Nodes](Customizing-HDRP-materials-with-Shader-Graph)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# **Terrain Lit Shader**

The High Definition Render Pipeline (HDRP) uses the Terrain Lit Shader for Unity Terrain. This Shader is a simpler version of the [Lit Shader](Lit-Shader.md). A Terrain can use a Terrain Lit Material with up to eight [Terrain Layers](https://docs.unity3d.com/Manual/class-TerrainLayer.html).

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

## Creating a Terrain Lit Material

To create a new Terrain Lit Shader Material:

1. Go to your Project window and right-click in the **Assets** folder
2. Select **Create > Material**. This adds a new Material to your Unity Project’s Asset folder.
3. Click on the Material to view it in the Inspector.
4. Click on the **Shader** drop-down and select **HDRP > TerrainLit**.

## Using a Terrain Lit Material

To use a Terrain Lit Material, you must assign it to a Terrain:

1. View the Terrain in the Inspector and click on the cog button to go to the **Terrain Settings** section.
2. Either drag and drop or use the radio button to assign your Terrain Lit Material to the **Material** property.

![](Images/TerrainLitShader1.png)

## Material properties

### Surface Options

| **Property** | **Description** |
| ------------------ | ------------------------------------------------------------ |
| **Receive Decals** | Enable this checkbox to allow HDRP to draw decals on this Material’s surface. |

### Terrain

| **Property** | **Description** |
| ----------------------------- | ------------------------------------------------------------ |
| **Enable Height-based Blend** | Specifies whether HDRP should only render the Terrain Layer with the greatest height value for a particular pixel. When enabled, HDRP takes the height values from the blue channel of the **Mask Map** Texture. When disabled, HDRP blends the Terrain Layers based on the weights painted in the control map Textures. |
| **- Height Transition** | Controls how much HDRP blends the terrain if multiple Terrain Layers are approximately the same height. |
| **Enable Per-pixel Normal** | Specifies whether HDRP should sample the normal map Texture on a per-pixel level. When enabled, Unity preserves more geometry details for distant terrain parts. Unity generates a geometry normal map at runtime from the heightmap, rather than the Mesh geometry. This means you can have high-resolution Mesh normals, even if your Mesh is low resolution. It only works if you enable **Draw Instanced** on the terrain. |
| **Specular Occlusion Mode** | Sets the mode that HDRP uses to calculate specular occlusion. <br/>&#8226; **Off**: Disables specular occlusion.<br/>&#8226; **From Ambient Occlusion**: Calculates specular occlusion from the ambient occlusion map and the Camera's view direction. |

### Advanced Options

| **Property** | **Description** |
| ------------------------- | ------------------------------------------------------------ |
| **Enable GPU Instancing** | Enable this checkbox to tell HDRP to render meshes with the same geometry and Material/Shader in one batch when possible. This makes rendering faster. HDRP can not render Meshes in one batch if they have different Materials, or if the hardware does not support GPU instancing. |