# Sandbox.Rendering.CommandList.AttributeAccess.GrabDepthTexture

```csharp
RenderTargetHandle GrabDepthTexture(string token = DepthTexture)
```

Takes a copy of the current viewport's depth texture and stores it in targetName on renderAttributes.

### Parameters

- `token` (`string`), default `DepthTexture`

### Returns

`RenderTargetHandle`

Declared in [Sandbox.Rendering.CommandList.AttributeAccess](/api/Sandbox.Rendering.CommandList.AttributeAccess).
Assembly: `Sandbox.Engine`.
