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

Thread: Using Blending & Alpha channel to achieve masking

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2003
    Location
    Ipswich, Suffolk, England
    Posts
    2

    Using Blending & Alpha channel to achieve masking

    My texture loading routine sets pink 0xFF00FF to have an alpha value of 0, and all other colours to have 0xFF. I do this so that pink is not drawn in the texture, thus 'masking' without having to go through 2 passes.

    This works fine, apart from the fact that I'm not using a depth buffer (I am making a 2D game, and just want things drawn in the order that I draw them) - when I blend a quad over another quad, even the fully opaque parts of the textures seem to be blended. How do I make this not happen? Why does it happen?

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jan 2003
    Location
    Virginia
    Posts
    601

    Re: Using Blending & Alpha channel to achieve masking

    It depends on the source and destination factors you are using... what are they?

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2003
    Location
    Ipswich, Suffolk, England
    Posts
    2

    Re: Using Blending & Alpha channel to achieve masking

    It's okay now, I figured it out.

Posting Permissions

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