Doing frustum culling on the CPU
Frustum culling is a technique used to determine whether a part of the scene is visible within the viewing frustum. While many tutorials online explain how to implement it, most have a significant drawback.
As Inigo Quilez highlighted in his blog http://www.iquilezles.org/www/articles/frustumcorrect/frustumcorrect.htm, many frustum culling examples determine whether a mesh is outside the viewing frustum by comparing the mesh’s axis-aligned bounding box (AABB) against the 6 planes of the frustum. They reject any AABB that lies entirely outside any of these planes.
This approach will result in false positives when a large AABB, which is not actually visible, intersects some of the frustum planes. The naïve method will incorrectly classify these AABBs as visible, reducing culling efficiency. For individual meshes, addressing these cases may not be worth the performance cost. However, when culling large bounding boxes that serve as...