1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02:00

Fix shadow flicker on camera offset update (#15709)

This commit is contained in:
sfan5
2025-01-25 10:47:52 +01:00
committed by GitHub
parent 7c6ade0fc5
commit b861f0c5c5
4 changed files with 25 additions and 22 deletions

View File

@@ -256,11 +256,14 @@ void ShadowRenderer::updateSMTextures()
// detect if SM should be regenerated
for (DirectionalLight &light : m_light_list) {
if (light.should_update_map_shadow || m_force_update_shadow_map) {
light.should_update_map_shadow = false;
m_current_frame = 0;
reset_sm_texture = true;
}
if (light.should_update_map_shadow)
m_force_update_shadow_map = true;
light.should_update_map_shadow = false;
}
if (m_force_update_shadow_map) {
m_current_frame = 0;
reset_sm_texture = true;
}
video::ITexture* shadowMapTargetTexture = shadowMapClientMapFuture;