calculations for visibility and occlusion culling 335452