
Chapter
6
Spatial Sorting
T
he classic reason for geometric sorting is for correct drawing of objects, both
opaque and semitransparent. The opaque objects should be sorted from front
to back, based on an observer’s location, and the semitransparent objects should be
sorted from back to front. The sorted opaque objects are drawn first, and the sorted
semitransparent objects are drawn second.
Geometric sorting is not the only important reason for reorganizing your objects.
In many situations, changes in the render state can cause the renderer to slow down.
The most obvious case is when you have a limited amount of VRAM and more
textures than can fit in it. ...