PNG Draw Order Error in SecondLife

FROM DarianKnight In the world of virtual environments, I've been told for years that the infamous PNG Draw Order Error exists in all 3D Engines and that everyone has the same issue. The only reason, I'm told, that we don'...

FROM DarianKnight In the world of virtual environments, I've been told for years that the infamous PNG Draw Order Error exists in all 3D Engines and that everyone has the same issue. The only reason, I'm told, that we don't notice it in commercial games is because level designers design the levels with that bug in mind and position things to intentionally minimize or eliminate the chance we'll see the bug.Up until recently I accepted this as a universal limitation of 3D engines and that there wasn't a solution, however much that bothered me. For the past few weeks I decided to look deeper into it and see if there wasn't a solution, or if it was just a case of virtual environment programmers (Linden Lab, ActiveWorlds, etc) simply using the default Alpha rendering algorithm built into the game engine platforms they were using.Turns out, this seems to be exactly the case. Standard Alpha blending for PNGs and such seems to be a default method for game engines, with Clip Alpha (or Binary Alpha) as another method that doesn't blend. The difference is that Binary Alpha seems to not fall prey to the Draw Order Bug (most of the time) but doesn't blend the textures... so Binary Alpha seems to sort correctly, but doesn't look as good. However, the default Alpha technique seems to blend nicely but completely ignores sorting (creating some really messed up artifacts and rendering bugs). There is, however, hope in the virtual environment industry... Alpha + Sort.I cannot say this is the cure for it completely, but if I'm understanding it correctly (which is likely), then Alpha + Sort would blend properly and then take the time to run a sorting algorithm to make sure everything is placed in the 3D scene with proper depth to the camera. Albeit, I'm told that Alpha + Sort is more costly in computations... but I wouldn't think that with today's hardware it would be such an issue to enable to correct this long standing bug in virtual environments.My personal opinion on this is that the bug has been around so long that Alpha rendering default has become the defacto standard and the programmers simply have stopped thinking about this bug altogether and as such haven't even thought about using Alpha + Sort to fix the bug.If Alpha + Sort wouldn't fix the PNG Draw Error, then I propose a new Alpha Render algorithm:Binary Alpha Blend, which would render internally via Binary Alpha algorithm, then apply a blending algorithm on the texture in screen space to mimic the standard Alpha rendering while keeping the proper depth sorting intact.