docs.unity3d.com
    Show / Hide Table of Contents

    Class HDRenderPipeline

    High Definition Render Pipeline class.

    Inheritance
    Object
    RenderPipeline
    HDRenderPipeline
    Inherited Members
    UnityEngine.Rendering.RenderPipeline.ProcessRenderRequests(UnityEngine.Rendering.ScriptableRenderContext, UnityEngine.Camera, System.Collections.Generic.List<UnityEngine.Camera.RenderRequest>)
    RenderPipeline.BeginFrameRendering(ScriptableRenderContext, Camera[])
    UnityEngine.Rendering.RenderPipeline.BeginContextRendering(UnityEngine.Rendering.ScriptableRenderContext, System.Collections.Generic.List<UnityEngine.Camera>)
    RenderPipeline.BeginCameraRendering(ScriptableRenderContext, Camera)
    UnityEngine.Rendering.RenderPipeline.EndContextRendering(UnityEngine.Rendering.ScriptableRenderContext, System.Collections.Generic.List<UnityEngine.Camera>)
    RenderPipeline.EndFrameRendering(ScriptableRenderContext, Camera[])
    RenderPipeline.EndCameraRendering(ScriptableRenderContext, Camera)
    UnityEngine.Rendering.RenderPipeline.Render(UnityEngine.Rendering.ScriptableRenderContext, System.Collections.Generic.List<UnityEngine.Camera>)
    RenderPipeline.disposed
    Namespace: UnityEngine.Rendering.HighDefinition
    Syntax
    public class HDRenderPipeline : RenderPipeline, IDataProvider

    Constructors

    HDRenderPipeline(HDRenderPipelineAsset)

    HDRenderPipeline constructor.

    Declaration
    public HDRenderPipeline(HDRenderPipelineAsset asset)
    Parameters
    Type Name Description
    HDRenderPipelineAsset asset

    Source HDRenderPipelineAsset.

    HDRenderPipeline(HDRenderPipelineAsset, HDRenderPipelineAsset)

    HDRenderPipeline constructor.

    Declaration
    public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset obsolete_defaultAsset)
    Parameters
    Type Name Description
    HDRenderPipelineAsset asset

    Source HDRenderPipelineAsset.

    HDRenderPipelineAsset obsolete_defaultAsset

    Default HDRenderPipelineAsset. [Obsolete]

    Fields

    k_ShaderTagName

    Shader Tag for the High Definition Render Pipeline.

    Declaration
    public const string k_ShaderTagName = "HDRenderPipeline"
    Field Value
    Type Description
    String

    Properties

    debugDisplaySettings

    Debug display settings.

    Declaration
    public DebugDisplaySettings debugDisplaySettings { get; }
    Property Value
    Type Description
    DebugDisplaySettings

    defaultSettings

    Accessor to the active Global Settings for the HD Render Pipeline.

    Declaration
    public override RenderPipelineGlobalSettings defaultSettings { get; }
    Property Value
    Type Description
    RenderPipelineGlobalSettings
    Overrides
    UnityEngine.Rendering.RenderPipeline.defaultSettings

    rayTracingSupported

    Flag that defines if ray tracing is supported by the current HDRP asset and platform

    Declaration
    public bool rayTracingSupported { get; }
    Property Value
    Type Description
    Boolean

    Methods

    AddInstanceToRAS(RayTracingAccelerationStructure, Renderer, HDEffectsParameters, ref Boolean, ref Boolean)

    Function that adds a renderer to a ray tracing acceleration structure.

    Declaration
    public static AccelerationStructureStatus AddInstanceToRAS(RayTracingAccelerationStructure targetRTAS, Renderer currentRenderer, HDEffectsParameters effectsParameters, ref bool transformDirty, ref bool materialsDirty)
    Parameters
    Type Name Description
    RayTracingAccelerationStructure targetRTAS

    Ray Tracing Acceleration structure the renderer should be added to.

    Renderer currentRenderer

    The renderer that should be added to the RTAS.

    HDEffectsParameters effectsParameters

    Structure defining the enabled ray tracing and path tracing effects for a camera.

    Boolean transformDirty

    Flag that indicates if the renderer's transform has changed.

    Boolean materialsDirty

    Flag that indicates if any of the renderer's materials have changed.

    Returns
    Type Description
    AccelerationStructureStatus

    BeginRecording(Int32, Single, Single, Single)

    Should be called to start a multi-frame recording session. Each final frame will be an accumulation of multiple sub-frames.

    Declaration
    public void BeginRecording(int samples, float shutterInterval, float shutterFullyOpen = 0F, float shutterBeginsClosing = 1F)
    Parameters
    Type Name Description
    Int32 samples

    The number of subframes. Each recorded frame will be an accumulation of this number of framesIn case path tracing is enabled, this value will override the settign in the volume.

    Single shutterInterval

    The duration the shutter of the virtual camera is open (for motion blur). Between 0 and 1.

    Single shutterFullyOpen

    The time it takes for the shutter to fully open. Between 0 and 1.

    Single shutterBeginsClosing

    The time when the shutter starts closing. Between 0 and 1.

    BeginRecording(Int32, Single, AnimationCurve)

    Should be called to start a multi-frame recording session. Each final frame will be an accumulation of multiple sub-frames.

    Declaration
    public void BeginRecording(int samples, float shutterInterval, AnimationCurve shutterProfile)
    Parameters
    Type Name Description
    Int32 samples

    The number of subframes. Each recorded frame will be an accumulation of this number of frames. In case path tracing is enabled, this value will override the settign in the volume.

    Single shutterInterval

    The duration the shutter of the virtual camera is open (for motion blur). Between 0 and 1.

    AnimationCurve shutterProfile

    An animation curve (between 0 and 1) denoting the motion of the camera shutter.

    Dispose(Boolean)

    Disposable pattern implementation.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    Is disposing.

    Overrides
    UnityEngine.Rendering.RenderPipeline.Dispose(System.Boolean)

    EndRecording()

    Should be called to finish a multi-frame recording session

    Declaration
    public void EndRecording()

    EvaluateEffectsParameters(HDCamera, Boolean, Boolean)

    Function that returns the ray tracing and path tracing effects that are enabled for a given camera.

    Declaration
    public static HDEffectsParameters EvaluateEffectsParameters(HDCamera hdCamera, bool rayTracedShadows, bool rayTracedContactShadows)
    Parameters
    Type Name Description
    HDCamera hdCamera

    The input camera

    Boolean rayTracedShadows

    Flag that defines if at least one light has ray traced shadows.

    Boolean rayTracedContactShadows

    Flag that defines if at least one light has ray traced contact shadows

    Returns
    Type Description
    HDEffectsParameters

    HDEffectsParameters type.

    ExportSkyToTexture(Camera)

    Export the provided camera's sky to a flattened cubemap.

    Declaration
    public Texture2D ExportSkyToTexture(Camera camera)
    Parameters
    Type Name Description
    Camera camera

    Requested camera.

    Returns
    Type Description
    Texture2D

    Result texture.

    GetMainLight()

    Main directional Light for the HD Render Pipeline.

    Declaration
    public Light GetMainLight()
    Returns
    Type Description
    Light

    The main directional Light.

    GetRaysPerFrame(RayCountValues)

    This functions allows the user to have an approximation of the number of rays that were traced for a given frame.

    Declaration
    public uint GetRaysPerFrame(RayCountValues rayValues)
    Parameters
    Type Name Description
    RayCountValues rayValues

    Specifes which ray count value should be returned.

    Returns
    Type Description
    UInt32

    The approximated ray count for a frame

    HDRDataDetectedProperly()

    Returns whether the data for HDR is detected properly from the device. If this returns false it is suggested that a calibration screen is used to set the min/max nits limits and paperwhite values.

    Declaration
    public static bool HDRDataDetectedProperly()
    Returns
    Type Description
    Boolean

    Whether the data for HDR is detected properly from the device.

    IsFrameCompleted(HDCamera)

    Checks if the multi-frame accumulation is completed for a given camera.

    Declaration
    public bool IsFrameCompleted(HDCamera hdCamera)
    Parameters
    Type Name Description
    HDCamera hdCamera

    Camera for which the accumulation status is checked.

    Returns
    Type Description
    Boolean

    true if the accumulation is completed, false otherwise.

    PrepareNewSubFrame()

    Should be called during a recording session when preparing to render a new sub-frame of a multi-frame sequence where each final frame is an accumulation of multiple sub-frames.

    Declaration
    public void PrepareNewSubFrame()

    ReleasePersistentShadowAtlases()

    Release all persistent shadow atlas. In HDRP, shadow persistent atlases are allocated per light type (area, punctual or directional) when needed but never deallocated. Calling this will force deallocation of those atlases. This can be useful between levels for example when you know that some types of lights aren't used anymore.

    Declaration
    public void ReleasePersistentShadowAtlases()

    Render(ScriptableRenderContext, Camera[])

    RenderPipeline Render implementation.

    Declaration
    protected override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
    Parameters
    Type Name Description
    ScriptableRenderContext renderContext

    Current ScriptableRenderContext.

    Camera[] cameras

    List of cameras to render.

    Overrides
    RenderPipeline.Render(ScriptableRenderContext, Camera[])

    RequestSkyEnvironmentUpdate()

    Request an update of the environment lighting.

    Declaration
    public void RequestSkyEnvironmentUpdate()

    ResetPathTracing()

    Resets path tracing accumulation for all cameras.

    Declaration
    public void ResetPathTracing()

    ResetPathTracing(HDCamera)

    Resets path tracing accumulation for a specific camera.

    Declaration
    public void ResetPathTracing(HDCamera hdCamera)
    Parameters
    Type Name Description
    HDCamera hdCamera

    Camera for which the accumulation is reset.

    ResetRTHandleReferenceSize(Int32, Int32)

    Resets the reference size of the internal RTHandle System. This allows users to reduce the memory footprint of render textures after doing a super sampled rendering pass for example.

    Declaration
    public void ResetRTHandleReferenceSize(int width, int height)
    Parameters
    Type Name Description
    Int32 width

    New width of the internal RTHandle System.

    Int32 height

    New height of the internal RTHandle System.

    Explicit Interface Implementations

    IDataProvider.Cleanup(StageRuntimeInterface)

    The HDRP implementation for the callback that the look dev raises to process any necessary cleanup.

    Declaration
    void IDataProvider.Cleanup(StageRuntimeInterface SRI)
    Parameters
    Type Name Description
    StageRuntimeInterface SRI

    Access element of the LookDev's scene

    Implements
    IDataProvider.Cleanup(StageRuntimeInterface)

    IDataProvider.FirstInitScene(StageRuntimeInterface)

    This hook allows HDRP to init the scene when creating the view

    Declaration
    void IDataProvider.FirstInitScene(StageRuntimeInterface SRI)
    Parameters
    Type Name Description
    StageRuntimeInterface SRI

    The StageRuntimeInterface allowing to communicate with the LookDev

    Implements
    IDataProvider.FirstInitScene(StageRuntimeInterface)

    IDataProvider.OnBeginRendering(StageRuntimeInterface)

    This hook allows HDRP to apply some changes before the LookDev's Camera render. Should mainly be used for view isolation.

    Declaration
    void IDataProvider.OnBeginRendering(StageRuntimeInterface SRI)
    Parameters
    Type Name Description
    StageRuntimeInterface SRI

    The StageRuntimeInterface allowing to communicate with the LookDev

    Implements
    IDataProvider.OnBeginRendering(StageRuntimeInterface)

    IDataProvider.OnEndRendering(StageRuntimeInterface)

    This hook allows HDRP to apply some changes after the LookDev's Camera render. Should mainly be used for view isolation.

    Declaration
    void IDataProvider.OnEndRendering(StageRuntimeInterface SRI)
    Parameters
    Type Name Description
    StageRuntimeInterface SRI

    The StageRuntimeInterface allowing to communicate with the LookDev

    Implements
    IDataProvider.OnEndRendering(StageRuntimeInterface)

    IDataProvider.supportedDebugModes

    This hook allows HDRP to give to LookDev what debug mode it can support.

    Declaration
    IEnumerable<string> IDataProvider.supportedDebugModes { get; }
    Returns
    Type Description
    IEnumerable<String>
    Implements
    IDataProvider.supportedDebugModes

    IDataProvider.UpdateDebugMode(Int32)

    This hook allows HDRP to update the debug mode used while requested in the LookDev.

    Declaration
    void IDataProvider.UpdateDebugMode(int debugIndex)
    Parameters
    Type Name Description
    Int32 debugIndex

    The index corresponding to the debug view, -1 = none, other have same index than iven by IDataProvider.supportedDebugModes

    Implements
    IDataProvider.UpdateDebugMode(Int32)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023