Jump to content
  • Advertisement
Sign in to follow this  
myfeng

Multiple Surface rendering issue

This topic is 3638 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

Hi, I am having an issue with rendering multiple surfaces with difference opacity. The problem is: mesh A and B. B is inside of A. If I render A, then render B and change the opacity of B, B will not be seen unless opacity A is 0. If I render B first, then render A, it seems ok. I cannot actually just switch the rendering order, since I have more than 2 meshes and I also don't know which one is inside of others. Can anyone help me on this? Thanks a lot. myfeng

Share this post


Link to post
Share on other sites
Advertisement
If B is inside A and you render A, then B can't be rendered because of the depth test. You need to sort objects that need certain blending modes like GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA back to front.

The other technique is to use order independent transparency. Do some searches if you want to implement this.

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!