PDA

View Full Version : texture_env_combine question



Jan
12-11-2003, 05:12 AM
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.

ZbuffeR
12-11-2003, 05:51 AM
Just a guess, maybe :

(a + c) * b

Jan
12-11-2003, 06:01 AM
Damn it! I made a mistake.
I meant:

(a * b) + (c * d)

Jan.

ScottManDeath
12-11-2003, 08:17 AM
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

zeckensack
12-11-2003, 11:00 AM
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).]

sqrt[-1]
12-11-2003, 01:53 PM
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?)

Jan
12-14-2003, 07:44 AM
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.