Recently I found some information about the ASTC texture format on the internet. After that, I decided to run some tests and if all is good then change the compression of textures in my project from ETC2 to ASTC to reduce build size.
After I changed the texture compression settings in the editor I saw a great size reduction in texture size, for 2k texture it is ASTC6x6 (1.8 Mb) vs ETC2 (4 Mb).
The textures are packed in asset bundles using an addressable system.
Asset bundle has LZ4 compression, also I tested LZMA.
After I performed the build and compared asset bundle sizes. I noticed that the asset bundle with ASTC texture actually has a greater size. After I did some tests with various combinations of texture compression and bundle compression I come to the conclusion that ASTC has not so good compression ratio in combination with LZ4 (LZMA) as ETC2 and ETC. ASTC outperforms ETC2 only in case the asset bundle is uncompressed.
What is the point of using ASTC in this case? Because in my experience, android APK files and asset bundles always will have some form of LZ compression.
And maybe someone can explain the technical details behind these results - because I was not able to find info on the internet regarding this matter.
were you able to find anything on this? currently i’m facing the same issue
The main purpose of texture compression is to reduce the texture size in VRAM on the GPU.
Also it generally looks better than ETC2.
Unfortunately, No. I leave things as they are and go with ETC2.
It is just slightly misleading - when you read about ASTC first time and start to think that it will significantly reduce your build size. And you actually see in Unity, in the texture inspector preview, that texture size is reduced after switching to ASTC. But in the end, you will get a greater build size.
As I understood, you use ASTC if you don’t have strict build size limitations and you want to have slightly better texture quality.
Maybe it also affects performance as c0d3_m0nk3y says.
You could try bigger block size for ASTC, which should reduce texture size even further.
Yes, but then the texture quality will be worse than the ETC2 version =)
I don’t know about the difference with AssetBundles, but you it’s not (only) about build size. By using ASTC 6x6 you’re using less than half the VRAM with the same (or better) visual quality.
On iOS / Android (and Switch) using ASTC is a no brainer.
As already mentioned, the main purpose of texture compression is to reduce the size in VRAM. It’s not the best compression because the GPU must be able to decompress the textures on the fly whenever you sample them. Also, you don’t want to sacrifice too much visual quality.
You can reduce the size on disk by using crunch compression on top of regular texture compression. Crunch compression is supported for DXT and ETC.
https://blog.unity.com/technology/updated-crunch-texture-compression-library