Quick Flow
text
mesh local bounds
-> world transform 반영
-> camera view-projection에서 frustum 생성
-> volume vs frustum test
-> outside: draw 제외 / intersecting or inside: queue 유지Frustum culling은 GPU가 처리할 draw와 geometry를 줄이지만 너무 잘게 검사하면 CPU 비용이 커집니다. Object·chunk·instance group 중 실제 draw granularity와 맞는 bounds를 사용합니다.
Bounds 선택
Sphere는 rotation에 강하고 test가 단순하지만 빈 공간을 많이 포함할 수 있습니다. AABB는 axis-aligned 장면에 촘촘하지만 회전된 object의 world AABB를 다시 계산해야 합니다. OBB는 더 정확하지만 test와 갱신이 비쌉니다.
Non-uniform scale이 있는 sphere radius는 가장 큰 scale 축을 반영해야 object를 너무 일찍 제거하지 않습니다. Animated mesh는 static bind-pose bounds보다 실제 pose가 넓어질 수 있습니다.
자주 틀리는 점
- Local bounds를 world frustum과 직접 비교하지 않습니다.
- Near plane 뒤와 camera 뒤 판정을 center 하나로만 처리하지 않습니다.
- Culling 결과가 flicker하면 bounds와 matrix convention을 먼저 확인합니다.
- Draw call보다 test 수가 훨씬 많아지는 구조를 profiler 없이 유지하지 않습니다.
참고 링크
1 sources