Add option to download to cpu rgb data ( not only rgba )

hi
please add option to download to cpu rgb data ( not only rgba )

keep up the great work.
B.

Do you mean in the TOP to CHOP? If so you can just remove the “a” channel.
If not, downloading from where to where?

virtual void* getTOPDataInCPUMemory(const OP_TOPInput *top,
const OP_TOPInputDownloadOptions *options) const = 0;

enum class OP_CPUMemPixelType : int32_t
{
// 8-bit per color, BGRA pixels. This is preferred for 4 channel 8-bit data
BGRA8Fixed = 0,
// 8-bit per color, RGBA pixels. Only use this one if absolutely nesseary.
RGBA8Fixed,
// 32-bit float per color, RGBA pixels
RGBA32Float,

// A few single and two channel versions of the above
R8Fixed,
RG8Fixed,
R32Float,
RG32Float,

R16Fixed = 100,
RG16Fixed,
RGBA16Fixed,

R16Float = 200,
RG16Float,
RGBA16Float,

};

Thanks for the specifics

GPUs don’t store their texture data in RGB format. Even the ones that claim to are just also storing an unused A channel. So when downloading the data it’s always reading from R, RG, or RGBA buffers. Generating RGB data requires a CPU reordering either way. With Vulkan coming this is even more strict. So it’s better of the user of the data re-orders if they absolutely need to, as that can be better optimized for their usage case.

1 Like