Jump to content
  • Advertisement
Sign in to follow this  

GammaRamp HELP!

This topic is 4541 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone? I've been busting my brain trying to get the gamma ramp in directx to work. I don't want a fadeout or any effect. I just want to be able to set a rgb color, like in underwater games or swamp or when you get shot that you see al red, you know, basic stuff. so far I use this and get no change what so ever, it looks like I'd never set the gammaramp:
r1 = 255
g1 = b1 = 0
	for(int loop = 0; loop < 256; loop++) {

		c_gammaRamp.red[loop] = r1;			 
   		c_gammaRamp.green[loop] = g1; 
		c_gammaRamp. blue [loop] = b1;			

        m_device->SetGammaRamp( 0 , D3DSGR_NO_CALIBRATION, &c_gammaRamp);

Now my question is do I need any extra code for it to work, I already tried with calibration. I have no Idea because the directx help is pretty vage on this topic at least for my knowledge. thanks

Share this post

Link to post
Share on other sites
The gamma ramp is the wrong way wrong way to produce such an effect. It is there to allow you to implement an ingame gamma control option that let your user calibrate the display to your game.

What you are looking for are alpha blending or post filter effects.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!