Jump to content
  • Advertisement
Sign in to follow this  
spiggo89

Alpha sorting

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

Recently I wanted to put some foliage in my game, so I got one of those models that is simply a bunch of quads dispersed around a point at random angles/sizes and a plant texture. However I am now having problems with it. From a little research it seems the problem is to do with alpha sorting, I did find a small demo on codesampler.com which used a trick of rendering from back to front to ensure the alpha would work. Now im not entirely sure, but this seems like alot of work if i have large numbers of plants in the one area. What i am wondering is if there are any alternative ways to approach this problem, and if not, are there any in depth articles/tutorials on it? Edit: Just found the search function... http://www.gamedev.net/community/forums/topic.asp?topic_id=157544 answers my question pretty well. [Edited by - spiggo89 on July 6, 2008 12:13:31 AM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
I am now having problems with it

Not much to go on. Can you describe the problem and what you mean by "alpha-sorting"?

Share this post


Link to post
Share on other sites
Quote:
Original post by spiggo89
What i am wondering is if there are any alternative ways to approach this problem, and if not, are there any in depth articles/tutorials on it?


Order independent transparency is an old topic that keep coming up and up.

In short, there is no panacea, only solutions that might or might not work in your case.

Sorting before rendering is most of the time sufficient to get rid of artifacts but not necessarily complete (triangle A before B before C before A comes to mind). And sorting every frame can be expensive.

Sometimes artifacts will be sufficiently small to unnoticeable even if you don't have a totally correct order (still need a rough order) but disabled z-writing for semi-transparent polygons (you still have the depth test for transparent/opaque intersection).

Other solutions listed here :

order independent transparency

A popular one these days is screen door transparency with the alpha to coverage feature.

LeGreg

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!