blending problem
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)...
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
--------------------------------------------------------
"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
--------------------------------------------------------There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.There is another theory which states that this has already happened...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement