ASTC texture compression issues

Hi

Is there any way to disable ASTC texture compression while hitting ‘play on target’ ? (I have Nexus 6P and unreal wants to use ASTC as target supports it) but I want to use ATC instead.
(when packaging I have an options to disable certain compressed texture formats, but not while play on target)

The first reason why I want to disable it is time … ASTC take considerable amount of time while compressing (compared to ATC)
the second one is that ASTC on nexus 6P seems to be corrupted, all brown (wood in general) textures after comression seems to be washed out of color on device
(I’m comparing to ATC version)
Texture size is 2048 x 4096, RGBA, compression options: 6x6 -fast -esw bgra -ch 1 1 1 1 -alphablend
and on device when ASTC is used is seems as gray-scale, while when package is build as ATC all is fine.

I think you can change the Texture Format priorities in Android project settings. Just swap the ATC and ASTC values so it prefers the ATC option.

Sure this helps if I’m PACKAGING - but I want to use ATC while hitting ‘play on target’ button in menu - any solution for this ?

Besides, after some tests with various images ASTC textures with alpha seems to be broken (at least on nexus 6P and nexus 5X), even if I change:
[/Script/UnrealEd.CookerSettings]
DefaultASTCQualityBySpeed=3 // gives -thorough
DefaultASTCQualityBySize=4 // gives 4x4
the quality is worst nightmare :wink: [compared to ATC] (blocky & washed out of colour)

I’v downloaded Mali_Texture_Compression_Tool_v4.3.0 and compressed those test images by hand, and prepared some quick & dirte java app to upload them to openGL and see if it’s hardware/display driver problem or problem with unreal,
and compressed ASTC images uploaded direcly to OpenGL (compressed texture 2D with mipmaps) seems to be just fine and quality is better than the ATC one, so I suspect something is broken here.

OK, after some more diffing I’v found the reason WHY ASTC looks so bad when compressed with alpha :slight_smile:
unreal invokes astc compressor with following options: 6x6 -fast -esw bgra -ch 1 1 1 1 -alphablend
but the -alphablend switch desaturates COMPLETLY the RGB channel where the alpha is (near) 0, my test textures have almost no alpha (black or dark grey alpha channel) so they look desaturated :wink:
(I use alpha channel of albedo to store roughness information)
the solution is to remove the ‘-alphablend’
from line:
CompressionParameters = FString::Printf(TEXT("%s %s -esw bgra -ch 1 1 1 1 -alphablend"), *GetQualityString(), /BuildSettings.bSRGB ? TEXT("-srgb") :/ TEXT("") );
in TextureFormatASTC.cpp (line 354 for me)
and recompile the engine, then all works fine.

PS. forgot to mention that -alphablend switch states for ‘alpha blend optimalization’ so it’s by design of compressor that it tries to reduce rgb block overhead when alpha is near 0, but if I store some other information in alpha, not the alphablend, then things go east.