Jump to content
  • Advertisement

Archived

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

jitspoe

Adjusting Overall Brightness

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

Hey, I was wondering what the best way to adjust the brightness of a scene is. Since multitexturing, etc pretty much requires that you multiply textures/lightmaps/details, everything keeps getting darker and darker. I''m currently using glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR) and drawing a polygon over the entire screen. I figured this isn''t the most efficient way to do it (lots of fillrate wasted). So: a) Are there ways to blend lightmap textures in a single pass so textures actually get BRIGHTER and darker? or: b) Is there an efficient way to basically double the brightness of the entire scene? Hardware gammaramping looked really washed out -- maybe I did it wrong. My current method makes the colors really bright (like color safe bleach!) and I want to keep that appearance.

Share this post


Link to post
Share on other sites
Advertisement
>>Since multitexturing, etc pretty much requires that you multiply textures/lightmaps/details<<

try texture_env_add_signed instead of modulating

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
Thanks for the input. I gave it a shot, but it makes everything look REALY washed out... since the white is just getting added.

Share this post


Link to post
Share on other sites
u need to adjust the lightmap/detail textures they are prolly to0 bright now.
to get the same effect with add_signed as u had with modulate just do a -0.5 for each textures texel.


http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
I found what I was looking for. This might be useful to some of you seeing as I found practially no web documentation on it:

glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE);
glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 2.0);

This basically doubles the brightness of everything (2*color1*color2). It works beautifully on my Geforce DDR. I haven''t tested it on anything else. You can also use a value of 4.0, but that is too bright for my tastes. It might be useful if your card can do more than 2 textures per pass, however.

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!