setScissorRects(_:)
Sets an array of scissor rectangles for a fragment scissor test.
Declaration
func setScissorRects(_ scissorRects: [MTLScissorRect])Parameters
- scissorRects:
A Swift array of Mtlscissorrect elements.
Discussion
Metal uses the specific scissor rectangle corresponding to the index you specify via the [[ viewport_array_index ]] output attribute of the vertex shader function in the Metal Shading Language, discarding all fragments outside of the scissor rect.