MTLTessellationPartitionMode
Options for choosing the partition mode that the tessellator applies when deriving the number and spacing of segments for subdividing a corresponding edge.
Declaration
enum MTLTessellationPartitionModeOverview
The table lists the tessellation factor range for each partitioning mode.
Partitioning mode | Tessellation factor range |
|---|---|
[ | |
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 MTLTessellationPartitionMode.pow2 partitioning mode, the result is rounded up to the nearest integer
n, wherenis a power of two. The corresponding edge is divided intonsegments of equal length in (u, v) space.For the MTLTessellationPartitionMode.integer partitioning mode, the result is rounded up to the nearest integer
n. The corresponding edge is divided intonsegments of equal length in (u, v) space.For the MTLTessellationPartitionMode.fractionalOdd partitioning mode, the tessellation level is rounded up the the nearest odd integer
n. Ifnis1, the edge is not subdivided. Otherwise, the corresponding edge is divided inton-2segments 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 ofn-f, wherefis the clamped floating-point tessellation level. Ifn-fis0the additional segments equal length to the other segments. Asn-fapproaches2, the relative length of the additional segments approaches0. 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 needs to be identical for any pair of subdivided edges with identical values off.For the MTLTessellationPartitionMode.fractionalEven partitioning mode, the tessellation level is rounded up the the nearest even integer
n.
Topics
Partition modes
MTLTessellationPartitionMode.pow2MTLTessellationPartitionMode.integerMTLTessellationPartitionMode.fractionalOddMTLTessellationPartitionMode.fractionalEven