---
title: MTLTextureSwizzleChannels
framework: metal
role: symbol
role_heading: Structure
path: metal/mtltextureswizzlechannels
---

# MTLTextureSwizzleChannels

A pattern that modifies the data read or sampled from a texture by rearranging or duplicating the elements of a vector.

## Declaration

```swift
struct MTLTextureSwizzleChannels
```

## Overview

Overview Use this structure to specify a custom swizzle pattern when creating a new texture or texture view.

## Topics

### Creating a swizzle pattern

- [init()](metal/mtltextureswizzlechannels/init().md)
- [init(red:green:blue:alpha:)](metal/mtltextureswizzlechannels/init(red:green:blue:alpha:).md)

### Specifying swizzle values

- [red](metal/mtltextureswizzlechannels/red.md)
- [green](metal/mtltextureswizzlechannels/green.md)
- [blue](metal/mtltextureswizzlechannels/blue.md)
- [alpha](metal/mtltextureswizzlechannels/alpha.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Sendable](swift/sendable.md)

## See Also

### Specifying texture attributes

- [textureType](metal/mtltexturedescriptor/texturetype.md)
- [pixelFormat](metal/mtltexturedescriptor/pixelformat.md)
- [width](metal/mtltexturedescriptor/width.md)
- [height](metal/mtltexturedescriptor/height.md)
- [depth](metal/mtltexturedescriptor/depth.md)
- [mipmapLevelCount](metal/mtltexturedescriptor/mipmaplevelcount.md)
- [sampleCount](metal/mtltexturedescriptor/samplecount.md)
- [arrayLength](metal/mtltexturedescriptor/arraylength.md)
- [resourceOptions](metal/mtltexturedescriptor/resourceoptions.md)
- [cpuCacheMode](metal/mtltexturedescriptor/cpucachemode.md)
- [storageMode](metal/mtltexturedescriptor/storagemode.md)
- [hazardTrackingMode](metal/mtltexturedescriptor/hazardtrackingmode.md)
- [allowGPUOptimizedContents](metal/mtltexturedescriptor/allowgpuoptimizedcontents.md)
- [usage](metal/mtltexturedescriptor/usage.md)
- [swizzle](metal/mtltexturedescriptor/swizzle.md)
