# ComputeMipmapSize

> Computes the memory size in bytes for a single mipmap.

## Definition

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

## ComputeMipmapSize(int, int, GraphicsFormat)

Computes the memory size in bytes for a single mipmap.

```csharp
public static uint ComputeMipmapSize(int width, int height, GraphicsFormat format)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[GraphicsFormat]\(/engine/6000.7/script-reference/unityengine/experimental/rendering/graphicsformat)):&#x20;

### Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

## ComputeMipmapSize(int, int, TextureFormat)

Computes the memory size in bytes for a single mipmap.

```csharp
public static uint ComputeMipmapSize(int width, int height, TextureFormat format)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[TextureFormat]\(/engine/6000.7/script-reference/unityengine/textureformat)):&#x20;

### Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

## ComputeMipmapSize(int, int, int, GraphicsFormat)

Computes the memory size in bytes for a single mipmap.

```csharp
public static uint ComputeMipmapSize(int width, int height, int depth, GraphicsFormat format)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[GraphicsFormat]\(/engine/6000.7/script-reference/unityengine/experimental/rendering/graphicsformat)):&#x20;

### Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

## ComputeMipmapSize(int, int, int, TextureFormat)

Computes the memory size in bytes for a single mipmap.

```csharp
public static uint ComputeMipmapSize(int width, int height, int depth, TextureFormat format)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[TextureFormat]\(/engine/6000.7/script-reference/unityengine/textureformat)):&#x20;

### Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |
