Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Twin Gamma Ramp Problem (!) et al... (DX8.0)

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

Okay, here goes: I decided to use the gamma ramp fetures of dx8, so I create a D3DGAMMARAMP structure, blank it out, GetGammaRamp the current ramp settings, then do some modifications and SetGammaRamp it. The result? 1) (Problem #1In windowed mode: NOTHING. Null, not even the slightest modification, even though the sdk notes contradict, saying that the ramp settings can be used both in f/s mode AND in a window! 2) (Problem #2In full-screen mode: OK, this is even crazier; NO OUTPUT AT ALL! In windowed mode, there is the rendered flare, normally, only the ramp doesn't take effect; in full-screen mode, the output goes totally blank (black)! Just ton avoid misunderstandings, here are two details I noticed: a> The ramp is set normally in any case (I cleared the structure and Got it later on to find out that it is truly set). b> The blank screen problen (#2) kicks in no matter the new ramp settings. Here's what I did to check it out: I got the normal ramp settings from the device and then re-Set the unmodified. The result is the blank screen again!(#$%@!). BTW, my GeForce2MX400 can't calibrate (no caps2 bit set), but the problem seems to be quite irrelevant. What is going wrong? Any ideas? Actually I want to use this feature for color-tinting, FF6 style, as well as for black-and-white scenes. Now, about this latter one, now that I think more carefully of it, I can't see how a gamma ramp can turn the output to grayscale. Any ideas on THAT? Any help appreciated Flare -----------<<>>----------- Ga1adaN, Primus ante Adein flareman@freemail.gr -----------<<>>------------ [edited by - Flareman on November 1, 2002 4:48:26 PM]

Share this post

Link to post
Share on other sites
I too have seen strange behavior with the gamma ramp. Specificly, I used GetGammaRamp and then immediately called SetGammaRamp with the data I just got and the screen went black. The following fix seemed to set the gamma values back to what SetGammaRamp is expecting.

pd3dDevice->GetGammaRamp( &defaultRamp );
for( i = 0; i < 256; i++ )
defaultRamp.red *= 256;
defaultRamp.green[i] *= 256;
defaultRamp.blue[i] *= 256;
pd3dDevice->SetGammaRamp( D3DSGR_CALIBRATE, &defaultRamp );

Hope that helps.

Share this post

Link to post
Share on other sites
Good news are, the tinting works in full-screen. Bad news are, it still doesn''t work in windowed mode. Anybody got a clue?

Also, about those B&W scenes... any suggestions?

Ga1adaN, Primus ante Adein

Share this post

Link to post
Share on other sites

  • 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!