Contents

init(device:kernelWidth:kernelHeight:)

Initializes the kernel with a specified width and height.

Declaration

init(device: any MTLDevice, kernelWidth: Int, kernelHeight: Int)

Parameters

  • device:

    The Metal device the filter will run on.

  • kernelWidth:

    The width of the kernel. Must be an odd number.

  • kernelHeight:

    The height of the kernel. Must be an odd number.

Return Value

Returns an initialized kernel object with a specific width and height.