Sign in to follow this  

GammaRamp HELP!

This topic is 4198 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

This topic is 4198 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this