Contents

histogramSize(forSourceFormat:)

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

Declaration

func histogramSize(forSourceFormat sourceFormat: MTLPixelFormat) -> Int

Parameters

Return Value

The number of bytes needed to store the histogram results.

Discussion

This convenience function calculates the minimum amount of space needed in the output histogram for the results. The buffer should be at least this length and longer if the histogramOffset value in the encode(to:sourceTexture:histogram:histogramOffset:) method is non-zero.

See Also

Methods