MPech
04-26-2002, 03:38 AM
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 ! http://www.opengl.org/discussion_boards/ubb/wink.gif
what could i forget ?
regards
[This message has been edited by MPech (edited 04-26-2002).]
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 ! http://www.opengl.org/discussion_boards/ubb/wink.gif
what could i forget ?
regards
[This message has been edited by MPech (edited 04-26-2002).]