setViewport(_:)
Sets the viewport which that transforms vertices from normalized device coordinates to window coordinates.
Declaration
func setViewport(_ viewport: MTLViewport)Parameters
- viewport:
Mtlviewport to set.
Discussion
Metal clips fragments that lie outside this viewport, and optionally clamps fragments outside of z-near/z-far range depending on the value you assign to setDepthClipMode(_:).