mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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.
This commit is contained in:
parent
0709946c75
commit
442e48b84f
7 changed files with 66 additions and 67 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue