problem ?? with lighting and blending
Hi All. I am just playing around with a dummy TGA texture (from a previous project0 which contains a proper alpha map and have noticed than when I'm close to the texture the lighting seems to brighten the pixels around the letters. example picture in that texture I have a green glow which changes the alpha from 0.0 to 1.0. it seems the lighting is making even the 0.1 alpha brighter and just making it look ugly. It only really happens when the lighting catches it at a low angle or dead on.. I'm just doing the usual glAlphaFunc(GL_GREATER, 0.0f); glEnable(GL_ALPHA_TEST); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); before rendering.. I placed the same texture as an overlay over the render so I can see that sort of blendind is working.. I've only tried this on a ATI card at the moment.. Any Ideas ???
> glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
This might be wrong. For normal transparency, use:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Regards,
Lyve
This might be wrong. For normal transparency, use:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Regards,
Lyve
_____________________________________http://www.winmaze.de, a 3D shoot em up in OpenGL, nice graphics, multiplayer, chat rooms, a nice community, worth visiting! ;)http://www.spheretris.tk, an upcoming Tetrisphere clone for windows, a 3D tetris game on a sphere with powerful graphics for Geforce FX and similar graphics cards.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement