### Occlusion Culling

Pixie supports occlusion culling during the scan-line rendering. This is accomplished by tracking the maximum opaque depth value within the bucket being rendered. If an object's minimum depth is greater that this value, object is deferred to the next bucket or deleted. This potentially doubles the rendering speed although there is a certain overhead involved for sorting the objects in buckets with their depths and maximum depth value tracking. However, for high depth complexity scenes, occlusion culling saves lots of processing. Since the occlusion culling involves tracking the maximum depth in the framebuffer, patch cracks that usually manifest themselves as missing pixels impair the maximum depth estimate. Although binary dicing can ameliorate some of the problem, Pixie does not have a definitive solution to patch crack problem (any suggestions ?). An additional consideration is the bucket size. If the size of the buckets are too big, then the depth variation within the bucket may be too large, decreasing the effectiveness of the culling. Currently only stochastic and zbuffer hiders support occlusion culling.

New in 1.2.5:

For polygons the occlusion culling is improved: if a polygon does not contribute to a sample, it will not be shaded at all. Depending on the demand, I can also implement the same optimization for the remaining primitives.