Contents

physicalCoordinates(screenCoordinates:layer:)

Converts a point in logical viewport coordinates to the corresponding physical coordinates in a render layer.

Declaration

func physicalCoordinates(screenCoordinates: MTLCoordinate2D, layer layerIndex: Int) -> MTLCoordinate2D

Parameters

  • screenCoordinates:

    A point in viewport coordinates.

  • layerIndex:

    The index of the rate map to use.

Return Value

A point in the layer’s physical coordinate system corresponding to the source point.

Discussion

The returned coordinates are always less than or equal to the input coordinates because the rasterization rate never exceeds 1:1 in any region.

See Also

Converting between viewport and physical coordinates