The minimum rasterization rates to apply to sections of a layer in the render target.


@interface MTLRasterizationRateLayerDescriptor : NSObject


Use a layer map to divide the logical viewport coordinate system into a 2D grid of equal-sized rectangles, and choose different rasterization rates for each cell.

Specify rasterization rates using floating-point numbers between 0.0 and 1.0, inclusive. A rate of 1.0 represents the normal rasterization rate, where each logical unit is equal to a physical pixel; a rate of 0.5 means that two logical units equate to one physical pixel; and so on. A value of 0.0 means that the GPU should render at its lowest quality level. When you create the map, the device object chooses the nearest rasterization rate supported by the GPU that meets or exceeds the rate you specified.

In the layer map, you provide separate rasterization rates for the grid’s rows and columns. The horizontal rates specify a horizontal rasterization rate for each column, and the vertical rates specify a vertical rasterization rate for each row. Each cell calculates its physical size in pixels by using the logical size of cells in the map, the horizontal rate from the cell’s column, and the vertical rate from its row.


Creating a Layer Rasterization Rate Descriptor

- initWithSampleCount:horizontal:vertical:

Initializes the layer map with the provided grid size and rasterization rates.

- initWithSampleCount:

Initializes the layer map with an empty grid.

Inspecting the Layer Rate Function Parameters


The number of rows and columns in the layer map.


The horizontal rasterization rates for the layer map’s rows.


The vertical rasterization rates for the layer map’s rows.


A pointer to the storage for the layer map's horizontal rasterization rates.


A pointer to the storage for the layer map's vertical rasterization rates.


An array object that contains rasterization rates.


Inherits From

Conforms To

See Also

Accessing Members of the Array

- objectAtIndexedSubscript:

Retrieves the sample value at the specified index.

- setObject:atIndexedSubscript:

Stores a sample value at the specified index.