know-how

Gamma correction

ago

Gamma correction in openGL is very easily to achieve, but why do you need gamma correction? Let's keep it simple... First of all your textures you use as input for your openGL renderer are most likely in non linear color space. Your renderer on the other hand is probably calculating light under the assumption of linear color spaced color values in your loaded textures. So you might be working in two different color spaces. After your renderer is done it writes the colors to the screen, which uses non linear color space like your textures do! So what happens is, that your calculation might be visually wrong... So how can you solve this? The answer is very easy: (more…)