Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: Multitexturing.

  1. #1
    Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Sydney, NSW, Australia
    Posts
    428

    Multitexturing.

    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?
    :: Sleep is a poor substitute for caffeine ::

  2. #2
    Junior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Italy
    Posts
    126

    Re: Multitexturing.

    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

  3. #3
    Junior Member Regular Contributor
    Join Date
    May 2000
    Location
    Manchester - UK
    Posts
    138
    Paul Groves
    [b] pauls opengl page

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,768

    Re: Multitexturing.

    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.

  5. #5
    Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Sydney, NSW, Australia
    Posts
    428

    Re: Multitexturing.

    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?
    :: Sleep is a poor substitute for caffeine ::

  6. #6
    Junior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Italy
    Posts
    126

    Re: Multitexturing.

    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

  7. #7
    Junior Member Regular Contributor
    Join Date
    Feb 2001
    Posts
    138

    Re: Multitexturing.

    No... not in real-time. Only at the start of the proggie... lol (stupid point :P)
    -pATCheS

  8. #8
    Member Regular Contributor
    Join Date
    Jun 2000
    Location
    B.C., Canada
    Posts
    397

    Re: Multitexturing.

    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

  9. #9
    Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    341

    Re: Multitexturing.

    Multipass can be problematic if you're using alpha information in the textures that are blended.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •