Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Exporting sRGB dds files for loading with GLI toolkit

  1. #1
    Newbie Newbie
    Join Date
    Feb 2015

    Question Exporting sRGB dds files for loading with GLI toolkit

    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:
    Code :
    // 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?

  2. #2
    Intern Contributor
    Join Date
    Sep 2014
    Please write, did you find the way to decide your problem?

  3. #3
    Super Moderator Frequent Contributor Groovounet's Avatar
    Join Date
    Jul 2004
    Quote Originally Posted by kaufenpreis View Post
    Please write, did you find the way to decide your problem?
    I uses PVRTexTool these days quite a lot to generate DDS files:
    I am not sure whether it's available on Linux or not.

    I think we need to move away from the DDS container and use the KTX container instead but I haven't even started implementing it for GLI.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts