Think of nice Frustum Culling API:
- Control culling per camera.
- Detect if entity is culled.
- Enable/disable culling for entity.
- Hierarchal culling: culling happens on AABB of entities (which include all children), so if whole entity is culled, no culling needs to be checked for children. Detecting culling have to respect parents too.
Here are example use cases:
- Someone has car model with some entities inside (turrets, wheels, driver), it is required to cull whole car not partially, and detect when car is culled in script so to prevent any scripts related to rendering (script animations, or particles, etc).
- Multiple camera culling for shadow rendering where shadow camera as well as any active cameras has to be respected during depth map rendering.
- Simple game like tanx has single big level, so dev will be sure that level don't have to be ever culled, or UI elements for example, so to optimise will turn of culling on those entities.
Think of nice Frustum Culling API:
Here are example use cases: