# GetSharedDepthTextureForRenderPass(int)

> Given a render pass, return the shared depth buffer RenderTexture instance backing that render pass. If the render pass is invalid, or if the render texture does not exist, return null.

## Definition

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

```csharp
public RenderTexture GetSharedDepthTextureForRenderPass(int renderPass)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The render pass index to get the shared depth buffer render texture for.

### Returns

| Type                                                                          | Description                                                                                    |
| ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [RenderTexture](/engine/6000.7/script-reference/unityengine/rendertexture.md) | The shared depth buffer render texture associated with that render pass, or null if not found. |
