diff options
author | x2048 <codeforsmile@gmail.com> | 2021-08-12 20:07:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-12 20:07:09 +0200 |
commit | 442e48b84fea511badf108cedc2a6b43d79fd852 (patch) | |
tree | d4ba62bd7398f4e1f820dd19425344588a1fe9db /src/client/render | |
parent | 0709946c75ae6f2257d368714185bed7bee538ba (diff) | |
download | minetest-442e48b84fea511badf108cedc2a6b43d79fd852.tar.gz minetest-442e48b84fea511badf108cedc2a6b43d79fd852.tar.bz2 minetest-442e48b84fea511badf108cedc2a6b43d79fd852.zip |
Move updating shadows outside of RenderingCore::drawAll. (#11491)
Fixes indirect rendering modes such as some 3D modes mentioned in #11437 and undersampled rendering.
Does not fully fix anaglyph 3d mode.
Diffstat (limited to 'src/client/render')
-rw-r--r-- | src/client/render/core.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/render/core.cpp b/src/client/render/core.cpp index 4a820f583..f151832f3 100644 --- a/src/client/render/core.cpp +++ b/src/client/render/core.cpp @@ -76,19 +76,18 @@ void RenderingCore::draw(video::SColor _skycolor, bool _show_hud, bool _show_min draw_wield_tool = _draw_wield_tool; draw_crosshair = _draw_crosshair; + if (shadow_renderer) + shadow_renderer->update(); + beforeDraw(); drawAll(); } void RenderingCore::draw3D() { - if (shadow_renderer) { - // Shadow renderer will handle the draw stage - shadow_renderer->setClearColor(skycolor); - shadow_renderer->update(); - } else { - smgr->drawAll(); - } + smgr->drawAll(); + if (shadow_renderer) + shadow_renderer->drawDebug(); driver->setTransform(video::ETS_WORLD, core::IdentityMatrix); if (!show_hud) |