---
title: precision
framework: metalperformanceshaders
role: symbol
role_heading: Instance Property
path: metalperformanceshaders/mpsimage/precision
---

# precision

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

## Declaration

```swift
var precision: Int { get }
```

## Discussion

Discussion 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

### Properties

- [device](metalperformanceshaders/mpsimage/device.md)
- [width](metalperformanceshaders/mpsimage/width.md)
- [height](metalperformanceshaders/mpsimage/height.md)
- [featureChannels](metalperformanceshaders/mpsimage/featurechannels.md)
- [numberOfImages](metalperformanceshaders/mpsimage/numberofimages.md)
- [textureType](metalperformanceshaders/mpsimage/texturetype.md)
- [MTLTextureType](metal/mtltexturetype.md)
- [pixelFormat](metalperformanceshaders/mpsimage/pixelformat.md)
- [MTLPixelFormat](metal/mtlpixelformat.md)
- [usage](metalperformanceshaders/mpsimage/usage.md)
- [MTLTextureUsage](metal/mtltextureusage.md)
- [pixelSize](metalperformanceshaders/mpsimage/pixelsize.md)
- [texture](metalperformanceshaders/mpsimage/texture.md)
- [MTLTexture](metal/mtltexture.md)
- [label](metalperformanceshaders/mpsimage/label.md)
