multitexturing + blending

is it possible to use blending for lets say 4 textures, and give every textureunit a different alpha-value per vertex ?

I don’t ‘think’ you can give a different alpha value per vertex with 4 different textures. You might have to use ‘8’ textures, with the other 4 being alpha maps where you map an alpha value from a corresponding pixel to each vertex. Look up texture splatting, http://www.cbloom.com

you can use an interpolating combiner function.
From the OpenGL RedBook:
static GLfloat constColor[4] = {0.,0.,0.,.5};

glTexEnvfv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_COLOR,constColor);
glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE, GL_COMBINE);
glTexEnvf(GL_TEXTURE_ENV,GL_COMBINE_RGB, GL_INTERPOLATE);
glTexEnvf(GL_TEXTURE_ENV,GL_SOURCE0_RGB,GL_TEXTURE);
glTexEnvf(GL_TEXTURE_ENV,GL_OPERAND0_RGB,GL_SRC_COLOR);
glTexEnvf(GL_TEXTURE_ENV,GL_SOURCE1_RGB,GL_PREVIOUS);
glTexEnvf(GL_TEXTURE_ENV,GL_OPERAND1_RGB,GL_SRC_COLOR);
glTexEnvf(GL_TEXTURE_ENV,GL_SOURCE2_RGB,GL_CONSTANT);
glTexEnvf(GL_TEXTURE_ENV,GL_OPERAND2_RGB,GL_SRC_ALPHA);

The alpha value of the constant color will be the weighting factor for each texture.
change this alpha value between texture units.

[This message has been edited by Aeluned (edited 02-27-2004).]