texture_env_combine question

Hi

Is there any way to do something like this:

(a * b) + (b * c) ?

I don´t know how, but maybe someone else knows of a trick.

Thanks,
Jan.

Just a guess, maybe :

(a + c) * b

Damn it! I made a mistake.
I meant:

(a * b) + (c * d)

Jan.

only with NV_texture_env_combine4
or with more restriction with ATI_texture_env_combine3

maybe you can manage it without if some of your variables are alpha components, but even than it will be really hard without multipassing

NV_texture_env_combine4 does it in a single texture environment.

ATI_texture_env_combine3 requires two texture environments. GL_MODULATE(a,b), then GL_MULTIPLY_ADD_ATI(c,d,GL_PREVIOUS_ARB).

With just vanilla ARB_texture_env_combine it isn’t feasible. There are hacks and approximations, but it’s generally easier and faster to just do a multipass split.

[This message has been edited by zeckensack (edited 12-11-2003).]

Could you perhaps tell us what a, b , c and d is in your case?

(Perhaps if one is a constant or an alpha value we can help?)

Well a and c are textures and b and d are constants.
I didn´t have the time to try it out, yet, but i am quite sure, that it will work with ATI_texture_env_combine3.

Thanks guys.
Jan.