Plane-at-a-time frustum culling has this "feature". IfQuote:> Hi all, I wanted to insert the frustum culling algorithms from
> in a project
> however I kind of noticed: for the Frustum/AABox intersection algorithm,
> isn't there a problem?
<snip of code>
> Isn't it possible that some AABox is not fully behind a particular plane
> fully out anyway? See what I mean?
> Can someone tell me if I'm right?
> And if I am, tell me how to correct it?
the box is not fully outside one of the planes, it might
straddle multiple planes, yet still be outside the frustum.
All that means is you send the object to the renderer
only to find out that all triangles are fully clipped.
A more aggressive (exact) culling scheme can be used
to determine if the box is fully outside, but it takes more
cycles to do so. The hope is that the extra time spent
in trying to cull is less than the time it takes the renderer's
clipper to find out the object is not inside the frustum.
One exact test is to use the method of separating axes
between the box and frustum:
On current consumer graphics hardware, exact culling
might not be a "win" since you do the extra culling work
on the CPU whereas the clipping is done on the GPU.
Sometimes it is better to waste a few cycles on the fast
GPU to save a few cycles on the slow CPU. In the end,
of course, you will need to profile your application to see
which culling method gives better results.