summaryrefslogtreecommitdiff
path: root/src/nodedef.cpp
diff options
context:
space:
mode:
authornumber Zero <silverunicorn2011@yandex.ru>2017-01-25 00:33:01 +0300
committerAuke Kok <sofar@foo-projects.org>2017-01-24 13:59:40 -0800
commit33e0eedbfb116111fa79cbc506d9e94ffbb1543b (patch)
tree9ebe88fdaa5b21569a95a700315e62951be16aa0 /src/nodedef.cpp
parent87e9466cafd72ab9b78218c67352c80d20e008a8 (diff)
downloadminetest-33e0eedbfb116111fa79cbc506d9e94ffbb1543b.tar.gz
minetest-33e0eedbfb116111fa79cbc506d9e94ffbb1543b.tar.bz2
minetest-33e0eedbfb116111fa79cbc506d9e94ffbb1543b.zip
Add smooth lighting for all nodes
Note: Smooth lighting disables the mesh cache.
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r--src/nodedef.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index 98f795c7a..0bb150267 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -269,10 +269,15 @@ void TextureSettings::readSettings()
bool enable_shaders = g_settings->getBool("enable_shaders");
bool enable_bumpmapping = g_settings->getBool("enable_bumpmapping");
bool enable_parallax_occlusion = g_settings->getBool("enable_parallax_occlusion");
+ bool smooth_lighting = g_settings->getBool("smooth_lighting");
enable_mesh_cache = g_settings->getBool("enable_mesh_cache");
enable_minimap = g_settings->getBool("enable_minimap");
std::string leaves_style_str = g_settings->get("leaves_style");
+ // Mesh cache is not supported in combination with smooth lighting
+ if (smooth_lighting)
+ enable_mesh_cache = false;
+
use_normal_texture = enable_shaders &&
(enable_bumpmapping || enable_parallax_occlusion);
if (leaves_style_str == "fancy") {