need help on gl
category: general [glöplog]
how is one supposed to smoothly transform one texture into another using _multitexturing_ in opengl while keeping target layer transparency equal to 1.0 ( in gl terms, not transparent at all ).
EXT_texture_env_combine ? texture_env_combine.txt ? dont blame me - i'm new to gl coding :/
EXT_texture_env_combine ? texture_env_combine.txt ? dont blame me - i'm new to gl coding :/
GL_EXT_texture_env_combine
i think
i think
hm it works like
REPLACE Arg0
MODULATE Arg0 * Arg1
ADD Arg0 + Arg1
ADD_SIGNED_ARB Arg0 + Arg1 - 0.5
SUBTRACT_ARB Arg0 - Arg1
INTERPOLATE_ARB Arg0 * (Arg2) + Arg1 * (1-Arg2)
but i need something really flexible so i can select alpha-blending of each of two textures manually ...
REPLACE Arg0
MODULATE Arg0 * Arg1
ADD Arg0 + Arg1
ADD_SIGNED_ARB Arg0 + Arg1 - 0.5
SUBTRACT_ARB Arg0 - Arg1
INTERPOLATE_ARB Arg0 * (Arg2) + Arg1 * (1-Arg2)
but i need something really flexible so i can select alpha-blending of each of two textures manually ...
float half[]={0.5,0.5,0.5,0.5};
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_INTERPOLATE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB_EXT, GL_CONSTANT_EXT);
glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, half);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_INTERPOLATE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB_EXT, GL_CONSTANT_EXT);
glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, half);
thx. :) is there a thing you don't know ? :)