drgoldie wrote:
i can immediately find examples where this method will fail. while this is ok for game developers on the psx (they can always split polys to fit the method) opengl developers will want their programs behave the way they are used to it
It was good enough for all those PS1 games, it's good enough for me
Yes, it's not perfect sorting - it can't handle intersecting polys, and there are cases, particularly where polys vary a lot in size, where it will fail. But for most 'clean' geometry, with back-face culling on, it works well
To fix the worst of the incorrect sorting, each mesh/model can be manually assigned a 'z bias' value - to push/pull an object forward/backwards in the sort order. (This takes a fair bit of tweaking/testing)
(Another improvement, especially if you aren't using perspective-correct texturing, is subdividing large polys as they approach the camera)
Is it worth ruling out what could be a 50%+ performance boost to save a little bit more coding?
drgoldie wrote:
z-buffer might not be the fastest method for software rendering, but it is one of the most powerfull. one of the few problems it has is transparent polygons (including antialiazed edges).
but a renderer can be speed-up e.g. by using hierarchical z-buffer.
Z-Buffers are simple and powerful. And work great in hardware. But IMHO not suitable for software-rendered real-time games on PocketPCs (and certainly not on slower machines)
Bucket sorting/'Ordering Tables' offer a very nice compromise between performance and ease-of-use.
drgoldie wrote:
btw: who said that it has to be done in software. there are quite some 3d chips for mobile devices on their way into the market...
The PocketPC market is small enough, without limiting your game to just the very very latest models.... Software rendering options will be more-or-less essential for another 2-3years or so...
Anyway, all I'm saying is that there is a significantly faster sorting method that Z-Buffering that is suitable for many/most 3D games. And limiting OpenGL:ES to depth buffers only was an odd design descision. If it's for high-end hardware 3D only/mainly, why not just use full OpenGL?....