BC4 compression with R8 input results in a black texture #101
Labels
Comments
|
@tiiago11 "Is this is a known issue? " No, its the first time been reported. The patch you used is applied to the release that is scheduled for next week. "is there another fix/workaround that can be done from outside the library?" You can use the low -level BC4 block encoder available in CMP_Core. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
After updating the library to v3.2.4691, it seems the BC4/ATI1N compression is producing a black texture when provided a R8 texture as input. This can be reproduced in the GUI and also with the SDK API.
As far as I could trace, the
bufferIn.m_bSwizzleflag is wrongly set to true for this input format, which results in in theCCodecBuffer_R8::ReadBlockBgetting called, which returns always 0 for this channel. The commit that introduced this verification of this flag in theCCodec_ATI1N::Compress_Fastcodec is:92f888f#diff-fc1b13a6a8de118ff844e5041f950301L121
A workaround I managed to do is to add
CBT_R8to the switch here:compressonator/Compressonator/CMP_CompressonatorLib/Compress.cpp
Line 542 in 7d56f15
Is this is a known issue? is there another fix/workaround that can be done from outside the library?
Thank you for the support!
The text was updated successfully, but these errors were encountered: