# Sandbox.Graphics.GrabDepthTexture

```csharp
static RenderTarget GrabDepthTexture(string targetName = DepthTexture, RenderAttributes renderAttributes = null)
```

Grabs the current depth texture and stores it in targetName on renderAttributes.

### Parameters

- `targetName` (`string`), default `DepthTexture`
- `renderAttributes` (`RenderAttributes`), default `null`

### Returns

`RenderTarget`

Declared in [Sandbox.Graphics](/api/Sandbox.Graphics).
Assembly: `Sandbox.Engine`.
