Tuesday 25 May 2010

Gamma

Yesterday's post about sound reminded me of the problems I had with gamma correction. Getting on for a year ago I decided to create all the menus. Mainly so I didn't leave it to the end and rush them.

I am glad I did because there is a lot of fiddling about to create each screen. Nothing difficult but still time consuming.

I created a screen to adjust the volume levels of the music and effects separately. The levels are easy to impliment using XACT but the form took a while to get all the sliders drawn and working.

Anyone who has done any windows programming will be used to having a whole host of controls to just drag and drop on to a form. Then you write the code behind it. In game development targeted at anything other than Windows you need to create all the controls you want to use yourself.



In the above form you'll note a rather wordy description of how to adjust the contrast and brightness. This manual solution was the end result of spending ages trying to find a way to set the gamma levels on a graphics card.

I eventually failed. On all the PC's I tried changes to the gamma settings resulted in nothing at all happening. When I tried this same code on an Xbox I got a black screen.

My alternate to the manual solution would be code all my shaders to include an adjustment to the lighting value. I have decided that there are many other areas of the game far more important and as yet I have not seen an Indie game solve this, so I am at least no worse than others.

I will probably simply remove the note and the contrast bar from the finished game.

No comments: