PDA

View Full Version : Shader technique?



LostInTheWoods
01-29-2003, 05:43 AM
I was curious, about how shaders (Like Q3 has) actualy work? I had an idea for something similar, but im not sure if it will work. Is there a way (Using blending or multitextureing, or both) that you can progressivly "fade out" one texture, and "fade in" another. Making it so the second texture is more and more visable through the other as time goes on? I think that would make a pretty decent shader effect. Plus it could also be used for some animated texture techniques i have been think about. So is there a way to do something like that?

jwatte
01-29-2003, 07:53 AM
Sure you can do that. Look up the various texture application functions available for glTexEnv{if}(). Send in the blend factor either as vertex color, or as the texture environment constant color.

GL_COMBINE is probably the mode that makes it easiest to express what you want.