Maybe I'm not getting this right, but isn't proper gamma correction in OpenGL as much as using the *_SRGB constant for defining textures (to convert to linear space), and creating a SRGB framebuffer (to convert back)?
This is something I understand runs completely in hardware nowadays without any special tweaks needed (and, also in absence of shaders).
Gamma correction in OpenGL
Old games (
of course I'm talking about Windows), use http://msdn.microsoft.com/en-us/library/dd372194%28VS.85%29.aspx
of course I'm talking about Windows), use http://msdn.microsoft.com/en-us/library/dd372194%28VS.85%29.aspx
Gamma correction is a non-linear operation, so I doubt that you can do it with additive or subtractive blending or even another blending.
However, I'd say that gamma correction shouldn't be looked at in OpenGL at all. IMHO it is part of the windowing system or monitor device settings.
This article explains why you should perform your color blending in linear space.
I updated my engine to use linear lighting and it really made a difference. The colors are much more realistic now.
L. Spiro
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement