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


blending problem

Recommended Posts

penetrator    122
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
Corrail    133
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"


Share this post

Link to post
Share on other sites