# 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.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.XR](/engine/6000.0/script-reference/unityengine/xr.md)
* **Assembly:** UnityEngine.XRModule

```csharp
public struct XRDisplaySubsystem.XRRenderPass
```

## Remarks

An XRRenderPass can contain more than one [XRDisplaySubsystem.XRRenderParameter](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderparameter.md) (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](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderparameter.md) via [GetRenderParameter](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/getrenderparameter.md). 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](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderparameter.md).

XRRenderPass is typically consumed by a scriptable rendering pipeline.

## Fields

| Value                                                                                                                                          | Description                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [cullingPassIndex](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/cullingpassindex.md)                         | An index that a render pipeline can pass to [XRDisplaySubsystem.GetCullingParameters](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/getcullingparameters.md) to obtain culling information. |
| [foveatedRenderingInfo](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/foveatedrenderinginfo.md)               | A pointer to a native struct containing platform-specific data for foveated rendering.                                                                                                                          |
| [hasMotionVectorPass](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/hasmotionvectorpass.md)                   | A boolean indicating if this render pass contains a motion-vector generation pass.                                                                                                                              |
| [motionVectorRenderTarget](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/motionvectorrendertarget.md)         | The output render-texture target for the motion-vector generation render pass.                                                                                                                                  |
| [motionVectorRenderTargetDesc](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/motionvectorrendertargetdesc.md) | The render texture description for the target texture for the motion-vector render pass.                                                                                                                        |
| [renderPassIndex](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/renderpassindex.md)                           | The index of the render pass (originally passed in to [XRDisplaySubsystem.GetRenderPass](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/getrenderpass.md)).                                  |
| [renderTarget](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/rendertarget.md)                                 | The output target for the render pass.                                                                                                                                                                          |
| [renderTargetDesc](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/rendertargetdesc.md)                         | Descriptor that can be passed to [RenderTexture.GetTemporary](/engine/6000.0/script-reference/unityengine/rendertexture/gettemporary.md) to create temporary textures that match the XR Display render target.  |
| [shouldFillOutDepth](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/shouldfilloutdepth.md)                     | When this is false an optimal renderer can avoid resolving the depth buffer.                                                                                                                                    |
| [spaceWarpRightHandedNDC](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/spacewarprighthandedndc.md)           | When `true`, the SpaceWarp motion vector data is in the right-handed normalized device coordinate (NDC) space. When `false`, the motion vector data is in the left-handed NDC space.                            |

## Methods

| Method                                                                                                                               | Description                                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetRenderParameter](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/getrenderparameter.md)           | Gets an [XRDisplaySubsystem.XRRenderParameter](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderparameter.md) for a specific [XRDisplaySubsystem.XRRenderPass](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass.md).         |
| [GetRenderParameterCount](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass/getrenderparametercount.md) | The number of [XRDisplaySubsystem.XRRenderParameter](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderparameter.md) entries for this [XRDisplaySubsystem.XRRenderPass](/engine/6000.0/script-reference/unityengine/xr/xrdisplaysubsystem/xrrenderpass.md). |
