mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 09:15:29 +01:00 
			
		
		
		
	Fix shadow flicker on camera offset update (take 2)
The previous fix never did what it was supposed to, so let's do this.
This commit is contained in:
		@@ -2989,8 +2989,13 @@ void Game::updateCameraOffset()
 | 
			
		||||
 | 
			
		||||
	if (!m_flags.disable_camera_update) {
 | 
			
		||||
		auto *shadow = RenderingEngine::get_shadow_renderer();
 | 
			
		||||
		if (shadow)
 | 
			
		||||
		if (shadow) {
 | 
			
		||||
			shadow->getDirectionalLight().updateCameraOffset(camera);
 | 
			
		||||
			// FIXME: I bet we can be smarter about this and don't need to redraw
 | 
			
		||||
			// the shadow map at all, but this is for someone else to figure out.
 | 
			
		||||
			if (!g_settings->getFlag("performance_tradeoffs"))
 | 
			
		||||
				shadow->setForceUpdateShadowMap();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		env.getClientMap().updateCamera(camera->getPosition(),
 | 
			
		||||
			camera->getDirection(), camera->getFovMax(), camera_offset,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user