The edge mode to use when texture reads stray off the edge of an image.
- iOS 9.0+
- macOS 10.13+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- Metal Performance Shaders
Most kernel objects can read off the edge of a source image. This can happen because of a negative offset property, because the
offset + clipRect.size is larger than the source image, or because the filter uses neighboring pixels in its calculations (e.g. convolution filters).
The default value is usually
MPSImageEdgeMode.zero, but some kernels default to the
MPSImageEdgeMode.clamp value instead if an edge mode of zero is either unsupported or undefined.
var offset: MPSOffset
The position of the destination clip rectangle origin relative to the source buffer.
var clipRect: MTLRegion
An optional clip rectangle to use when writing data. Only the pixels in the rectangle will be overwritten.
The options used to control the edge behavior of an image filter when it reads outside the bounds of a source texture.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software