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.
Inherited Members
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 |
---|---|
copy |
If true, the render pipeline is expected to output a valid depth buffer to the renderTarget. |
culling |
Parameters used for culling. |
culling |
Index used for culling. It can be shared between multiple passes. |
enabled | Returns true if the pass contains at least one view. |
foveated |
Native pointer from the XR plugin to be consumed by ConfigureFoveatedRendering. |
has |
Returns true if the pass was setup with expected mesh and material. |
hdr |
|
hdr |
|
is |
|
multipass |
Index of the pass inside the frame. |
render |
Destination render target. |
render |
Destination render target descriptor. |
single |
If true, the render pipeline is expected to use single-pass techniques to save CPU time. |
supports |
Returns true if the pass can use foveated rendering commands. |
view |
Returns the number of views inside this pass. |
Methods
Name | Description |
---|---|
Apply |
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) |
Create |
Default allocator method for XRPass. |
Get |
Returns the occlusion mesh for a given view. |
Get |
Returns the projection matrix for a given view. |
Get |
Returns the destination slice index (for texture array) for a given view. |
Get |
Returns the view matrix for a given view. |
Get |
Returns the viewport for a given view. |
Init |
Initialize the base class fields. |
Release() | Default release method. Can be overridden by render pipelines. |
Render |
|
Render |
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. |
Start |
|
Start |
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. |
Stop |
Queue up render commands to disable single-pass techniques. |
Stop |
Queue up render commands to disable single-pass techniques. |