Copy between Metal textures with different pixel formats I've experimented with the different copyFromTexture:... methods, but it seems they always want the same pixel format between textures. I feel like it should be straightforward to copy from a MTLTexture with a MTLPixelFormatRGBA8Uint color format to one with MTLPixelFormatRGBA16Float, what am I missing here? Do I really need to use the Accelerate framework or similar to convert the pixel format on the CPU? Hoping for something fast I could do every frame...
My code:
[blitCommandEncoder copyFromTexture:tempTexture sourceSlice:0 sourceLevel:0 toTexture:anotherTexture destinationSlice:0 destinationLevel:0 sliceCount:1 levelCount:1];

Console errors:
-[MTLDebugBlitCommandEncoder internalValidateCopyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:]:447: failed assertion `[sourceTexture pixelFormat](MTLPixelFormatRGBA8Uint) must equal [destinationTexture pixelFormat](MTLPixelFormatRGBA16Float) '

Thanks!

You can use either a metal perfomance shaders or custom compute shaders.

MPSImageConversion - A filter that performs a conversion of color
space, alpha, or pixel format.
As with all Metal Performance Shaders filters, the conversion filter
allows for source and destination textures with different pixel
formats and, in that case, will convert the source texture's format to
the destination texture's format.