Oh, it never occured to me that that was what you were trying to say. glTexEnv should do the trick for you though...
______________________________________________________________
The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ
MySite
______________________________________________________________
Transparency blending with color - glBlend()
hi, i''m trying to implement the same ideea but with a slight diference... I have the sky-dome with gradients already rendered and i want to draw the cloud texture on a quad. The quad has vertex color at the edges to (0,0,0) so that the texture slowly fades toward the edges. The problem is that i can''t find a good combination so that the quad''s vertex color is taken in consideration. I use the following:
glTexEnv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_COLOR);
If I ''give up'' cloud coloring from texture I get what i want using
glTexEnv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_COLOR);
but then, i won''t be able to shade the clouds. So my question is How can i use texture colors for cloud color, texture alpha for cloud shape and also cloud plane vertex color for fading it into the distance. Also i use 1.0 alpha value for quad vertex color. Thanks
glTexEnv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_COLOR);
If I ''give up'' cloud coloring from texture I get what i want using
glTexEnv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_COLOR);
but then, i won''t be able to shade the clouds. So my question is How can i use texture colors for cloud color, texture alpha for cloud shape and also cloud plane vertex color for fading it into the distance. Also i use 1.0 alpha value for quad vertex color. Thanks
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement