<!--
{
  "documentType" : "article",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/improving-texture-sampling-quality-and-performance-with-mipmaps",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Improving texture sampling quality and performance with mipmaps"
}
-->

# Improving texture sampling quality and performance with mipmaps

Avoid texture-rendering artifacts and reduce the GPU’s workload by creating smaller versions of a texture.

## Discussion

*Mipmaps* are progressively smaller versions of the same texture image, each of which provides a different level of detail (LOD) for the texture. A texture’s *mipmap chain* is its complete set of mipmaps. Textures with mipmaps can help your app eliminate common visual problems, such as aliasing and moire patterns, while reducing the GPU’s memory bandwidth.

__The largest version of a texture is mipmap `0` and it’s at the top of the mipmap chain. The next largest version is mipmap `1`, which is one level lower in the chain.

![A diagram showing a texture’s mipmap chain that starts with the largest resolution image, labeled  Mipmap 0, on the left. The six images on the right, labeled 1 through 6, are progressively smaller versions of the original texture where each mipmap level is 25% the size of the previous one.](images/com.apple.metal/improving-texture-sampling-quality-and-performance-with-mipmaps-1@2x.png)

Each nonzero mipmap level is 25% of the area of the previous mipmap level in the chain. A texture’s smallest mipmap is at least 1 pixel in each dimension.

A mipmapped texture gives the GPU the option to sample from a mipmap size that’s closest to the size of the primitive it’s rendering to. A GPU’s texture-sampling hardware works best when a texture’s dimensions are similar to the output primitive’s dimensions. Without mipmaps, the GPU can sample only the full-size texture, including when an output primitive is much smaller than the texture. In that scenario, the hardware typically fetches a significant portion of the texture to properly filter for color.

For example, to filter a 256 x 256 texture to an 8 x 8 rendering, the GPU needs to blend 25% of the texture for each output pixel. Additionally, you can’t precisely control which pixels the GPU fetches from the texture and then blends to render to a relatively small primitive. That imprecision can produce an obviously incorrect image, especially when it spans multiple frames, such as during animations.

![A diagram showing a texture image that’s 256 by 256 pixels divided into four quadrants by two perpendicular dashed lines that intersect at the center of the texture. In the upper right quadrant, the diagram highlights a square sample of the texture that’s 32 by 32 pixels. An arrow points from that square sample to the right to a smaller square. The smaller square is an output rendering of the larger texture, and is 8 by 8 pixels.](images/com.apple.metal/improving-texture-sampling-quality-and-performance-with-mipmaps-2@2x.png)

Mipmapped textures can also help improve your app’s performance because a GPU uses less memory bandwidth and memory cache by sampling from the smaller mipmaps.

You can create a mipmapped texture and initialize its mipmap chain by following the steps in [Creating a mipmapped texture](/documentation/Metal/creating-a-mipmapped-texture) and [Generating mipmap data](/documentation/Metal/generating-mipmap-data), respectively.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)