Instance Method

initWithDevice:histogramInfo:

Initializes a histogram with specific information.

Declaration

- (instancetype)initWithDevice:(id<MTLDevice>)device histogramInfo:(const MPSImageHistogramInfo *)histogramInfo;

Parameters

device

The Metal device the filter will run on.

histogramInfo

A pointer to a structure describing the histogram content.

Return Value

An initialized histogram object.

See Also

Methods

MPSImageHistogramInfo

The information used to compute the histogram channels of an image.

- encodeToCommandBuffer:sourceTexture:histogram:histogramOffset:

Encodes the filter to a command buffer using a compute command encoder.

- histogramSizeForSourceFormat:

The amount of space the histogram will take up in the output buffer.