Terrain Master Stack reference
You can modify the properties of a Terrain shader graph in the Terrain Master Stack.
Feature support
The Terrain Master Stack in HDRP doesn't support the following features:
- Ray tracing
- Path tracing
Terrain shader passes
Some properties might not work as expected, because the terrain system adds two additional shader passes when it generates a terrain shader. The passes are the following:
- Basemap Gen, which renders the shader graph on a quad to create a low-resolution baked version. As a result, the Position and Normal (Tangent Space) values are 2D during this pass.
- Basemap Rendering, which uses a built-in shader and the texture Basemap Gen generates. The Position Block has no affect on this pass.
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
When you create a new Terrain Master Stack, the Vertex Context contains the following Blocks by default:
Property | Description | Setting Dependency | Default Value |
---|---|---|---|
Position | The object space vertex position per vertex. | None | CoordinateSpace.Object |
Relevant
The vertex position passed to the vertex context does not have an effect on the Basemap rendering pass.
Fragment Context
Default
When you create a new Terrain Master Stack, the Fragment Context contains the following Blocks by default:
Property | Description | Setting Dependency | Default Value |
---|---|---|---|
Base Color | The base color of the material. | None | Color.grey |
Normal Tangent Space | The normal, in tangent space, for the material. | Fragment Normal Space set to Tangent | CoordinateSpace.Tangent |
Metallic | The material's metallic value. This defines how "metal-like" the surface of your Material is (between 0 and 1). When a surface is more metallic, it reflects the environment more and its albedo color becomes less visible. At full metallic level, the surface color is entirely driven by reflections from the environment. When a surface is less metallic, its albedo color is clearer and any surface reflections are visible on top of the surface color, rather than obscuring it. | None | 0.0 |
Emission | The color of light to emit from this material's surface. Emissive materials appear as a source of light in your scene. | None | Color.black |
Smoothness | The material's smoothness. Every light ray that hits a smooth surface bounces off at predictable and consistent angles. For a perfectly smooth surface that reflects light like a mirror, set this to a value of 1. Less smooth surfaces reflect light over a wider range of angles (because the light hits the bumps in the microsurface), so the reflections have less detail and spread across the surface in a more diffused pattern. | None | 0.5 |
Ambient Occlusion | The material's ambient occlusion. This approximates occlusion for a fragment on a GameObject’s surface that has been cast by details present in the Material but not the mesh geometry. A value of 0 means the fragment is completely occluded and appears black. A value of 1 means the fragment is not occluded at all, and the ambient color does not change. | None | 1.0 |
Relevant
Depending on the Graph Settings you use, Shader Graph can add the following Blocks to the Fragment Context:
Property | Description | Setting Dependency | Default Value |
---|---|---|---|
Alpha Clip Threshold | The alpha value limit that HDRP uses to determine whether to render each pixel. If the alpha value of the pixel is equal to or higher than the limit, HDRP renders the pixel. If the value is lower than the limit, HDRP does not render the pixel. The default value is 0.5. | Alpha Clipping enabled | 0.5 |
Baked Back GI | The global illumination (GI) value to apply to the back face of the Mesh only. This replaces the built-in diffuse GI solution. This port only appears when you enable the Override Baked GI setting. |
Override Baked GI enabled | 0.0 |
Baked GI | The global illumination (GI) value to apply to the front face of the Mesh only. This replaces the built-in diffuse GI solution. | • Override Baked GI enabled | 0.0 |
Depth Offset | The value that the Shader uses to increase the depth of the fragment by. This Block requires you to input the result of the Parallax Occlusion Mapping Node to produce a realistic result. | Depth Offset enabled | 0.0 |
Diffusion Profile | The Diffusion Profile to use for subsurface scattering and transmission. | • Material Type set to Subsurface Scattering or Translucent | 0.0 |
Normal Object Space | The normal, in object space, for the material. | Fragment Normal Space set to Object | CoordinateSpace.Object |
Normal World Space | The normal, in world space, for the material. | Fragment Normal Space set to World | CoordinateSpace.World |
Specular AA Screen Space Variance | The strength of the geometric specular anti-aliasing effect between 0 and 1. Higher values produce a blurrier result with less aliasing. | Specular AA enabled | 0.0 |
Specular AA Threshold | The maximum value that HDRP subtracts from the smoothness value to reduce artifacts. | Specular AA enabled | 0.0 |
Specular Occlusion | A multiplier for the intensity of specular global illumination. | Specular Occlusion Mode set to Custom | 1.0 |
Subsurface Mask | The strength of the screen-space blur effect across the Material. | Material set to Lit • Material Type set to Subsurface Scattering. |
1.0 |
Graph Settings
Surface Options
Property | Option | Sub-option | Description |
---|---|---|---|
Surface Type | Rendering Pass | N/A | Specifies the rendering pass that HDRP processes this material in. • Before Refraction: Draws the GameObject before the refraction pass. This means that HDRP includes this Material when it processes refraction. To expose this option, select Transparent from the Surface Type drop-down. • Default: Draws the GameObject in the default opaque or transparent rendering pass pass, depending on the Surface Type. • Low Resolution: Draws the GameObject in half resolution after the Default pass. • After post-process: For Unlit Materials only. Draws the GameObject after all post-processing effects. |
Fragment Normal Space | N/A | N/A | Specifies the normal map space that this Material uses. • TangentSpace: Defines the normals in tangent space. Use this to tile a Texture on a Mesh. • ObjectSpace: Defines the normals in object space. Use this for planar-mapping GameObjects like the terrain. • WorldSpace: Defines the normal maps in world space. |
Alpha Clipping | N/A | N/A | Indicates whether this material acts like a Cutout Shader. For more information about the feature and for the list of properties this feature exposes, see the Alpha Clipping documentation. |
Depth Offset | N/A | N/A | Indicates whether HDRP modifies the depth buffer according to the displacement. This allows effects that use the depth buffer (Contact Shadows for example) to capture pixel displacement details. |
Receive Decals | N/A | N/A | Indicates whether HDRP can draw decals on this material’s surface. |
Receive SSR | N/A | N/A | Indicates whether HDRP includes this material when it processes the screen space reflection pass. This property only appears if you set Surface Type to Opaque. |
Advanced Options
Property | Description |
---|---|
Specular Occlusion Mode | The mode that HDRP uses to calculate specular occlusion. The options are: • Off: Disables specular occlusion. • From AO: Calculates specular occlusion from the ambient occlusion map and the Camera's view vector. • From AO and Bent Normal: Calculates specular occlusion from the ambient occlusion map, the bent normal map, and the Camera's view vector. If no bent normal is provided, the normal is used instead. • Custom: Allows you to specify your own specular occlusion values. |
Override Baked GI | Indicates whether this Material ignores global illumination (GI) in the Scene and instead uses custom GI values. Enable this setting to add two baked GI Blocks to the Fragment Context that control GI for the Material. Disable this setting to make the Material use the Scene's GI. |
Support Lod Crossfade | Indicates whether HDRP processes dithering when a mesh moves moves from one LOD level to another. |
Add Precomputed Velocity |
Indicates whether to use precomputed velocity information stored in an Alembic file. |
Other top level settings
Property | Description |
---|---|
Support High Quality Line Rendering | Indicates whether this Shader Graph supports the High Quality Line Rendering feature. Enabling this property will only have an effect on renderers with line topology. |