Bug with setGammaRamp() ?

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Akabane87
Posts: 50
Joined: Sat May 05, 2012 6:11 pm

Bug with setGammaRamp() ?

Post by Akabane87 »

Hi there,

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
 
Is it a bug in the ramp calculation or is it intended (and in this case how am I suppose to get or set a fixed value) ?
Post Reply