Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I am trying to change the gamma values and brightness in my game. I think it has something to do with IDirect3DDevice9::SetGammaRamp function but I am not exactly sure how to use it. Anyone has any input on this?

share|improve this question
Welcome to Game Development! You should try to use that function first, try at least to understand how it works, then show us your attempt if you still cannot figure out how to solve your problem with it. – Axel Isouard Sep 27 '12 at 8:16

In this answer is this link, but it work only in fullscreen mode. ( use IDirect3DDevice9::SetGammaRamp() )

Another approach is using HDR, you can found examples in Directx SDK Samples Directory + look at this example and this.

share|improve this answer

The Win32 SetDeviceGammaRamp and GetDeviceGammaRamp calls are also options for you; they will work in windowed modes (but will affect the entire screen rather than just the game window) and are somewhat better documented than the D3D versions.

You can also use render to texture and just brighten the texture while drawing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.