Backface culling with just an AND operation


The basic idea behind this algorithm is to precalculate which sector a face normal is in and which sectors are visible from a view direction.

Imagine a cube where each side is divided in 6*6 rectangular cells. As a cube has 6 sides, this makes 216 cells in total (fitting in one byte). Now find for each face the sector its normal is in and save it. The next step is to calculate for each sector which sectors are back facing. For backface culling just find the sector the view direction is in and use the precomputed visibility set for testing.

The memory requirements are pretty low, (6*6*6)^2=46656 bits=5832 bytes for the visibility set and two bytes per polygon (pointer into bit table and mask).

Fast Backface Culling Using Normal Masks (c) Hansong Zhang