Instance Method


Sets the number of output vertices for each input vertex, along with offsets into the layer and viewport lists.



func setVertexAmplificationCount(_ count: Int, viewMappings: UnsafePointer<MTLVertexAmplificationViewMapping>?)



The number of outputs to create.


An optional parameter that specifies per-output offsets into the layer and viewport lists. If you provide a value for this parameter, you must provide the same number of entries as the count you specified.


By default, vertex amplification is not used. If you set a count greater than 1, each input vertex generates multiple output vertices (and correspondingly, each primitive becomes multiple output primitives). Typically, you use vertex amplification in conjunction with generating a render target index or viewport index inside your vertex shader, so that each output primitive is rendered to a distinct location.

If you specify view mappings, the render target index and viewport index are calculated by adding the offsets to the values provided by the vertex shader.

See Also

Configuring Vertex Amplification

struct MTLVertexAmplificationViewMapping

An offset applied to a render target index and viewport index.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software