Configures which visibility test the GPU executes and the destination for any results it generates.
- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
The mode that determines what, if anything, is written to the visibility buffer.
The location within the visibility buffer where the GPU stores results for this test. The offset must be a multiple of 8 bytes.
To use visibility testing, your render pass descriptor must provide a buffer in which to store results. See
Call this method before each set of drawing commands that you want to monitor. The encoder uses the new visibility mode and offset for future drawing commands encoded in this render pass, until you make another call to this method. A given offset in the result buffer can only be used once during the render pass. You must encode all drawing commands for that location before setting a different offset.
By default, when you create the render command encoder, the testing mode is set to
MTLVisibility, which means the render pass does not track any visibility data.