docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ScriptableRenderPass

    ScriptableRenderPass implements a logical rendering pass that can be used to extend Universal RP renderer.

    Inheritance
    object
    ScriptableRenderPass
    RenderObjectsPass
    DrawSkyboxPass
    AdditionalLightsShadowCasterPass
    ColorGradingLutPass
    CopyColorPass
    CopyDepthPass
    DepthNormalOnlyPass
    DepthOnlyPass
    DrawObjectsPass
    FinalBlitPass
    MainLightShadowCasterPass
    XROcclusionMeshPass
    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
    public abstract class ScriptableRenderPass

    Constructors

    Name Description
    ScriptableRenderPass()

    Creates a new ScriptableRenderPass" instance.

    Fields

    Name Description
    k_CameraTarget

    RTHandle alias for BuiltinRenderTextureType.CameraTarget which is the backbuffer.

    Properties

    Name Description
    clearColor

    The color value to use when clearing.

    clearFlag

    The flag to use when clearing.

    colorAttachmentHandle

    The main color attachment handle.

    colorAttachmentHandles

    List for the g-buffer attachment handles.

    colorStoreActions

    The store actions for Color.

    depthAttachmentHandle

    The depth attachment handle.

    depthStoreAction

    The store actions for Depth.

    input

    The input requirements for the ScriptableRenderPass, which has been set using ConfigureInput

    profilingSampler

    A ProfilingSampler for the entire render pass. Used as a profiling name by ScriptableRenderer when executing the pass. Default is Unnamed_ScriptableRenderPass. Set base.profilingSampler from the sub-class constructor to set a profiling name for a custom ScriptableRenderPass.

    renderPassEvent

    The event when the render pass executes.

    Methods

    Name Description
    Blit(CommandBuffer, RTHandle, RTHandle, Material, int)

    Add a blit command to the context for execution. This changes the active render target in the ScriptableRenderer to destination.

    Blit(CommandBuffer, ref RenderingData, Material, int)

    Add a blit command to the context for execution. This applies the material to the color target.

    Blit(CommandBuffer, ref RenderingData, RTHandle, Material, int)

    Add a blit command to the context for execution. This applies the material to the color target.

    Configure(CommandBuffer, RenderTextureDescriptor)

    This method is called by the renderer before executing the render pass. Override this method if you need to to configure render targets and their clear state, and to create temporary render target textures. If a render pass doesn't override this method, this render pass renders to the active Camera's render target. You should never call CommandBuffer.SetRenderTarget. Instead call ConfigureTarget and ConfigureClear.

    ConfigureClear(ClearFlag, Color)

    Configures clearing for the render targets for this render pass. Call this inside Configure.

    ConfigureColorStoreAction(RenderBufferStoreAction, uint)

    Configures the Store Action for a color attachment of this render pass.

    ConfigureColorStoreActions(RenderBufferStoreAction[])

    Configures the Store Actions for all the color attachments of this render pass.

    ConfigureDepthStoreAction(RenderBufferStoreAction)

    Configures the Store Action for the depth attachment of this render pass.

    ConfigureInput(ScriptableRenderPassInput)

    Configures Input Requirements for this render pass. This method should be called inside ScriptableRendererFeature.AddRenderPasses.

    ConfigureTarget(RTHandle)

    Configures render targets for this render pass. Call this instead of CommandBuffer.SetRenderTarget. This method should be called inside Configure.

    ConfigureTarget(RTHandle, RTHandle)

    Configures render targets for this render pass. Call this instead of CommandBuffer.SetRenderTarget. This method should be called inside Configure.

    ConfigureTarget(RTHandle[])

    Configures render targets for this render pass. Call this instead of CommandBuffer.SetRenderTarget. This method should be called inside Configure.

    ConfigureTarget(RTHandle[], RTHandle)

    Configures render targets for this render pass. Call this instead of CommandBuffer.SetRenderTarget. This method should be called inside Configure.

    CreateDrawingSettings(List<ShaderTagId>, ref RenderingData, SortingCriteria)

    Creates DrawingSettings based on current rendering state.

    CreateDrawingSettings(ShaderTagId, ref RenderingData, SortingCriteria)

    Creates DrawingSettings based on current the rendering state.

    Execute(ScriptableRenderContext, ref RenderingData)

    Execute the pass. This is where custom rendering occurs. Specific details are left to the implementation

    OnCameraCleanup(CommandBuffer)

    Called upon finish rendering a camera. You can use this callback to release any resources created by this render pass that need to be cleanup once camera has finished rendering. This method be called for all cameras in a camera stack.

    OnCameraSetup(CommandBuffer, ref RenderingData)

    This method is called by the renderer before rendering a camera Override this method if you need to to configure render targets and their clear state, and to create temporary render target textures. If a render pass doesn't override this method, this render pass renders to the active Camera's render target. You should never call CommandBuffer.SetRenderTarget. Instead call ConfigureTarget and ConfigureClear.

    OnFinishCameraStackRendering(CommandBuffer)

    Called upon finish rendering a camera stack. You can use this callback to release any resources created by this render pass that need to be cleanup once all cameras in the stack have finished rendering. This method will be called once after rendering the last camera in the camera stack. Cameras that don't have an explicit camera stack are also considered stacked rendering. In that case the Base camera is the first and last camera in the stack.

    RecordRenderGraph(RenderGraph, FrameResources, ref RenderingData)

    Record the render graph pass. This is where custom rendering occurs. Specific details are left to the implementation

    ResetTarget()

    Resets render targets to default. This method effectively reset changes done by ConfigureTarget.

    Operators

    Name Description
    operator >(ScriptableRenderPass, ScriptableRenderPass)

    Compares two instances of ScriptableRenderPass by their RenderPassEvent and returns if lhs is executed after rhs.

    operator <(ScriptableRenderPass, ScriptableRenderPass)

    Compares two instances of ScriptableRenderPass by their RenderPassEvent and returns if lhs is executed before rhs.

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