void CGameView::BeginFrame() { if (m->LockCullCamera == false) { // Set up cull camera m->CullCamera = m->ViewCamera; } g_Renderer.SetSceneCamera(m->ViewCamera, m->CullCamera); CheckLightEnv(); m->Game->CachePlayerColors(); }
void CGameView::BeginFrame() { if (m->LockCullCamera == false) { // Set up cull camera m->CullCamera = m->ViewCamera; // One way to fix shadows popping in at the edge of the screen is to widen the culling frustum so that // objects aren't culled as early. The downside is that objects will get rendered even though they appear // off screen, which is somewhat inefficient. A better solution would be to decouple shadow map rendering // from model rendering; as it is now, a shadow map is only rendered if its associated model is to be // rendered. // (See http://trac.wildfiregames.com/ticket/504) m->CullCamera.SetProjection(m->ViewNear, m->ViewFar, GetCullFOV()); m->CullCamera.UpdateFrustum(); } g_Renderer.SetSceneCamera(m->ViewCamera, m->CullCamera); CheckLightEnv(); m->Game->CachePlayerColours(); }