compressonator
compressonator copied to clipboard
Imprecise BC6H interpolation
Consider the first pixel of this BC6H block (Mode 3, unsigned)
23 0F 00 00 00 00 00 00 04 00 00 00 00 00 00 00
Following the spec, we get:
- RGB_0: (121, 0, 0)
- RGB_1: (0, 0, 0)
- Weight_0: 2
After unquantization:
- RGB_0_unq: (7776, 0, 0)
- RGB_1_unq: (0, 0, 0)
- Weight_0_unq: 9
Interpolation & final unquantization (red channel):
((64 - 9) * 7776 + 9 * 0 + 32) >> 6 = 6683
(6683 * 31) >> 6 = 3237 (0x0CA5)
Compressonator (4.0.4855) decodes that value as 0x0CA4.
@lexaknyazev what decoder API are you using Compressonators LIB or CMP_Core?
I simply run
> CompressonatorCLI.exe input.dds output.dds
FWIW, this command gives precise results:
> CompressonatorCLI.exe -UseGPUDecompress -DecodeWith DirectX input.dds output.dds
@lexaknyazev Thanks for providing the updated info.