PDA

View Full Version : Multitexturing.



MrShoe
05-01-2001, 12:15 AM
I am right now learning multitexturing, I was just wondering, wouldnt it be easier to create 2 quads, each with a different texture, move the quads exactly on top of each other and blend them together. I know this is a crude method, but would it work?

Teofuzz
05-01-2001, 12:32 AM
This is what you do when you don't want to use multitex (for users with cards that do not support multitex... mmhh...).
But it's slower, because you use only one texture unit at the time.
tFz

Pauly
05-01-2001, 06:12 AM
Take a look at:
http://home.clara.net/paulyg/prog7.htm
http://home.clara.net/paulyg/prog10.htm

paul

Korval
05-01-2001, 11:05 AM
In order to make sure that this is this multipass technique (what MrShoe described) works, you should send the exact same vertex data, byte-for-byte. Only the texture coordinates should change. If you're using vertex arrays, send the exact same vertex array data. Otherwise, you will get a variety of unpleasant artifacts.

MrShoe
05-01-2001, 10:38 PM
Yes, but what is the downside of this method? Would the effect look better or worse if I used proper multitexturing? Would it be slower or faster? And does this have any limitations that can be surpased if I used proper multitexturing?

Teofuzz
05-02-2001, 03:09 AM
Multipass: slower, works on all cards
Multitexture: faster, works only on cards that support it

You'll have to check in realtime if the multitexture extension is present and then choose what piece of code to execute, so you can go faster, and however your software will run on all cards.
tFz

pATChes11
05-18-2001, 06:15 PM
No... not in real-time. Only at the start of the proggie... lol http://www.opengl.org/discussion_boards/ubb/smile.gif (stupid point :P)

j
05-18-2001, 07:17 PM
The effect will also potentially look better with multitexturing - if you are using a 16-bit framebuffer you lose color precision when doing multipass rendering.

Multipass rendering is more flexible than simple multitexturing in the type of effects that can be done. Add another extension like GL_EXT_COMBINE or register combiners, and multitexturing can do more.

j

ET3D
05-20-2001, 02:37 AM
Multipass can be problematic if you're using alpha information in the textures that are blended.