the problem is this.
i need to blend (standard alpha blending) two or more textures in realtime, and using a single pass algo.
i need it for a terrain renderer, where i can say where there is grass and where there are stones.
i could use multitexturing, but i didn’t found a way to efficentily specify the blending factor.
i thought that alpha channel could help me here, so i set up things like this:
tu1 = rgb texture, “grass”
tu2 = rgba texture, “stones”
by manually specifying the alpha component of tu2, i can actually blend the two textures with high freedom… but low efficency, since the various textures are just tiles, so they are repeated over the whole landscape.
is there a way to let me blend 3 textures toghether? something like:
tu1 = rgb, “grass”
tu2 = alpha, large scale, low res blending map
tu3 = rgb, “stones”
…no, i think this won’t work.
another approach i’m thinking is to use the mip-mapping capabilities.
since i can specify mipmaps of any size, i could specify a texture object wich the various mip levels are my textures, suppose 4 of them.
then i could use the LINEAR_MIPMAP_LINEAR filter…
now the problem is: how can i specify the mip level independly by that automatically selected by gl?
i need suggestions ! (even weird ideas like the above )
PS:
i know 3D texturing, wich is definitely what i need, but i know that is not supported on nvidia/matrox cards.
am i right?
DMY