Class

MPSBinaryImageKernel

A kernel that consumes two textures and produces one texture.

Declaration

@interface MPSBinaryImageKernel : MPSKernel

Overview

MPSBinaryImageKernel defines shared behavior for most image processing kernels (filters) such as edging modes, clipping, and tiling support for image operations that consume two 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

- encodeToCommandBuffer:primaryTexture:inPlaceSecondaryTexture:fallbackCopyAllocator:

This method attempts to apply a kernel in place on a texture.

- encodeToCommandBuffer:inPlacePrimaryTexture:secondaryTexture:fallbackCopyAllocator:

This method attempts to apply a kernel in place on a texture.

- encodeToCommandBuffer:primaryTexture:secondaryTexture:destinationTexture:

Encodes a kernel into a command buffer, out-of-place.

- primarySourceRegionForDestinationSize:

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

- secondarySourceRegionForDestinationSize:

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

Properties

primaryOffset

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

secondaryOffset

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

primaryEdgeMode

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

secondaryEdgeMode

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

clipRect

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

Relationships

Inherits From

See Also

Image Filter Base Classes

MPSUnaryImageKernel

A kernel that consumes one texture and produces one texture.