docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method RenderDepthFromCamera

    RenderDepthFromCamera(in CustomPassContext, Camera, LayerMask, RenderQueueType, RenderStateBlock)

    Render eye space depth of objects from the view point of a camera into the color buffer.

    Declaration
    public static void RenderDepthFromCamera(in CustomPassContext ctx, Camera view, LayerMask layerMask, CustomPass.RenderQueueType renderQueueFilter = RenderQueueType.All, RenderStateBlock overrideRenderState = default)
    Parameters
    Type Name Description
    CustomPassContext ctx

    Custom Pass Context.

    Camera view

    The camera from where you want the objects to be rendered.

    LayerMask layerMask

    LayerMask to filter the objects to render.

    CustomPass.RenderQueueType renderQueueFilter

    Render Queue to filter the type of objects you want to render.

    RenderStateBlock overrideRenderState

    The render states to override when rendering the objects.

    RenderDepthFromCamera(in CustomPassContext, Camera, RTHandle, RTHandle, ClearFlag, LayerMask, RenderQueueType, RenderStateBlock)

    Render eye space depth of objects from the view point of a camera into the color and depth buffers.

    Declaration
    public static void RenderDepthFromCamera(in CustomPassContext ctx, Camera view, RTHandle targetColor, RTHandle targetDepth, ClearFlag clearFlag, LayerMask layerMask, CustomPass.RenderQueueType renderQueueFilter = RenderQueueType.All, RenderStateBlock overrideRenderState = default)
    Parameters
    Type Name Description
    CustomPassContext ctx

    Custom Pass Context.

    Camera view

    The camera from where you want the objects to be rendered.

    RTHandle targetColor

    The render target that will be bound to the color buffer before rendering

    RTHandle targetDepth

    The render target that will be bound to the depth buffer before rendering

    ClearFlag clearFlag

    The type of clear to do before binding the render targets.

    LayerMask layerMask

    LayerMask to filter the objects to render.

    CustomPass.RenderQueueType renderQueueFilter

    Render Queue to filter the type of objects you want to render.

    RenderStateBlock overrideRenderState

    The render states to override when rendering the objects.

    RenderDepthFromCamera(in CustomPassContext, Camera, RenderTexture, ClearFlag, LayerMask, RenderQueueType, RenderStateBlock)

    Render eye space depth of objects from the view point of a camera into the color and depth buffers.

    Declaration
    public static void RenderDepthFromCamera(in CustomPassContext ctx, Camera view, RenderTexture targetRenderTexture, ClearFlag clearFlag, LayerMask layerMask, CustomPass.RenderQueueType renderQueueFilter = RenderQueueType.All, RenderStateBlock overrideRenderState = default)
    Parameters
    Type Name Description
    CustomPassContext ctx

    Custom Pass Context.

    Camera view

    The camera from where you want the objects to be rendered.

    RenderTexture targetRenderTexture

    The render target that will be bound before rendering the objects.

    ClearFlag clearFlag

    The type of clear to do before binding the render targets.

    LayerMask layerMask

    LayerMask to filter the objects to render.

    CustomPass.RenderQueueType renderQueueFilter

    Render Queue to filter the type of objects you want to render.

    RenderStateBlock overrideRenderState

    The render states to override when rendering the objects.

    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)