# GenerateMips

> Generate mipmap levels of a render texture.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.0/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

## GenerateMips(RenderTargetIdentifier)

Generate mipmap levels of a render texture.

```csharp
public void GenerateMips(RenderTargetIdentifier rt)
```

### Parameters

**** (\[RenderTargetIdentifier]\(/engine/6000.0/script-reference/unityengine/rendering/rendertargetidentifier)): The render texture requiring mipmaps generation.

### Remarks

Use this function to manually re-generate mipmap levels of a render texture. The render texture has to have mipmaps (useMipMap set to true), and automatic mip generation turned off (autoGenerateMips set to false).

On some platforms (most notably, D3D9), there is no way to manually generate render texture mip levels; in these cases this function does nothing.

Additional Resources: useMipMap, autoGenerateMips.

## GenerateMips(RenderTexture)

Generate mipmap levels of a render texture.

```csharp
public void GenerateMips(RenderTexture rt)
```

### Parameters

**** (\[RenderTexture]\(/engine/6000.0/script-reference/unityengine/rendertexture)): The render texture requiring mipmaps generation.

### Remarks

Use this function to manually re-generate mipmap levels of a render texture. The render texture has to have mipmaps (useMipMap set to true), and automatic mip generation turned off (autoGenerateMips set to false).

On some platforms (most notably, D3D9), there is no way to manually generate render texture mip levels; in these cases this function does nothing.

Additional Resources: useMipMap, autoGenerateMips.
