GameTechDev/ISPCTextureCompressor

BC6H float types, input & output

djewsbury opened this issue · 1 comments

Hi -- thanks for the great project!

Can you confirm the inputs and outputs for the BC6H compressor? My investigations seem to suggest it takes signed FP16 inputs (ie 10 bit mantissa), and generates a BC6H_UF16 output (ie, unsigned outputs). Is this correct?

I'm currently using the library in a pipeline with 32 bit float source data. So I could potentially build "unsigned" float 16 inputs (ie, 11 bit mantissa as per the Microsoft docs for BC6). Would there be any benefit to a version that took this kind of float as input, do you think?

You are correct. FP16 to BC6H_UF16. The inputs have to be nonnegative.

I don't think there would be any benfit from a higher mantissa: BC6H cannot really represent that much precision in practice.