Jump to content
  • Advertisement
Sign in to follow this  
Nairou

Weird transparency blending result

This topic is 2344 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on my UI, and am trying to get text rendered over some semi-transparent quads, but the results are odd.

If I render the text by itself, with nothing behind it, it looks fine:

transparency1.jpg

However, if I render a semi-transparent quad behind it (rendering the quad before rendering the text), I get this:

transparency2.jpg

I have blending set to ([font=courier new,courier,monospace]GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA[/font]). The font texture is an all-white texture with the character shapes in the alpha channel.

Do I need to be doing something special when performing alpha-transparency over an existing layer of transparency? Or is there something else I need to check?

Share this post


Link to post
Share on other sites
Advertisement
Turns out the problem wasn't the transparency at all. There was a problem with rendering the background quad, which caused it to also render the text quads, but using the background texture. Bah. :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!