Class

MTLRasterizationRateMapDescriptor

An object that you use to configure new rasterization rate maps.

Declaration

class MTLRasterizationRateMapDescriptor : NSObject

Overview

To create a new rate map, first create a MTLRasterizationRateMapDescriptor object and set its property values. Then, call the newRasterizationRateMap(withScreenSize:layerCount:layers:) method of a MTLDevice object to create the rate map.

When you create a rate map, Metal copies property values from the descriptor into it. You can reuse a MTLRasterizationRateMapDescriptor object, modifying its property values as needed, without affecting the rate maps you already created.

Topics

Creating Rate Map Descriptors

init(screenSize: MTLSize, label: String?)

A convenience initializer that creates a rate map descriptor with a given size and identifier.

init(screenSize: MTLSize, layer: MTLRasterizationRateLayerDescriptor, label: String?)

A convenience initializer that creates a rate map descriptor with a single rate layer.

init(screenSize: MTLSize, layers: [MTLRasterizationRateLayerDescriptor], label: String?)

A convenience initializer that creates a rate map descriptor with a set of layer descriptors.

Identifying the Rate Map

var label: String?

A string used to identify the rate map you create with the descriptor.

Configuring the Viewport Size

var screenSize: MTLSize

The size of the viewport coordinate system, in logical pixels.

Configuring the Rate Map Layers

var layerCount: Int

The number of layers in the rate map.

func layer(at: Int) -> MTLRasterizationRateLayerDescriptor?

Returns the layer description for a layer in the rate map.

func setLayer(MTLRasterizationRateLayerDescriptor?, at: Int)

Sets a configuration for a layer rate map.

var layers: MTLRasterizationRateLayerArray

The rasterization rates for one or more layers in the rate map.

class MTLRasterizationRateLayerArray

Descriptions for the rasterization rates to apply to the set of layers in a rate map.

Relationships

Inherits From

See Also

Specifying a Rasterization Rate Map

Rendering at Different Rasterization Rates

Configure a rasterization rate map to vary rasterization rates depending on the amount of detail needed.

var rasterizationRateMap: MTLRasterizationRateMap?

The rasterization rate map to use when executing the render pass.

protocol MTLRasterizationRateMap

A compiled read-only object that determines how to apply variable rasterization rates when rendering.