docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRPass

    XRPass holds the render target information and a list of XRView. XRView contains the parameters required to render (projection and view matrices, viewport, etc) When a pass has 2 views or more, single-pass will be active if the platform supports it. To avoid allocating every frame, XRView is a struct and XRPass is pooled.

    Inheritance
    object
    XRPass
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Experimental.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public class XRPass

    Constructors

    Name Description
    XRPass()

    Parameterless constructor. Note: in order to avoid GC, the render pipeline should use XRPass.Create instead of this method.

    Properties

    Name Description
    copyDepth

    If true, the render pipeline is expected to output a valid depth buffer to the renderTarget.

    cullingParams

    Parameters used for culling.

    cullingPassId

    Index used for culling. It can be shared between multiple passes.

    enabled

    Returns true if the pass contains at least one view.

    foveatedRenderingInfo

    Native pointer from the XR plugin to be consumed by ConfigureFoveatedRendering.

    hasValidOcclusionMesh

    Returns true if the pass was setup with expected mesh and material.

    hdrDisplayOutputColorGamut
    hdrDisplayOutputInformation
    isHDRDisplayOutputActive
    multipassId

    Index of the pass inside the frame.

    renderTarget

    Destination render target.

    renderTargetDesc

    Destination render target descriptor.

    singlePassEnabled

    If true, the render pipeline is expected to use single-pass techniques to save CPU time.

    supportsFoveatedRendering

    Returns true if the pass can use foveated rendering commands.

    viewCount

    Returns the number of views inside this pass.

    Methods

    Name Description
    ApplyXRViewCenterOffset(Vector2)

    Take a point that is center-relative (0.5, 0.5) and modify it to be placed relative to the view's center instead, respecting the asymmetric FOV (if it is used)

    CreateDefault(XRPassCreateInfo)

    Default allocator method for XRPass.

    GetOcclusionMesh(int)

    Returns the occlusion mesh for a given view.

    GetProjMatrix(int)

    Returns the projection matrix for a given view.

    GetTextureArraySlice(int)

    Returns the destination slice index (for texture array) for a given view.

    GetViewMatrix(int)

    Returns the view matrix for a given view.

    GetViewport(int)

    Returns the viewport for a given view.

    InitBase(XRPassCreateInfo)

    Initialize the base class fields.

    Release()

    Default release method. Can be overridden by render pipelines.

    RenderOcclusionMesh(RasterCommandBuffer)
    RenderOcclusionMesh(CommandBuffer)

    Generate commands to render the occlusion mesh for this pass. In single-pass mode : the meshes for all views are combined into one mesh, where the corresponding view index is encoded into each vertex. The keyword "XR_OCCLUSION_MESH_COMBINED" is also enabled when rendering the combined mesh.

    StartSinglePass(RasterCommandBuffer)
    StartSinglePass(CommandBuffer)

    Queue up render commands to enable single-pass techniques. Note: depending on the platform and settings, either single-pass instancing or the multiview extension will be used.

    StopSinglePass(RasterCommandBuffer)

    Queue up render commands to disable single-pass techniques.

    StopSinglePass(CommandBuffer)

    Queue up render commands to disable single-pass techniques.

    Extension Methods

    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    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)