Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cherry

transparency, glass problem

This topic is 5435 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 trying to render an hourglass shape to look like glass. It is the combination of 2 spheres and 2 cones. When I try to make it transparent so the sand would show, I cannot see the sand. I read in other postings that this is because you need to draw the objects in order; but how would I do that for a cone and sphere? I thought Depth Test took care of that? Also, the overlap of the cone and sphere cause a darker stripe to appear, is there any way to get around that? or is there a better technique such as texture mapping? thanks ahead of time.

Share this post


Link to post
Share on other sites
Advertisement
depth test is exactly your problem and can only decide between drawing or not, it will NOT change any orders or whatever because it simply cant and isnt meant to. all solid stuff has to be drawn first, then all transparent objects, preferably with depthmask disabled. dark stripes at overlap can simply be avoided: dont let it overlap.

Share this post


Link to post
Share on other sites

  • 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!