---
title: MTLSamplePosition
framework: metal
role: symbol
role_heading: Structure
path: metal/mtlsampleposition
---

# MTLSamplePosition

A subpixel sample position for use in multisample antialiasing (MSAA).

## Declaration

```swift
struct MTLSamplePosition
```

## Mentioned in

Positioning samples programmatically

## Overview

Overview Subpixel sample positions are in a 16 x 16 grid across a pixel. Each subsample position’s x and y values are in 1/16 increments in the floating-point range [0.0, 15.0/16.0). The pixel’s origin point (0,0) is at the top-left corner. See Positioning samples programmatically for the details on working with subpixels.

## Topics

### Initializers

- [init()](metal/mtlsampleposition/init().md)
- [init(x:y:)](metal/mtlsampleposition/init(x:y:).md)

### Instance Properties

- [x](metal/mtlsampleposition/x.md)
- [y](metal/mtlsampleposition/y.md)

## Relationships

### Conforms To

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

## See Also

### Texture samplers

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