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 6 of 6

Thread: Different Blending Techniques

  1. #1
    Junior Member Regular Contributor Swiftless's Avatar
    Join Date
    Apr 2005
    Location
    Australia
    Posts
    118

    Different Blending Techniques

    Hi, I am trying to make seamless texturing in my OpenGL app. I am currently using different textures, 1 of the starting texture (sand), 1 of the inbetween texture (sand blending into grass) and 1 of the final texture (grass).

    Is there any way to create the merged texture in OpenGL? So that the first fades into the last? I noticed the size increase in my app with all the textures ans was hoping for a way to create most of them from within OpenGl.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Aug 2005
    Posts
    148

    Re: Different Blending Techniques

    Alpha blending works great for this sort of thing, single- or multi-pass flavors.

  3. #3
    Junior Member Regular Contributor Swiftless's Avatar
    Join Date
    Apr 2005
    Location
    Australia
    Posts
    118

    Re: Different Blending Techniques

    Hmm, not really. I dont want one image entirely faded over the other. If I could pass it for each line of each texture so the top one became more transparent towards the bottom, that would work.

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Different Blending Techniques

    To avoid using more texture memory, you can fiddle with vertex alpha, it is linearly interpolated between vertices.

  5. #5
    Junior Member Regular Contributor Swiftless's Avatar
    Join Date
    Apr 2005
    Location
    Australia
    Posts
    118

    Re: Different Blending Techniques

    Cool, sounds like what I need. I will take a look.

  6. #6
    Intern Newbie
    Join Date
    Jun 2005
    Posts
    42

    Re: Different Blending Techniques

    How can you do this in a single pass (without shaders)? Is there a way to specify different vertex alpha values for each multitexture layer?

Posting Permissions

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