Sign in to follow this  
Prune

OpenGL NVIDIA texture tools, sRGB, and OpenGL

Recommended Posts

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)?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this