diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/defaultsettings.cpp | 1 | ||||
-rw-r--r-- | src/shader.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 957857976..271214a4f 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -160,6 +160,7 @@ void set_default_settings(Settings *settings) settings->setDefault("texture_clean_transparent", "false"); settings->setDefault("texture_min_size", "64"); settings->setDefault("preload_item_visuals", "false"); + settings->setDefault("tone_mapping", "false"); settings->setDefault("enable_bumpmapping", "false"); settings->setDefault("enable_parallax_occlusion", "false"); settings->setDefault("generate_normalmaps", "false"); diff --git a/src/shader.cpp b/src/shader.cpp index 917d878bb..a2473ffbf 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -764,6 +764,9 @@ ShaderInfo generate_shader(std::string name, u8 material_type, u8 drawtype, else shaders_header += "0\n"; + if (g_settings->getBool("tone_mapping")) + shaders_header += "#define ENABLE_TONE_MAPPING\n"; + if(pixel_program != "") pixel_program = shaders_header + pixel_program; if(vertex_program != "") |