multitexture blending question

How do you get rid of this darken effect when blending 2 textures using GL_INTERPOLATE_ARB? Here’s a screenshot http://cs.selu.edu/~soconnell/blend.jpg

I can’t seem to figure out how to make this go away, here’s the blending code.

glActiveTextureARB(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, rock);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

glActiveTextureARB(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, alphamap);

glActiveTextureARB(GL_TEXTURE2_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, grass);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB);
glTexEnvi(GL_TEXTURE_ENV,GL_COMBINE_RGB_ARB,GL_INTERPOLATE_ARB);
glTexEnvi(GL_TEXTURE_ENV,GL_SOURCE0_RGB_ARB,GL_TEXTURE0);
glTexEnvi(GL_TEXTURE_ENV,GL_OPERAND0_RGB_ARB,GL_SRC_COLOR);
glTexEnvi(GL_TEXTURE_ENV,GL_SOURCE1_RGB_ARB,GL_TEXTURE2);
glTexEnvi(GL_TEXTURE_ENV,GL_OPERAND1_RGB_ARB,GL_SRC_COLOR);
glTexEnvi(GL_TEXTURE_ENV,GL_SOURCE2_RGB_ARB,GL_TEXTURE1);
glTexEnvi(GL_TEXTURE_ENV,GL_OPERAND2_RGB_ARB,GL_SRC_COLOR);

Any ideas?

Well I found out that if you place the alpha values in glColor4f calls for each vertex, then the transition from one texture to another results in no darkening of the texture.

But the way I’m doing it, is that let’s say I have one quad, then I can have a bitmap with different rgb values specifying anywhere on that single quad to let another texture blend through. That’s the result of the screenshot above. So why does this method result in darkening, but passing alpha values with glColor4f does not?

Could you possibly post a screen shot of just the output of per-vertex colors vs just the output of the alpha texture?

Could you also try and use flat red for rocks and flat green for grass? (May be easier to figure out if something is going wrong when using different flat colors)

Also what video card do you have?