Class

MPSUnaryImageKernel

A kernel that consumes one texture and produces one texture.

Declaration

class MPSUnaryImageKernel : MPSKernel

Overview

MPSUnaryImageKernel defines shared behavior for most image processing kernels (filters) such as edging modes, clipping, and tiling support for image operations that consumes a single source textures. It is not meant to be used directly, but provides API abstraction and in some cases may allow some level of polymorphic manipulation of image kernel objects.

Topics

Methods

typealias MPSCopyAllocator

A block to make a copy of a source texture for filters that can only execute out of place.

func sourceRegion(destinationSize: MTLSize) -> MPSRegion

Determines the region of the source texture that will be read for an encode operation.

Properties

var offset: MPSOffset

The position of the destination clip rectangle origin relative to the source buffer.

struct MPSOffset

A signed coordinate with x, y, and z components.

var clipRect: MTLRegion

An optional clip rectangle to use when writing data. Only the pixels in the rectangle will be overwritten.

struct MPSRegion

A region of an image.

var edgeMode: MPSImageEdgeMode

The edge mode to use when texture reads stray off the edge of an image.

enum MPSImageEdgeMode

The options used to control the edge behavior of an image filter when it reads outside the bounds of a source texture.

Relationships

Inherits From

Conforms To

See Also

Image Filter Base Classes

class MPSBinaryImageKernel

A kernel that consumes two textures and produces one texture.