A DepthSorted checkbox on RenderMesh, so the triangles of a mesh are sorted in order of depth and then rendered back to front. Useful for foliage, hair and other non-flat meshes that use transparency.
as far as you know, is there anything in openGL that makes this automatically? Otherwise we should go with a fast sorting algorythm (I can code a quicksort... I guess I should code this anyway...)
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
There's GL_SAMPLE_ALPHA_TO_COVERAGE, but not sure what kind of performance hit that takes.
I believe a BSP Tree is generally used for this kind of sorting ( or depth peeling ) .. guess it depends on what you want to support ( intersecting triangles for example ).
You are right, those structures are usually way better for handling 3D spaces, but implementing those might take a lot of space and time. On the other side the QuickSort can be used in any generic sorting operation, and I think we already have something that needs a sort. Quicksort is sligthtly bigger in code size but is way faster when a greater number of object is present.
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-