Enumeration

MTLTessellationPartitionMode

The partitioning mode used by the tessellator to derive the number and spacing of segments used to subdivide a corresponding edge.

Declaration

typedef enum MTLTessellationPartitionMode : NSUInteger {
    ...
} MTLTessellationPartitionMode;

Overview

Table 1 lists the tessellation factor range for each partitioning mode.

Table 1

Tessellation factor range for each partitioning mode

The floating-point tessellation level is always clamped to its corresponding range before calculating the final tessellation factor. After clamping, the calculation depends on the chosen partitioning mode:

  • For the MTLTessellationPartitionModePow2 partitioning mode, the result is rounded up to the nearest integer n, where n is a power of two. The corresponding edge is divided into n segments of equal length in (u, v) space.

  • For the MTLTessellationPartitionModeInteger partitioning mode, the result is rounded up to the nearest integer n. The corresponding edge is divided into n segments of equal length in (u, v) space.

  • For the MTLTessellationPartitionModeFractionalOdd partitioning mode, the tessellation level is rounded up the the nearest odd integer n. If n is 1, the edge is not subdivided. Otherwise, the corresponding edge is divided into n-2 segments of equal length, and two additional segments of equal length that are typically shorter than the other segments. The length of the two additional segments relative to the others decreases monotonically by the value of n-f, where f is the clamped floating-point tessellation level. If n-f is 0 the additional segments equal length to the other segments. As n-f approaches 2, the relative length of the additional segments approaches 0. The two additional segments should be placed symmetrically on opposite sides of the subdivided edge. The relative location of these two segments is undefined, but must be identical for any pair of subdivided edges with identical values of f.

  • For the MTLTessellationPartitionModeFractionalEven partitioning mode, the tessellation level is rounded up the the nearest even integer n.

Topics

Constants

MTLTessellationPartitionModePow2

A power of two partitioning mode.

MTLTessellationPartitionModeInteger

An integer partitioning mode.

MTLTessellationPartitionModeFractionalOdd

A fractional odd partitioning mode.

MTLTessellationPartitionModeFractionalEven

A fractional even partitioning mode.

See Also

Specifying Tessellation State

maxTessellationFactor

Specifies the maximum tessellation factor to be used by the tessellator when tessellating a patch (or patches).

tessellationFactorScaleEnabled

Determines whether the tessellation factor is scaled.

tessellationFactorFormat

The format of the tessellation factors specified in the tessellation factor buffer.

tessellationControlPointIndexType

The size of the control point indices in a control point index buffer.

tessellationFactorStepFunction

The step function used to determine the tessellation factors for a patch from the tessellation factor buffer.

tessellationOutputWindingOrder

The winding order of triangles output by the tessellator.

tessellationPartitionMode

The partitioning mode used by the tessellator to derive the number and spacing of segments used to subdivide a corresponding edge.

MTLTessellationFactorFormat

The format of the tessellation factors in a tessellation factor buffer.

MTLTessellationControlPointIndexType

The size of the control point indices in a control point index buffer.

MTLTessellationFactorStepFunction

The step function used to determine the tessellation factors for a patch from the tessellation factor buffer.