Screen correction(gamma correction) support needed!

While shaders are a wonderful addition to the standard, they are implicitly calculated in linear-light space - that is, a color space where multiplication by two results in twice as much `light’.

OpenGL2.0 needs to support the ability to apply a gamma correction lut immediately prior to the frame buffer(right after the per-fragment processor), and formalize this functionality with specific call(ideally at the float->byte conversion stage).

Though this functionality can be achieved in the shader itself, the per-fragment processor should also be operating in linear-space to properly apply fog, stencils, etc.

This correction has historically been done using the post-framebuffer lut tables but this affects the entire screen display rather than just the OpenGL window, limiting it’s usefulness as users don’t like how their display looks “blown-out”.

The one additional step neccessary to properly implement linear-space rendering is applying the inverse correction at the texture read stage(this is probably best achieved in the shader definition). This is because the vast majority of texture sources are 8-bit and have gamma-correction already encoded into them, therefore requiring linearization prior to lighting and filtering.

My hope is if this functionality is simple enough for 3D software vendors and game producers to include in their packages, we can produce far more photo-realistic real-time output than is currently possible.

For more info on gamma correction here’s a couple links to try:

Thanks for your consideration.