Instance Property


The number of bits of numeric precision available for each feature channel.


var precision: Int { get }


This is precision, not size (float is 24 bits, not 32; half-precision floating-point is 11 bits, not 16; Snorm pixel formats have one less bit of precision for the sign bit, etc.). For formats like MTLPixelFormat.b5g6r5Unorm, this value is the precision of the most precise channel (which is 6 in this case). When this information is unavailable, typically for compressed formats, this value is 0.

See Also


var device: MTLDevice

The device on which the image will be used.

var width: Int

The formal width of the image, in pixels.

var height: Int

The formal height of the image, in pixels.

var featureChannels: Int

The number of feature channels per pixel.

var numberOfImages: Int

The number of images for batch processing.

enum MTLTextureType

The dimension of each image, including whether multiple images are arranged into an array or a cube.

var pixelFormat: MTLPixelFormat

The pixel format of the underlying texture.

enum MTLPixelFormat

The data formats that describe the organization and characteristics of individual pixels in a texture.

var usage: MTLTextureUsage

The intended usage of the underlying texture.

struct MTLTextureUsage

An enumeration for the various options that determine how you can use a texture.

var pixelSize: Int

The number of bytes from the first byte of one pixel to the first byte of the next pixel, in storage order. (Includes padding.)

var texture: MTLTexture

The underlying texture.

protocol MTLTexture

A resource that holds formatted image data.

var label: String?

A string to help identify this object.