1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Disable dynamic shadow dropdown on OGLES2 (#12637)

Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
ROllerozxa 2022-08-04 20:42:43 +02:00 committed by GitHub
parent b91063daef
commit eb49b6d85c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 3 deletions

View file

@ -35,6 +35,13 @@ RenderingCore::RenderingCore(IrrlichtDevice *_device, Client *_client, Hud *_hud
screensize = driver->getScreenSize();
virtual_size = screensize;
// disable if unsupported
if (g_settings->getBool("enable_dynamic_shadows") && (
g_settings->get("video_driver") != "opengl" ||
!g_settings->getBool("enable_shaders"))) {
g_settings->setBool("enable_dynamic_shadows", false);
}
if (g_settings->getBool("enable_shaders") &&
g_settings->getBool("enable_dynamic_shadows")) {
shadow_renderer = new ShadowRenderer(device, client);