Hello.
I'm using the latest version of astcenc.exe from https://github.com/ARM-software/astc-encoder and have problems with several textures.
For example:
astcenc.exe -c "Build_Foam.tga" "Build_Foam.astc" 8x8 -fast
astcenc.exe -d "Build_Foam.astc" "Build_Foam.astc.tga"
https://www.dropbox.com/s/vbgouzlqrf799g8/Build_Foam.tga?dl=0
https://www.dropbox.com/s/r11hzq3op7igj7f/Build_Foam.astc.tga?dl=0
But if I specify -hdra flag then the astc textures are ok. What I'm doing wrong?
Can you explain what the problem actually is?
At least visually the textures look OK to me. You are using a low bit rate (2bpp) and fast compression (so the search for best compression quality is less exhaustive). If you use "-thorough" instead of "-fast", or a smaller block size (6x6 for 3.56bpp) to increase bitrate, does your issue go away?
If you look at the "-help" message from the tool you'll see that setting "-hdra" sets a large number of options for the error parameter tuning, in addition to allowing HDR end points. IN particular note that "-dblimit" is set to 999, which is much higher than the default used by a "-fast" search.
Cheers, Pete
The decoded tga has only 256 colors and looks buggy (astc texture is buggy on an android device too):
I tried different block sizes/bitrates and compression quality modes - no difference.
If I specify -forcehdr-rgba then the decoded tga is ok and it has 16777216 colors:
BTW Compressonator and NVidia astc encoder has no troubles with the texture.
On Linux with the latest master branch from github I can't reproduce your problem. The decode from the command line tool back to TGA looks correct to me - it matches your lower picture below. Your Build_Foam.astc.tga file you attached in dropbox also looks correct.
Note that the command line decompression of the ASTC image reports as "Stored TGA image ../Build_Foam-out.tga with 2 color channels" -> i.e. the tool determines that the image is greyscale and stores a two channel Luminance + Alpha texture. It's impossible for this to have different RGB values.
Can you share (1) the full command line output of the tool (both compresison and decompression) and (2) the compressed .astc file (3) let us know what operating system you are using.
Thanks! It seems the issue was with greyscale textures. Is it possible to disable this feature and force astcenc to encode greyscale textures always with 4 channels?
The decompressed data for an ASTC file on the target device should always return 4 channels - but for Luminance + Alpha end points the RGB values will be identical (see section 3.8 in the ASTC specification in the GitHub repo).
I'm not aware of any command line option to disable endpoints (although the HDR end points won't be used unless you enable an HDR mode).