]> git.lizzy.rs Git - dragonfireclient.git/commit
Distribute shadow map update over multiple frames to reduce stutter (#11422)
authorx2048 <codeforsmile@gmail.com>
Sun, 25 Jul 2021 10:36:23 +0000 (12:36 +0200)
committerGitHub <noreply@github.com>
Sun, 25 Jul 2021 10:36:23 +0000 (12:36 +0200)
commitbf3acbf388406f736286d990adb5f35a9023c390
tree9fdff755e37253580c222ff768802a6b0170be10
parentff2d2a6e93d75d24b3f69f2b3690bcac6440961e
Distribute shadow map update over multiple frames to reduce stutter (#11422)

Reduces stutter and freezes when playing.

 * Maintains double SM and SM Color textures
 * Light frustum update triggers incremental generation of shadow map into secondary 'future' textures.
 * Every incremental update renders a portion of the shadow draw list (split equally).
 * After defined number of frames (currently, 4), 'future' and 'current' textures are swapped, and DirectionalLight 'commits' the new frustum to use when rendering shadows on screen.

Co-authored-by: sfan5 <sfan5@live.de>
builtin/settingtypes.txt
client/shaders/nodes_shader/opengl_fragment.glsl
src/client/clientmap.cpp
src/client/clientmap.h
src/client/game.cpp
src/client/shadows/dynamicshadows.cpp
src/client/shadows/dynamicshadows.h
src/client/shadows/dynamicshadowsrender.cpp
src/client/shadows/dynamicshadowsrender.h
src/defaultsettings.cpp