Instance Method

encode(commandBuffer:sourceTexture:destinationTexture:)

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

Declaration

func encode(commandBuffer: MTLCommandBuffer, sourceTexture: MTLTexture, destinationTexture: MTLTexture)

Parameters

commandBuffer

A valid command buffer to receive the encoded kernel.

sourceTexture

A valid texture containing the source image.

destinationTexture

A valid texture to be overwritten by the result image. destinationTexture may not alias sourceTexture.

See Also

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.