mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +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:
parent
e84ac56e35
commit
68602b2eaf
1 changed files with 6 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue