Structure

MTLSamplePosition

A sample position on a subpixel grid.

Declaration

typedef struct {
    ...
} MTLSamplePosition;

Overview

Floating-point values are in the [0.0, 1.0) range along each axis, with the origin (0, 0) defined at the top-left corner. Values can be set from 0/16 up to 15/16, inclusive, in 0/16 increments along each axis.

Topics

Instance Properties

x

The x position of the sample on the subpixel grid.

y

The y position of the sample on the subpixel grid.

See Also

Using Programmable Sample Positions

MTLSamplePositionMake

Returns a new sample position on a subpixel grid.

setSamplePositions:count:

Sets the programmable sample positions for a render pass.

getSamplePositions:count:

Retrieves the programmable sample positions set for a render pass.