---
title: "MTLSamplePositionMake(_:_:)"
framework: metal
role: symbol
role_heading: Function
path: "metal/mtlsamplepositionmake(_:_:)"
---

# MTLSamplePositionMake(_:_:)

Returns a new sample position on a subpixel grid.

## Declaration

```swift
func MTLSamplePositionMake(_ x: Float, _ y: Float) -> MTLSamplePosition
```

## Parameters

- `x`: The x coordinate.
- `y`: The y coordinate.

## Return Value

Return Value The new sample position.

## See Also

### Using programmable sample positions

- [setSamplePositions(_:)](metal/mtlrenderpassdescriptor/setsamplepositions(_:).md)
- [getSamplePositions()](metal/mtlrenderpassdescriptor/getsamplepositions().md)
