PDA

View Full Version : ARB multitexturing question



dorinm
09-16-2003, 05:25 AM
hello all,
is there a way to control the amount each texture from eacvh texture unit (ARB0, ARB1 ....) is blended, not using register combiners ? let's say i want 90% TEX0 and 10% TEX1...how can i do that?

thank you.

roffe
09-16-2003, 10:54 PM
Originally posted by dorinm:
not using register combiners ?

If by register combiners you mean all combiners including ARB_texture_env_combine (http://oss.sgi.com/projects/ogl-sample/registry/ARB/texture_env_combine.txt) , I think it will be difficult. If you meant vendor specific combiners only, I suggest looking at the one above. Especially interpolation between textures. ARB_texture_env_combine should be supported on most hw with at least 2 texture units.

Otherwise I think your left with multipass blending.

dorinm
09-17-2003, 12:23 AM
thank you, ARB_texture_env_combine helped a lot, because i don't wanna rely on some vendor specific extension.

dorinm
09-17-2003, 12:15 PM
now please excuse me, maybe it's again a beginner question... is there a difference between ARB_texture_env_combine implementation and those hardware speciffic extensions, like NV's register combiners?
i'm asking that because programming (not to mention opengl) is not my primary ocupation, i'm in networking and from time to time in need some c in linux and...java, when it's needed.....

thank you

Mazy
09-17-2003, 01:20 PM
If you read the specifications for the extensions you can see the difference..

dorinm
09-17-2003, 02:08 PM
i'm asking that because programming (not to mention opengl) is not my primary ocupation, i'm in networking and from time to time in need some c in linux and...java, when it's needed.....
i've say that to let you understand that i don't have too much time to read docs not specific to my primary work, not because i'm lazy or something. if i get a starting point i can learn really quick (see my first post and then see what was my second questieon, don't you see the difference?), just i don't have enough time to find all the starting points (or checkpoints) i need, that's why i'm here.

anyway, thanks.....

Mazy
09-17-2003, 10:40 PM
The problem wit telling the differences is that we have quite many extensions regarding combinations of layers in multitexture ( without fragmentshaders or dependent lookups ) What should we compare?

GL_ARB_texture_env_add
GL_ARB_texture_env_combine
GL_ARB_texture_env_crossbar
GL_ARB_texture_env_dot3

GL_NV_register_combiners
GL_NV_texture_env_combine4
GL_NV_register_combiners2

GL_ATI_texture_env_combine3

vincoof
09-18-2003, 02:34 AM
ARB_texture_env_combine is just another texture environment function. It adds functionality exactly like GL_REPLACE, GL_DECAL and GL_BLEND added functionality in OpenGL1.1 (in OpenGL1.0, GL_MODULATE was the default and the only one texture environment allowed).

NV_register_combiners does eat and replace three parts of the pipeline : texturing, fog, and color sum. Register combiners offer more functionality than ARB_texture_env_combine but is a bit harder to setup. Also, NV_register_combiners is limited to GeForce hardware (and recent ATi cards also support it if you have drivers up to date) which means that you can't run your register combiners effects on as many hardware as your texture combiners effects.

Mazy
09-18-2003, 06:11 AM
Thats a simplification..

env_combine let you specify 3 different inputs per texturestage ( without it you must use previous TMU and this TMU as input, and primary color, this TMU on the first one). It also enables you to split the color into RGB and A and have different functionallity on them, like modulate texture with primary color, and add alpha with previous stages alpha.

with _crossbar you get the ability to specify which texture you want as input in which state you want, that is you can use texture0,1,2 in the first combiner.

the only new operator (GL_MODULATE and such) is GL_INTERPOLATE, the other, GL_ADD, GL_ADD_SIGNED, GL_MIN, GL_MAX, GL_DOT3RGB(a) is specified in other extensions. I dont know it all must exists in order for this extension to exist, but they are defined elsewhere.

ATI:s version gives an extra operator, the MAD ( multiply and add) which is perfect for many layer effects.. environment*scale+previous color.

and the nVidia one is very much more complex.

dorinm
09-18-2003, 11:46 AM
huh, thak's guys, ...since i have a gf4ti card i'll stick to nv's extensions for now...
nv's register combiners are far more flexible than other combinations of env_texs... yes, i wanted not to use some specific ext's, i just don't have the time for smth else.
reading here and there i saw that some parts of opengl are so desorganized... i think i'll get to the fragment progs asap.
thanks again, at least i learnt some new stuff http://www.opengl.org/discussion_boards/ubb/wink.gif

vincoof
09-18-2003, 12:03 PM
Originally posted by Mazy:
Thats a simplification..
But it's not meant to be a complete comparison you know http://www.opengl.org/discussion_boards/ubb/smile.gif


Originally posted by Mazy:
the only new operator (GL_MODULATE and such) is GL_INTERPOLATE, the other, GL_ADD, GL_ADD_SIGNED, GL_MIN, GL_MAX, GL_DOT3RGB(a) is specified in other extensions.
I dont know about GL_MIN and GL_MAX, I haven't seen them in any spec.
The ADD_SIGNED functionality is not provided in any other extension, as well as the SUBTRACT that you haven't mentioned.


Originally posted by Mazy:
ATI:s version gives an extra operator, the MAD ( multiply and add) which is perfect for many layer effects.. environment*scale+previous color.
If you mean ATI_texture_env_combine3, it can also be done with NV_texture_env_combine4 with the 4th argument set to ONE.



Originally posted by Mazy:
and the nVidia one is very much more complex.
Do you mean NV_register_combiners or NV_texture_env_combine4 ?