View Full Version : How do I use multitexturing for blending tiles?

08-21-2003, 03:53 PM
I'm working on a tile based game and would like to have nice transitions between the tiles. I was thinking that I could use two different terrain textures and one alpha texture to blend between the two. In this way I can use different alpha maps for different types of transitions.
The question is: How do I do this with multitexturing in one pass. I'm sure it is possible, I just haven't figured it out. I would be mighty happy if someone could help me with this.

Tom Nuydens
08-21-2003, 10:39 PM
You mean like this? http://www.delphi3d.net/articles/viewarticle.php?article=terraintex.htm

-- Tom

08-22-2003, 03:42 AM
I don't think thatīs it.

You can use GL_INTERPOLATE to achieve the above but c can't be taken from a texture can it? That's what I want but maybe it isn't possible? To do that you have to have access to not only the last texture stage but also the last-last texture stage.

08-22-2003, 05:15 AM
With the crossbar extension you can do it, as it allows you to access any previous texture.

I don't remember exactly but i think Tom's article speaks about the same technic, except he's using per-vertex coverage values, and you want them per-texel. Shouldn't be too hard IMO.