I’m gradually making progress in my lighting revamp. This involves the following:
- Making my textures have real-world albedo values
- Doing the appropriate gamma correction throughout the pipeline
- Coming up with a better ambient lighting model
- Taking another look at my less-than-satisfactory HDR implementation
I’m trying to make all my rendering “gamma correct”. This means doing my lighting calculations in linear color space. Well, they’ve always assumed linear color space, but my input textures (and thus my albedo G-buffer) were in sRGB. So I am now correcting the source textures (sRGB to linear), operating in linear space in my light accumulation buffer, and then doing the final gamma correction (sRGB to linear) before presenting to the screen.
I really don’t like the gamma-correct look though. I’m still in the early stages, so it’s possible I have some bugs I need to work out. But everything comes out very washed-out.
The following set of images show before (top) and after (bottom).
In general, snowy sunny scenes look a little better though:
For those implementing a properly gamma-correct pipeline, how do you prevent your lighting from getting so washed out?
(EDIT: It turns out my directional light shader was missing the gamma decoding step, and the directional light is the main source of light in these images. So these images are the result of a bug!).