I recently added some brightness control in my game and store it inside a save file. The problem is that there is an inconsistency between what I set with setGammaRamp() and what I get just after with getGammaRamp(). The RGB channels seems to diverge slowly (each set call adds a little amount of color for each channel).
For this reason I can't restore the gamma ramps I had when I started my game at the end of the game because of this bug. Each time I restart the game I get a bigger value that I reinject at the end of the game.
Here is a simple piece of code that demonstrates the problem :
Code: Select all
f32 red = 1.0f, green = 1.0f, blue = 1.0f, brightness = 0.0f, contrast = 0.0f;
m_Device->setGammaRamp(red, green, blue, brightness, contrast);
m_Device->getGammaRamp(red, green, blue, brightness, contrast);// after this line I have the following values : 1.0182679, 1.0182679, 1.0182679, 0.0, 0.0