Weird issue with weighting?
When compressing this texture the cyan region encroaches into magenta. This happens even with color weights set to 1,1,1. This is compressing as DXT1A.
Here is with texpresso:
And here is with DirectXTex:
This is the input:
Should this be happening?
I should mention that libsquish did not do this.
That should definitely not be happening, no. As a wild guess, could this be related to the image dimensions?
Not sure, the image is 128x128. The split between the rows is exactly between a DXT block, so 2px each color.
I can't seem to reproduce this. When running with texpresso compress -f BC1 input.png, I get Only images with 8 bits per channel are supported.
When I convert the PNG with Gimp to 8bpc, I get the correct output with the above command.
I'm still getting the issue and this is the code that does it https://github.com/Aerocatia/ringhopper-old/blob/30867cb07468e454d4ff49841f24d31630662e41/src/ringhopper/src/bitmap/compression/mod.rs#L264
However I can confirm building texpresso standalone works correctly......
EDIT: it breaks on standalone if you use --profile quality
Can reproduce with --profile quality. I was hoping this bug was introduced at some point, but it's been here as long as there has been a CLI. It did flip at some point (magenta encroaching on cyan, instead of the reverse). Unfortunately I don't understand the algorithm well enough to figure out what is wrong.
Oh, it happening only with quality profile is a great hint! Quality is basically the same algorithm as balanced but it does multiple iterations of numerical refinement. So it seems something goes wrong after the 1st iteration...