zinnschlag/openmw — pull request #510 by RicoTilgner (2013-01-09 01:24:46+00:00)
Title: fixed linear light model (gamma-correct rendering) and light positions

First commit: Bug #520, Gamma Correction wrong with default settings
The linearization was missing a few things, especially linearization of lights. This is now added.
Because of that, the gamma-slider doesn't have any effect anymore. It never should have had one, the gamma for shading and light calculation shouldn't be influenced by the user.
Just as a small clarification: The implementation from scrawl was meant to introduce "gamma-correct rendering" but was a bit of a mix between "gamma-correct rendering" and "gamma correction of the output image". This change should now introduce pure "gamma-correct rendering".

Second commit: Feature #367, Lights that behave more like original morrowind implementation
Calculates the offsets inside the mesh needed for correct placement of the lights from the nif files (if available) and uses them.
I'm just pushing them through the whole chain from reading the nif file to adding the light. For the future, we'll need some more unified structure that also keeps track of things like smoke, flames, etc.