docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class UniversalRenderPipelineDebugShaders

    A resource container for debug shaders used for UniversalRenderPipeline.

    Inheritance
    object
    UniversalRenderPipelineDebugShaders
    Implements
    IRenderPipelineResources
    IRenderPipelineGraphicsSettings
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    IRenderPipelineResources

    hdrDebugViewPS

    Debug shader used to output HDR Chromacity mapping.

    Declaration
    public Shader hdrDebugViewPS { get; set; }
    Property Value
    Type Description
    Shader
    See Also
    IRenderPipelineResources

    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
    ComputeShader
    See Also
    IRenderPipelineResources

    version

    Current version of this resource container. Used only for upgrading a project.

    Declaration
    public int version { get; }
    Property Value
    Type Description
    int
    See Also
    IRenderPipelineResources

    Implements

    IRenderPipelineResources
    IRenderPipelineGraphicsSettings

    See Also

    IRenderPipelineResources
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)