manual ARB_texture_compression comp/decomp

Originally posted by remdul:
I’m aware of that, but I’m trying to do that with ARB_texture_compression instead of DDS compressed textures.

DDS is just a file format, it can store uncompressed textures, DXTC/S3TC (same format) textures, cubemaps, 3D textures, textures with mipmaps, etc…

The S3TC/DXTC texture compression algorithm has been standardized for quite a while, you can load an image compressed with this algorithm using any GPU that supports ARB_texture_compression and EXT_texture_compression_s3tc. Pretty much any GPU you can get these days supports both of these extensions:

http://delphi3d.net/hardware/extsupport.php?extension=GL_EXT_texture_compression_s3tc

There are quite a few tools you can use to compress your existing images offline including dxtex (included in the DirectX SDK), NVIDIA Photoshop Plugins, NVIDIA Texture Tools (now supports hardware accelerated DXTC/S3TC compression using CUDA), as well as the other tools linked in earlier posts.

3dlabs cards never supported dxtc - not even the realizms.

On Linux most cards don’t support S3TC. The proprietary Nvidia drivers do, but the free drivers used for all the older cards as well as all Intel (and that’s the biggest craphics chip vendor) and most ATI cards do not by default. You have to install an additional library to get S3TC with these drivers and that’s illegal for many countries including the USA.

Originally posted by Humus:
No. ARB_texture_compression is a generic interface with no particular format. ARB_texture_compression alone does not mean you can use S3TC. EXT_texture_compression_s3tc is an extension on top of the ARB_texture_compression interface that exposes S3TC specifically, so that’s the extension you’re looking for.
Thanks, that’s exactly what I meant to say. A vendor could use any algorythm/format for ARB compression. But if S3TC is supported anyway, it just layers on top of that extension, without making any guarantees about the format. That’s also what I meant in my first post; it not being smart trying to use ARB compression instead of the other formats while fixed formats are available anyway.

So DDS/3STC/DXTC is the way to go. I did not really like the DDS format, and this is why I considered creating a similar toolset for ARB compression, thinking it was an independent algo with a fixed format, which it ain’t (in fact, the exact opposite).

Well, thanks for clearing it all up. :slight_smile:

dds is a great format. serves all your needs - cubemaps, compression, and pre-generated mipmaps.

Since we’re talking about DXT, you might want check out this example from our SDK, which does realtime DXT compression on the GPU using integer textures at around 1Gpixel/second:

http://developer.download.nvidia.com/SDK/10/opengl/samples.html#compress_DXT

do your drivers use that technique when I submit RGB data with a compressed internal format?

Originally posted by knackered:
do your drivers use that technique when I submit RGB data with a compressed internal format?
No, our drivers currently do compression on the CPU using a higher quality algorithm. The algorithm used in the GPU sample isn’t really optimized for image quality.

We did however just release a new version of our texture tools which can optionally use CUDA to accelerate offline high-quality DXT compression by up to 10x:
http://developer.nvidia.com/object/texture_tools.html