<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelTextureResource/Descriptor-swift.struct/init(textureType:pixelFormat:width:height:depth:mipmapLevelCount:arrayLength:textureUsage:swizzle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer23LowLevelTextureResourceC10DescriptorV11textureType11pixelFormat5width6height5depth06mipmapE5Count11arrayLength0I5Usage7swizzleAESo010MTLTextureJ0V_So08MTLPixelL0VS5iSo0vT0VSo0V15SwizzleChannelsatcfc"
  },
  "title" : "init(textureType:pixelFormat:width:height:depth:mipmapLevelCount:arrayLength:textureUsage:swizzle:)"
}
-->

# init(textureType:pixelFormat:width:height:depth:mipmapLevelCount:arrayLength:textureUsage:swizzle:)

Creates a texture descriptor with the specified texture type, pixel format, dimensions,
mipmap count, array length, usage flags, and swizzle pattern.

```
init(textureType: MTLTextureType = .type2D, pixelFormat: MTLPixelFormat = .invalid, width: Int = 0, height: Int = 0, depth: Int = 1, mipmapLevelCount: Int = 1, arrayLength: Int = 1, textureUsage: MTLTextureUsage = .unknown, swizzle: MTLTextureSwizzleChannels = .init(red: .red, green: .green, blue: .blue, alpha: .alpha))
```

## Parameters

`textureType`

The dimension and arrangement of texture image data. Defaults to `.type2D`.

`pixelFormat`

The size and bit layout of all pixels in the texture. Defaults to `.invalid`.

`width`

The width of the texture image for the base mipmap level, in pixels. Defaults to `0`.

`height`

The height of the texture image for the base mipmap level, in pixels. Defaults to `0`.

`depth`

The depth of the texture image for the base mipmap level, in pixels. Defaults to `1`.

`mipmapLevelCount`

The number of mipmap levels for the texture. Defaults to `1`.

`arrayLength`

The number of array elements for this texture. Defaults to `1`.

`textureUsage`

The options that determine how the texture can be used. Defaults to `.unknown`.

`swizzle`

The channel swizzle pattern the GPU applies when sampling the texture. Defaults
to the identity swizzle (`.red`, `.green`, `.blue`, `.alpha`).

---

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)