Sign in to follow this  

Multiple Surface rendering issue

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

This topic is 3297 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this