Alpha blending using multi-texture

here is my problem :
I want to fill texture0’s alpha mask with texture1 (display texture1 in the alpha mask of texture1)
I’m using ARB_multitexture and ARB_texture_env_combine extensions.

here is my algo :

activate Unit0
bind(texture0)
enable(TEXTURE_2D)
texture environement settings :
ENV_MODE -> COMBINE
SOURCE0 -> TEXTURE
COMBINE mode -> REPLACE

activate Unit1
bind(texture1)
enable(TEXTURE_2D)
texture environement settings :
ENV_MODE -> COMBINE
SOURCE0 -> PREVIOUS
SOURCE1 -> TEXTURE

OPERAND1 -> ONE_MINUS_SRC_ALPHA
OPERAND2 -> SRC_ALPHA
COMBINE mode -> MODULATE

what i get is :
-texture0 display well
-the alpha mask choosen is the one of texture1 (i would like the one of texture0)

  • nothing is display in the mask place (i would like to display texture1 in palce of the mask).

I got it work using multi-pass but i’m a newbie in multitexturing, please help !

what could i forget ?

regards

[This message has been edited by MPech (edited 04-26-2002).]

there is a mode GL_INTERPOLATE_EXT with wich you can set the alpha source as well… i think

Yes, I know but it returns me black and white rendering without any texture.

Any other suggestions ? or any site/docs from which I could get information about advance mutitexture rendering ?
I’m really stuck, here…

Did U take a look to Nehe’s tuts on gamedev ?
I think that lesson 22 should answer your question.

I 've read it but, want i’m looking for is an “advanced” documentation, upon multitexture lightmaping or alpha blending.
I’d rather buy a book I think… :wink:

Here, this nice util will generate the code you need, and you can play around with all the options. http://www.ati.com/developer/sdk/rage128sdk/Multex/OGLMultex.html

Three cheers for ATI for making this

Exactly what i needed !!
thanks a lot ! B)

[This message has been edited by MPech (edited 04-26-2002).]

Yes, thanks for that - very nice little app.