Instance Method

encodeToCommandBuffer:primaryTexture:secondaryTexture:destinationTexture:

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

Declaration

- (void)encodeToCommandBuffer:(id<MTLCommandBuffer>)commandBuffer primaryTexture:(id<MTLTexture>)primaryTexture secondaryTexture:(id<MTLTexture>)secondaryTexture destinationTexture:(id<MTLTexture>)destinationTexture;

Parameters

commandBuffer

A valid command buffer to receive the encoded kernel.

primaryTexture

A valid texture containing the primary source image.

secondaryTexture

A valid texture containing the secondary source image.

destinationTexture

A valid texture to be overwritten by the result image. destinationTexture may not alias primaryTexture nor secondaryTexture.

See Also

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.

- 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.