Instance Property


An optional clip rectangle to use when writing data. Only the pixels in the clip rectangle will be overwritten.


@property(readwrite, nonatomic) MTLRegion clipRect;


A region that indicates which part of the destination image to overwrite. If the clip rectangle does not lie completely within the destination image, the intersection between the clip rectangle and the destination image bounds is used instead.

The default value is MPSRectNoClip, indicating that the entire destination image will be overwritten.

The value of clipRect.origin.z is the index of the starting destination image in batch processing mode. The value of clipRect.size.depth is the number of images to process in batch processing mode.