Archived

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

blending problem

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

I have a alpha channel blended texture. If i enable GL_COLOR_MATERIAL, i''m able to colr the texture with several combinations (i''m able to color it in red, green etc), but how can i color it in white ? If i use glColor4f(1,1,1,1) it just shows the texture like it is (i.e. showing transparent and non-transparent areas)...

Share this post


Link to post
Share on other sites
When you use textureing with lighting all the texture values are multiplied by the lighting value. If you pass a color through color material (for example Red = (1,0,0,1)) the green and blue values of the texture are then 0 (because they''re multiplied by 0). So the texture seems to appear Red. If you use a color of (1,1,1,1) the result of the multiplication is equal to the texture values so the result looks like the texture.

--------------------------------------------------------

"If it looks good, it is good computer graphics"
"If it looks like computer graphics, it is bad computer graphics"

Corrail
corrail@gmx.at
ICQ#59184081

Share this post


Link to post
Share on other sites