From 33e0eedbfb116111fa79cbc506d9e94ffbb1543b Mon Sep 17 00:00:00 2001 From: number Zero Date: Wed, 25 Jan 2017 00:33:01 +0300 Subject: Add smooth lighting for all nodes Note: Smooth lighting disables the mesh cache. --- src/nodedef.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nodedef.cpp') 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") { -- cgit v1.2.3