3 ms·
I'm more curious about this as a general trend. I always see people advising sphere-frustum tests for these situations, but I've never really understood how it
by daeken 16y ago
I'm more curious about this as a general trend. I always see people advising sphere-frustum tests for these situations, but I've never really understood how it works out better than box-frustum. I should really run some tests not just against his code, but to figure out where the tipping point between the two techniques is.
- barrettcolin 16y agoBroadly speaking, simpler is better on modern CPUs and GPUs. Testing an array of spheres against a view frustum is cache friendly, can be sped up considerably using SIMD instructions and is easily parallelizable. Submitting superfluous data to a GPU is not generally impactful; GPUs are clever at not drawing stuff that doesn't actually contribute (with clipping and depth buffer rejection) and extremely fast in their own right.