# Sandbox.Graphics.GrabFrameTexture

## Overload 1

```csharp
static RenderTarget GrabFrameTexture(string targetName = FrameTexture, RenderAttributes renderAttributes = null, DownsampleMethod downsampleMethod = -1, int maxMips = 0)
```

Grabs the current viewport's color texture and stores it in targetName on renderAttributes.

### Parameters

- `targetName` (`string`), default `FrameTexture`
- `renderAttributes` (`RenderAttributes`), default `null`
- `downsampleMethod` (`DownsampleMethod`), default `-1`
- `maxMips` (`int`), default `0`

### Returns

`RenderTarget`

## Overload 2

```csharp
static void GrabFrameTexture(string targetName, RenderAttributes renderAttributes, bool withMips)
```

> **Obsolete.** Use GrabFrameTexture with DownsampleMethod instead

### Parameters

- `targetName` (`string`)
- `renderAttributes` (`RenderAttributes`)
- `withMips` (`bool`)

Declared in [Sandbox.Graphics](/api/Sandbox.Graphics).
Assembly: `Sandbox.Engine`.
