View Full Version : Different Blending Techniques

09-02-2005, 12:57 AM
Hi, I am trying to make seamless texturing in my OpenGL app. I am currently using different textures, 1 of the starting texture (sand), 1 of the inbetween texture (sand blending into grass) and 1 of the final texture (grass).

Is there any way to create the merged texture in OpenGL? So that the first fades into the last? I noticed the size increase in my app with all the textures ans was hoping for a way to create most of them from within OpenGl.

09-02-2005, 07:02 PM
Alpha blending works great for this sort of thing, single- or multi-pass flavors.

09-03-2005, 12:35 AM
Hmm, not really. I dont want one image entirely faded over the other. If I could pass it for each line of each texture so the top one became more transparent towards the bottom, that would work.

09-03-2005, 03:50 AM
To avoid using more texture memory, you can fiddle with vertex alpha, it is linearly interpolated between vertices.

09-03-2005, 05:26 PM
Cool, sounds like what I need. I will take a look.

09-03-2005, 05:49 PM
How can you do this in a single pass (without shaders)? Is there a way to specify different vertex alpha values for each multitexture layer?