Gamma control

BlitzMax Forums/BlitzMax Programming/Gamma control

xlsior(Posted 2005) [#1]
After getting further on the game that I'm working on and testing it on several computers, I'm noticing that there is a huge variety in the brightness of the graphics that my game shows.

While everything looks OK in full screen mode on my own computer, it looks too bright/washed out on others, making things look less than impressive.

Yet on other computers the exact same program appears too dark, and you can't even make out some of the details...

So out of the box, it looks OK on one, too bright on another, and too dark on the third...

I know I can artificially darken things a little by setting the draw color to a light grey instead of white, but since that is a linear change instead of a gamma curve, you end up losing additional detail -- and brightening the source images to account for the 'dark' computer and darkening them again for the light one will make things look even worse, so I would prefer to stick with the middle-of-the-road images.


- Is there anyway in BlitzMax to do true gamma correction?
- Is this something that can be done directly through OpenGL?


ImaginaryHuman(Posted 2005) [#2]
It may be just that people's monitors have different brightness or contrast settings. You could change the brightness and contrast using OpenGL. It would be near-enough. I think gamma is a bit more complicated because you have to brighten the image but at the same time leave the black areas black - ie spread the brightening accross the levels. Probably there is a way to do that in OpenGL too using some kind of multiplication operation, blending perhaps, or the accumulation buffer.


xlsior(Posted 2005) [#3]
Even on my own computer, there is a *huge* difference between full screen and windowed color intensities...

I know I can manually adjust the gamma in the extended properties of my display drivers and tackle this issue on my own computer, but I know that this will be a common occurance on many other computers as well. And a lot of people won't have a clue how to do this, and instructions are hard to give since it is all videocard & driver dependend...

A way of programatically giving people some control from within the app would address that issue, although unfortunately it's way over my head, with 0 openGL knowledge...


ImaginaryHuman(Posted 2005) [#4]
Have a look into RED_BIAS, GREEN_BIAS, and BLUE_BIAS. I don't recall which command actually sets them but one of them does, and adds the value of these to all colors being drawn, I think.

Otherwise you could do some realtime image processing on your image data to brighten or darken it at runtime.