Sets an array of scissor rectangles.
- iOS 12.0+
- macOS 10.13+
- Mac Catalyst 13.0+
- Xcode 9.0+
An array of scissor rectangles.
The maximum number of supported viewports and scissor rectangles varies by device. For more information, see Using Metal Feature Set Tables.
The rendering pipeline uses only one of the scissor rects to clip vertices. You select this scissor rect per primitive by specifying a
[[viewport attribute on an output value from your vertex function.
Calling this method with an array of length
1 is equivalent to calling the
set method. Calling
set after calling
set, and vice versa, overrides previously set scissor rectangles.
The number of scissor rectangles must match the number of viewports set by the
set method. If you want to use the same scissor rectangle for all viewports, call the
set method instead.