Jump to content
  • Advertisement
Sign in to follow this  
Prune

Thick alpha glass without sorting? please help

This topic is 4064 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 rendering liquid (which uses refraction shader from a cubemap) in glass, where the glass has no refraction, just cubemap reflections, and instead is simply alpha transparent to show the liquid inside and the background. I want to _not_ render the inside of the glass when it is seen through the front of the glass facing the user, just have it visible through the opening of the glass. So basically I don't want layering of transparencies, just the frontmost glass layer alpha blending with the liquid and background which already have been rendered. Otherwise, the illusion of glass is ruined because the the inner glass surface will have a sharp cutoff at the silhouette edges of the glass giving a cross-section type look. With sorting it's easy to achieve by rendering the glass front to back, since any covered glass surface will fail the depth test (i.e. backwards from the usual way alpha polygons are rendered). But sorting is slow, and the glass geometry is complex due to curves (and there's more than one). How do I pull this off?

Share this post


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

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!