Skip to content

Commit 9494209

Browse files
JordanL8sebastienlagarde
authored andcommitted
Added terrain lit doc (#573)
* Add terrain lit doc * Update HDRP-Features.md * Update HDRP-Features.md
1 parent eed5b28 commit 9494209

File tree

4 files changed

+51
-2
lines changed

4 files changed

+51
-2
lines changed

com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ Use Volumes to localize environmental Scene settings and post-processing effects
4040
HDRP Shaders allow you to use the following features:
4141

4242
- [Opaque/transparent surfaces](Surface-Type.md).
43-
4443
- Different blend modes for transparent surfaces.
4544
- Transparent surfaces that work with fog.
4645
- Refraction and distortion for transparent surfaces.
@@ -116,7 +115,7 @@ The Decal Shader allows you to place decals on surfaces in your Scene. To apply
116115

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

119-
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.
118+
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).
120119

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

Lines changed: 3 additions & 0 deletions
Loading

com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
* [Layered Lit Shader](Layered-Lit-Shader)
6464
* [Lit Tessellation Shader](Lit-Tessellation-Shader)
6565
* [Lit Shader](Lit-Shader)
66+
* [Terrain Lit Shader](Terrain-Lit-Shader.md)
6667
* [Unlit Shader](Unlit-Shader)
6768
* Shader Graph Master Nodes
6869
* [Customizing Materials Using Master Nodes](Customizing-HDRP-materials-with-Shader-Graph)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# **Terrain Lit Shader**
2+
3+
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).
4+
5+
![](Images/HDRPFeatures-TerrainShader.png)
6+
7+
## Creating a Terrain Lit Material
8+
9+
To create a new Terrain Lit Shader Material:
10+
11+
1. Go to your Project window and right-click in the **Assets** folder
12+
2. Select **Create > Material**. This adds a new Material to your Unity Project’s Asset folder.
13+
3. Click on the Material to view it in the Inspector.
14+
4. Click on the **Shader** drop-down and select **HDRP > TerrainLit**.
15+
16+
## Using a Terrain Lit Material
17+
18+
To use a Terrain Lit Material, you must assign it to a Terrain:
19+
20+
1. View the Terrain in the Inspector and click on the cog button to go to the **Terrain Settings** section.
21+
2. Either drag and drop or use the radio button to assign your Terrain Lit Material to the **Material** property.
22+
23+
![](Images/TerrainLitShader1.png)
24+
25+
## Material properties
26+
27+
### Surface Options
28+
29+
| **Property** | **Description** |
30+
| ------------------ | ------------------------------------------------------------ |
31+
| **Receive Decals** | Enable this checkbox to allow HDRP to draw decals on this Material’s surface. |
32+
33+
### Terrain
34+
35+
| **Property** | **Description** |
36+
| ----------------------------- | ------------------------------------------------------------ |
37+
| **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. |
38+
| **- Height Transition** | Controls how much HDRP blends the terrain if multiple Terrain Layers are approximately the same height. |
39+
| **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. |
40+
| **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. |
41+
42+
### Advanced Options
43+
44+
| **Property** | **Description** |
45+
| ------------------------- | ------------------------------------------------------------ |
46+
| **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. |

0 commit comments

Comments
 (0)