View Full Version : Why depth buffers - not bucket sorting?

08-02-2003, 11:02 AM
(I've only skimmed through the spec, so I may have missed something)

Am I correct that the only form of depth sorting supported is z-buffering? :confused:

Why no bucket sorting mode? This is *far* more efficient for software implementations, and even for simple hardware accelerators (worked well for the PSX!)

Ok, bucket sorting ain't perfect - you need a fair bit of application-specific z-biasing to get clean rendering. But it's way faster than a software z-buffer....

08-02-2003, 02:31 PM
The simple answer is that we wanted a spec based on the desktop specification to serve as a suitable abstraction layer for both hardware and software implementations. We tried to do some small things to ***ist software implementations, if they didn't hamper hardware implementations. Replacing depth buffering with an alternative doesn't fit in that category and frankly the discussion never really came up since the OpenGL 1.3 pipeline was the basis for all of the work. Those building tiled renderers already know how to buffer and sort a scene using the existing API, so someone enterprising could probably figure out how to do something other than depth buffering in a software renderer while using the existing API.

12-20-2003, 02:00 AM
Also, even if we don't take David's points (which are all quite valid) into account, bucket sorting isn't really the way to go in modern software rasterizers for several reasons:

a) for scenes of any depth complexity whatsoever, depth buffering tends to be quite a bit faster (***uming very coarse application-side sorting)

b) depth buffering operates with a fixed memory usage (N bytes per pixel); bucket-sorting variants tend to have dynamic memory allocations (as memory is required for each primitive + primitive instance/bucket)

c) the output contains artifacts (sorting problems), requires considerable pre-processing of meshes, the output cannot be "standardized".

On the other hand, there exist both SW and HW implementations that perform bucket-based z-buffering ("tiled rendering").