private void DrawOcclusions(BoundingFrustum viewFrustum) { if (postProcessingEffectsEnabled) { graphicsDevice.SetRenderTarget(occlusionRT); graphicsDevice.Clear(Color.Black); lightRenderer.Draw(level.Light, camera.Up, camera.Look); if (level.Type == LevelType.Outdoor) { terrainRenderer.DrawOcclusion(level.Terrain); terrainRenderer.DrawOcclusion(level.TerrainPlane); } foreach (Mesh mesh in level.MeshList) { if (viewFrustum.Intersects(mesh.AABB)) { meshRenderer.DrawMeshOcclusion(mesh, viewFrustum); } } foreach (ShootingTarget target in level.ShootingTargetList) { target.DrawOcclusion(meshRenderer, viewFrustum); } level.Sky.DrawOcclusion(); } }