Not sure if this is the right place to ask this question, but here it goes.
I need to use proper color spaces in my next project, but I have problems with exporting compressed textures properly. I’m using GLI toolkit to load dds files. I’ve checked and seen that GLI is able to correctly process sRGB dds files. However, it requires data from the DXT10 header to determine if the texture is in linear or sRGB color space. And here’s the problem - the software I tried (Nvidia Texture Tools from Ubuntu’s repositories and GIMP’s DDS plugin) seem to omit those headers and export the files like they were used in DirectX 9.
Naturally, I can manually check for what kind of texture is being loaded and change the flags myself:
// if flag is GL_COMPRESSED_RGB_S3TC_DXT1_EXT, replace it with GL_COMPRESSED_SRGB_S3TC_DXT1_EXT
int overridingFlag = (0x83F0 == gli::internal_format(Texture.format())) ? 0x8C4C : gli::internal_format(Texture.format());
This gives me the correct results, however, if I, or someone working with me, ever starts mixing textures that are in linear space with textres that are in sRGB space, this approach would start causing major headaches.
So, here’s the question - what tool should I use (preferably one that works on Linux) to export dds files that DO have the DXT10 headers?