Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ComputeMipChainSize

Computes the memory size in bytes for a chain of mipmaps.
Read time 1 minuteLast updated 4 days ago

Definition

ComputeMipChainSize(int, int, GraphicsFormat, int)

Computes the memory size in bytes for a chain of mipmaps.
public static uint ComputeMipChainSize(int width, int height, GraphicsFormat format, int mipCount = -1)

Parameters

width


height



mipCount

Total number of mip levels to calculate. A value of -1 means Unity calculates the entire mip chain.

Returns

Type

Description

uint

ComputeMipChainSize(int, int, TextureFormat, int)

Computes the memory size in bytes for a chain of mipmaps.
public static uint ComputeMipChainSize(int width, int height, TextureFormat format, int mipCount = -1)

Parameters

width


height



mipCount

Total number of mip levels to calculate. A value of -1 means Unity calculates the entire mip chain.

Returns

Type

Description

uint

ComputeMipChainSize(int, int, int, GraphicsFormat, int)

Computes the memory size in bytes for a chain of mipmaps.
public static uint ComputeMipChainSize(int width, int height, int depth, GraphicsFormat format, int mipCount = -1)

Parameters

width


height


depth



mipCount

Total number of mip levels to calculate. A value of -1 means Unity calculates the entire mip chain.

Returns

Type

Description

uint

ComputeMipChainSize(int, int, int, TextureFormat, int)

Computes the memory size in bytes for a chain of mipmaps.
public static uint ComputeMipChainSize(int width, int height, int depth, TextureFormat format, int mipCount = -1)

Parameters

width


height


depth



mipCount

Total number of mip levels to calculate. A value of -1 means Unity calculates the entire mip chain.

Returns

Type

Description

uint