Jump to content
  • Advertisement
Sign in to follow this  
bovinedragon

Transparency

This topic is 4008 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 am trying to get parts of a texture to be transparent, trying to make a flat texture of leaves look see through in the parts between the leaves. I tried using the method on the NeHe tutorial 20 (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=20) My problem with that is that it is slow. I tried speeding it up, by rendering all of the black masks, then rendering all of my normal textures, but that makes glitches when it overlaps, so im kinda stuck on how to make this more efficient. Is this the best method to accomplish this effect, and is there any tweaks that I can do to make this method more efficient? Any ideas of links would be appreciated, thx.

Share this post


Link to post
Share on other sites
Advertisement
Try lesson 32 instead (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=32).

You need to use 32-bit textures (i.e. the texture needs an alpha channel), then you can render the texture in one pass with alpha blending enabled (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA).

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!