XRDisplaySubsystem.XRRenderPass
Contains configuration parameters about which view into the Scene the renderer should rasterize, and a render target (which can be a texture array) for the result of the rasterization.
Read time 2 minutesLast updated 10 days ago
Definition
- Type: Struct
- Namespace: UnityEngine.XR
- Assembly: UnityEngine.XRModule
public struct XRDisplaySubsystem.XRRenderPass
Remarks
An XRRenderPass can contain more than one XRDisplaySubsystem.XRRenderParameter (viewpoints that the render pipeline renders to the output texture as either different viewports or texture array slices). The render pipeline must query each child XRDisplaySubsystem.XRRenderParameter via GetRenderParameter. The most optimal way to implement an XRRenderPass is to cull first, and then submit draw calls once for the resulting objects. You can also use techniques such as instanced rendering to optimize XRRenderPasses that contain more than one XRDisplaySubsystem.XRRenderParameter.
XRRenderPass is typically consumed by a scriptable rendering pipeline.
Fields
Value | Description |
|---|---|
| cullingPassIndex | An index that a render pipeline can pass to XRDisplaySubsystem.GetCullingParameters to obtain culling information. |
| foveatedRenderingInfo | A pointer to a native struct containing platform-specific data for foveated rendering. |
| hasMotionVectorPass | A boolean indicating if this render pass contains a motion-vector generation pass. |
| motionVectorRenderTarget | The output render-texture target for the motion-vector generation render pass. |
| motionVectorRenderTargetDesc | The render texture description for the target texture for the motion-vector render pass. |
| renderPassIndex | The index of the render pass (originally passed in to XRDisplaySubsystem.GetRenderPass). |
| renderTarget | The output target for the render pass. |
| renderTargetDesc | Descriptor that can be passed to RenderTexture.GetTemporary to create temporary textures that match the XR Display render target. |
| renderTargetScaledHeight | The current, scaled height of the XRRenderPass.renderTarget for this |
| renderTargetScaledWidth | The current, scaled width of the XRRenderPass.renderTarget for this |
| shouldFillOutDepth | When this is false an optimal renderer can avoid resolving the depth buffer. |
| spaceWarpRightHandedNDC | When |
Methods
Method | Description |
|---|---|
| GetRenderParameter | Gets an XRDisplaySubsystem.XRRenderParameter for a specific XRDisplaySubsystem.XRRenderPass. |
| GetRenderParameterCount | The number of XRDisplaySubsystem.XRRenderParameter entries for this XRDisplaySubsystem.XRRenderPass. |