Encodes the transform function to a command buffer using a compute command encoder. The transform function computes the equalization lookup table.
- iOS 9.0+
- macOS 10.13+
- Mac Catalyst 13.0+
- tvOS 9.0+
- Metal Performance Shaders
A valid command buffer.
A valid texture containing the source image for the filter.
A valid buffer containing the histogram results for an image. This filter will use these histogram results to generate the cumulative histogram for equalizing the image. The histogram results per channel are stored together. The number of channels for which histogram results are stored is determined by the number of channels in the image. If the
histogramvalue of the
falseand the source image is RGBA, then only histogram results for RGB channels are stored.
The byte offset into the histogram buffer where the histogram starts. Must conform to alignment requirements for the
offsetparameter of the
Buffer(_: offset: index:)
The transform function will not begin to execute until after the command buffer has been enqueued and committed. This step will need to be repeated with the new
MPSKernel object if the
copy(with:) method is called. The transform is stored as internal state to the object. You still need to call the
encode(command afterward to apply the transform to produce a result texture.