NVIDIA texture tools, sRGB, and OpenGL

Started by
2 comments, last by Prune 15 years, 5 months ago
My understanding is that compressing with NVIDIA texture tools results in better compression than the OpenGL driver runtime compression when loading decompressed in memory textures to OpenGL. However, I want to use sRGB texture format for low dynamic range textures (needed for correct color computation). With the nvcompress.exe tool, what parameter do I use to get something compatible (and correct) with the compressed sRGB formats in the OpenGL spec (I'm looking at the recent 3.0)?
"But who prays for Satan? Who, in eighteen centuries, has had the common humanity to pray for the one sinner that needed it most?" --Mark Twain

~~~~~~~~~~~~~~~Looking for a high-performance, easy to use, and lightweight math library? http://www.cmldev.net/ (note: I'm not associated with that project; just a user)
Advertisement
Hello? D:
"But who prays for Satan? Who, in eighteen centuries, has had the common humanity to pray for the one sinner that needed it most?" --Mark Twain

~~~~~~~~~~~~~~~Looking for a high-performance, easy to use, and lightweight math library? http://www.cmldev.net/ (note: I'm not associated with that project; just a user)
The API Documentation for nvTexture tools say that input gamma and output gamma is by default assumed to be 2.2.

Now the sRGB norm is slightly different from the strict gamma = 2.2 function, but it may be close enough for your usage.

The thing of course is that in most practical cases your content may already be authored in sRGB format (content that is to be displayed on your calibrated desktop).

The reason the tools need to have access to that info is mostly to achieve linear filtering (especially when computing mipmap levels). So they need to do sRGB -> linear -> filtering -> linear -> sRGB again.

You may or may not need that intermediate transform depending on how your texture is going to be used and how it was authored..

LeGreg
The gamma approximation certainly is close enough. I simply need an offline generator for GL_COMPRESSED_SRGB, because I'm assuming that what I've read about offline compressed RGB being better quality than the result the OpenGL creates at runtime when you feed the glTexImage2D() uncompressed data also holds for SRGB. My question was simply whether the GL_COMPRESSED_SRGB internal format is compatible with the encoding nvTexture tools generate.
"But who prays for Satan? Who, in eighteen centuries, has had the common humanity to pray for the one sinner that needed it most?" --Mark Twain

~~~~~~~~~~~~~~~Looking for a high-performance, easy to use, and lightweight math library? http://www.cmldev.net/ (note: I'm not associated with that project; just a user)

This topic is closed to new replies.

Advertisement