Class UniversalRenderPipelineRuntimeTerrainShaders
A resource container for shaders used for terrains in UniversalRenderPipeline.
Implements
Inherited Members
Namespace: UnityEngine.Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
[Serializable]
[SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
[CategoryInfo(Name = "R: Runtime Shaders", Order = 1000)]
[HideInInspector]
public class UniversalRenderPipelineRuntimeTerrainShaders : IRenderPipelineResources, IRenderPipelineGraphicsSettings
Remarks
You cannot edit these resources through the editor's UI; use the API for advanced changes. Changing this through the API is only allowed in the Editor. In the Player, this raises an error.
Examples
Here is an example of how to get the terrain detail lit shader used by URP.
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public static class URPUniversalRendererRuntimeShadersHelper
{
public static Shader terrainDetailLit
{
get
{
if (GraphicsSettings.TryGetRenderPipelineSettings<UniversalRenderPipelineRuntimeTerrainShaders>(
out var shadersResources))
{
return shadersResources.terrainDetailLitShader;
}
return null;
}
}
}
Properties
terrainDetailGrassBillboardShader
Returns the terrain detail grass billboard shader that this asset uses.
Declaration
public Shader terrainDetailGrassBillboardShader { get; set; }
Property Value
Type | Description |
---|---|
Shader |
See Also
terrainDetailGrassShader
Returns the terrain detail grass shader that this asset uses.
Declaration
public Shader terrainDetailGrassShader { get; set; }
Property Value
Type | Description |
---|---|
Shader |
See Also
terrainDetailLitShader
Returns the terrain detail lit shader that this asset uses.
Declaration
public Shader terrainDetailLitShader { get; set; }
Property Value
Type | Description |
---|---|
Shader |
See Also
version
The current version of the resource container. Used only for upgrading a project.
Declaration
public int version { get; }
Property Value
Type | Description |
---|---|
int |