Use AMD Compressionator for faster texture compression #5092
Replies: 2 comments 3 replies
-
I understand the sentiment, but I'm not sure if switching to Compressonator is the best thing to do. In 4.0.alpha, Godot already uses etcpak (ETC2) and libsquish (S3TC) for texture compression, both of which are very fast. (To my knowledge, there is no CPU encoder beating etcpak right now.) The issue with BC7 compression is that not only it only works on desktop platforms, but it doesn't work on macOS as Apple has never supported OpenGL past 4.1. Godot 3.x does have BPTC support when using GLES3, but it's rarely ever used due to this limitation. I don't remember if this support is still present in 4.0.alpha. Also, my concern about the Compressonator SDK is that it looks bloated at a glance – much more so than what we currently have. Remember that the Godot editor can run on a lot of platforms, including Android, ARM Linux/macOS and HTML5. Does Compressonator build on those platforms? We also want to keep build times and binary sizes reasonable. In the far future, using a GPU-based compressor like Betsy is planned, but not for 4.0. Betsy uses Vulkan compute instead of OpenCL or CUDA, so it doesn't suffer from poor driver support. PS: To speed up VRAM-compressed texture importing, disable ETC2 import in the Project Settings if you don't target mobile devices in GLES3, and disable ETC import if you don't target mobile devices in GLES2. This works in both 4.0 and 3.x. |
Beta Was this translation helpful? Give feedback.
-
Compression times are not extreme long anymore due to betsy support. This discussion can be closed? |
Beta Was this translation helpful? Give feedback.
-
I'm working with large textures and found the compression times to be extrem long, usually up to multiple minutes. Basis Universal is slightly faster, but is inferiero in quality and loading times.*
Using https://github.com/GPUOpen-Tools/compressonator and the encoder only takes around two seconds for the same texture in BC7, which is obviously a massive improvement!**
So, from my perspective, it would be usefull to integrate the Compressonator SDK into Godot, since that means super super fast encoding for pratically all used formats. Windows, Mac and Linux are also supported and the license so far doesn't look limiting.
I could implement this myself, but before starting, I would like some feedback. 🙂
*By the way: That's because Basis in Godot is using UASTC. UASTC still needs to be translated into an actual GPU format, thus adding loading time, see https://github.com/BinomialLLC/basis_universal/wiki/How-to-benchmark-or-directly-call-the-UASTC-functions-without-using-.basis
**That speed up is due to thier encoder being GPU accelerated via OpenCL. A fallback to MT-CPU exists. So, since Godot texture encoding is single-threaded, compressonator would still be faster, even if there is no compute support.
Beta Was this translation helpful? Give feedback.
All reactions