PDA

View Full Version : Fine tuneing the contrast in Direct3D8?


OC-NightHawk
11-01-2003, 05:31 AM
Does anybody know how I would be able to adjust the contrast with in Direct3D?

dead_eye
11-03-2003, 04:50 AM
You don't need DirectX to change the contrast. Ever notice when you play games in windowed mode with high contrast it modifies the whole screen? That's because they use the ChangeDisplaySettingsEx function with the CDS_VIDEOPARAMETERS flag. Tis the easiest way to change the contrast for a game. If it's only your app you want to have this effect you'll have to write your own filter.

OC-NightHawk
11-04-2003, 10:35 PM
:beer: Thanks.

So I guess this means when the program ends I should do some clean up and set the contrast back to the way it was.

Awsome now I can finally finetune the ambience and the contrast to get the best image. :buttrock:

OC-NightHawk
11-05-2003, 02:37 AM
:surprised Do you happen to know the value for the flag? Its not declared and msdn doesn't give a value for the flag. I'm guessing its 8 since that would be the order in the list of options that flag is for and the first is just a 0. Am I correct?

Honestly Microsoft is it that hard to either declare them or let us know the values they stand for?:banghead:

dead_eye
11-05-2003, 05:46 AM
Actually, chuck what I said before. I was wrong about the ChangeDisplaySettings functions. I was thinking of something else when I wrote that lol. You're right about DirectX though, there's no way to change the contrast, only the gamma settings. Hmmm... lemme see what I can dig up...

OC-NightHawk
11-05-2003, 05:54 AM
Originally posted by dead_eye
Actually, chuck what I said before. I was wrong about the ChangeDisplaySettings functions. I was thinking of something else when I wrote that lol. You're right about DirectX though, there's no way to change the contrast, only the gamma settings. Hmmm... lemme see what I can dig up...

:sad: I can't believe MS wouldn't allow the contrast to be controlled. Actually yes I can......:annoyed: :shrug:

Thanks for the help. Time for me to return to www.msdn.com for some more research.

dead_eye
11-05-2003, 05:56 AM
From what I see you can change the contrast using the
gamma ramp functions in DirectX. Code is in VB though...
http://www.mvps.org/vbdx/articles/gamma/

OC-NightHawk
11-05-2003, 06:26 AM
Originally posted by dead_eye
From what I see you can change the contrast using the
gamma ramp functions in DirectX. Code is in VB though...
http://www.mvps.org/vbdx/articles/gamma/

Awsome don't worry about it, I can translate back and forward without a problem. That and my engine is in vb for now since I have an extremely limited amount of time to get the project done. I'll translate it to c++ later if I feel it needs the extra speed.

OC-NightHawk
11-05-2003, 06:46 AM
:bowdown: It works.

CGTalk Moderation
01-16-2006, 01:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.