GenerateMips
Generate mipmap levels of a render texture.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
GenerateMips(RenderTargetIdentifier)
Generate mipmap levels of a render texture.
public void GenerateMips(RenderTargetIdentifier rt)
Parameters
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.
public void GenerateMips(RenderTexture rt)
Parameters
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.