Jump to content
  • Advertisement
Sign in to follow this  
spiralmonkey

OpenGL blowing-out textures

This topic is 4812 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 everyone, i'm fairly new to OpenGL, but i'm encountering a phenomenon and i wanted to verify with others. I'm not using any of the new fragment-shading techniques. If i have a texture-mapped surface, is there any way to get it to display BRIGHTER than what the original texture-map values are? i've tried adding lights with high intensities, but it seems like the multipliers for a texture map (including all light contibution and vertex colors) always clamp at 1 BEFORE it gets combined with the texture map, which i find frustrating. i can't find any way to say 'double' the brightness of the texture map other than brightening up the original (which has clamping issues of its own) or by doing another additive texture layer (which i'd also like to avoid doing) does anyone know if there's another way around this? this seems like this should be pretty basic functionality. thanks, alan

Share this post


Link to post
Share on other sites
Advertisement
This line will double the brightness, I'm sure you can figure it out...

glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
glTexEnvf(GL_TEXTURE_ENV,GL_RGB_SCALE,2.0f);

Hope that does what you want
~zix~

Share this post


Link to post
Share on other sites
Now here's one more curiosity (and i'm feeling a bit silly). i'm using it exactly as you describe it and it works. however, if i try ANY value other than 2.0f in there (2.1f 3.0f, 0.5f etc) it always just goes back to 1.0f. Literally, NO other value than 2.0f works. is that weird? i'm using glTexEnvf(), stress the floating-point version.


Share this post


Link to post
Share on other sites
the only valid values, according to the extension spec are,
1.0
2.0
4.0

thats why all the others are changing back to 1.0

for additional info regarding the Combine extention

http://oss.sgi.com/projects/ogl-sample/registry/ARB/texture_env_combine.txt

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!