Class UniversalRenderPipelineDebugShaders
A resource container for debug shaders used for Universal
Inherited Members
Namespace: UnityEngine .Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
[Serializable]
[SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
[CategoryInfo(Name = "R: Debug Shaders", Order = 1000)]
[HideInInspector]
public class UniversalRenderPipelineDebugShaders : 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.
This container is removed for non-development build.
Examples
Here is an example of how to get the replacement pixel shader used by URP.
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public static class URPUniversalRendererDebugShadersHelper
{
public static Shader replacementPS
{
get
{
var gs = GraphicsSettings.GetRenderPipelineSettings<UniversalRenderPipelineDebugShaders>();
if (gs == null) //not in URP or not in development build
return null;
return gs.debugReplacementPS;
}
}
}
Properties
debugReplacementPS
Debug shader used to output interpolated vertex attributes.
Declaration
public Shader debugReplacementPS { get; set; }
Property Value
Type | Description |
---|---|
Shader |
See Also
hdrDebugViewPS
Debug shader used to output HDR Chromacity mapping.
Declaration
public Shader hdrDebugViewPS { get; set; }
Property Value
Type | Description |
---|---|
Shader |
See Also
probeVolumeSamplingDebugComputeShader
Debug shader used to output world position and world normal for the pixel under the cursor.
Declaration
public ComputeShader probeVolumeSamplingDebugComputeShader { get; set; }
Property Value
Type | Description |
---|---|
Compute |
See Also
version
Current version of this resource container. Used only for upgrading a project.
Declaration
public int version { get; }
Property Value
Type | Description |
---|---|
int |