---
title: Textures
framework: metal
role: collectionGroup
role_heading: API Collection
path: metal/textures
---

# Textures

Create and manage typed data your app uses to exchange information with its shader functions.

## Overview

Overview MTLTexture instances can serve as input and output resources to shader functions, as well as render pass destinations, or render attachments. Unlike buffers, textures define the underlying pixel type and structure. Textures can: Store 1-, 2-, or 3-dimensional data Contain several faces or layers Work as an array of texture data Apps typically use textures to render details onto the surfaces in a scene or a 3D model. You can also use textures for post-processing pipelines, such as adding an advanced visual effect to an image before presenting it to a display. Although textures can consume large amounts of memory, they also offer strategies, such as texture compression, that can save storage and memory bandwidth. Apple silicon GPUs support memoryless textures for transient render attachments that only need to exist for the duration of a render pass.

## Topics

### Texture basics

- [Understanding color-renderable pixel format sizes](metal/understanding-color-renderable-pixel-format-sizes.md)
- [Optimizing texture data](metal/optimizing-texture-data.md)
- [MTLTexture](metal/mtltexture.md)
- [MTLTextureCompressionType](metal/mtltexturecompressiontype.md)
- [MTLTextureDescriptor](metal/mtltexturedescriptor.md)
- [MTKTextureLoader](metalkit/mtktextureloader.md)
- [MTLSharedTextureHandle](metal/mtlsharedtexturehandle.md)
- [MTLPixelFormat](metal/mtlpixelformat.md)

### Texture samplers

- [Creating and sampling textures](metal/creating-and-sampling-textures.md)
- [MTLSamplerState](metal/mtlsamplerstate.md)
- [MTLSamplerDescriptor](metal/mtlsamplerdescriptor.md)
- [MTLSamplePosition](metal/mtlsampleposition.md)
- [MTLSamplerReductionMode](metal/mtlsamplerreductionmode.md)

### Texture mipmapping

- [Improving texture sampling quality and performance with mipmaps](metal/improving-texture-sampling-quality-and-performance-with-mipmaps.md)
- [Creating a mipmapped texture](metal/creating-a-mipmapped-texture.md)
- [Copying data into or out of mipmaps](metal/copying-data-into-or-out-of-mipmaps.md)
- [Generating mipmap data](metal/generating-mipmap-data.md)
- [Adding mipmap filtering to samplers](metal/adding-mipmap-filtering-to-samplers.md)
- [Restricting access to specific mipmaps](metal/restricting-access-to-specific-mipmaps.md)
- [Predicting which mips the GPU samples with level-of-detail queries](metal/predicting-which-mips-the-gpu-samples-with-level-of-detail-queries.md)
- [Dynamically adjusting texture level of detail](metal/dynamically-adjusting-texture-level-of-detail.md)

### Sparse textures

- [Managing sparse texture memory](metal/managing-sparse-texture-memory.md)
- [Creating sparse heaps and sparse textures](metal/creating-sparse-heaps-and-sparse-textures.md)
- [Converting between pixel regions and sparse tile regions](metal/converting-between-pixel-regions-and-sparse-tile-regions.md)
- [Assigning memory to sparse textures](metal/assigning-memory-to-sparse-textures.md)
- [Reading and writing to sparse textures](metal/reading-and-writing-to-sparse-textures.md)
- [Estimating how often a texture region is accessed](metal/estimating-how-often-a-texture-region-is-accessed.md)
- [MTLResourceStatePassDescriptor](metal/mtlresourcestatepassdescriptor.md)
- [MTLResourceStatePassSampleBufferAttachmentDescriptor](metal/mtlresourcestatepasssamplebufferattachmentdescriptor.md)
- [MTLResourceStatePassSampleBufferAttachmentDescriptorArray](metal/mtlresourcestatepasssamplebufferattachmentdescriptorarray.md)
- [MTLResourceStateCommandEncoder](metal/mtlresourcestatecommandencoder.md)
- [MTLMapIndirectArguments](metal/mtlmapindirectarguments.md)

### Texture loading

- [MTKTextureLoader](metalkit/mtktextureloader.md)
- [MTKTextureLoader.Error](metalkit/mtktextureloader/error.md)
- [MTKTextureLoader.Option](metalkit/mtktextureloader/option.md)
- [MTKTextureLoader.Callback](metalkit/mtktextureloader/callback.md)
- [MTKTextureLoader.ArrayCallback](metalkit/mtktextureloader/arraycallback.md)

## See Also

### Resources

- [Resource fundamentals](metal/resource-fundamentals.md)
- [Buffers](metal/buffers.md)
- [Memory heaps](metal/memory-heaps.md)
- [Resource loading](metal/resource-loading.md)
- [Resource synchronization](metal/resource-synchronization.md)
