diff options
author | RealBadAngel <maciej.kasatkin@o2.pl> | 2016-01-25 13:33:22 +0100 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2016-02-09 02:55:59 -0500 |
commit | eb3840a3f88dd9902ff1c5ea50d90a7f33e08d82 (patch) | |
tree | 3248c3bc66339f2c4cadc8fbf2cfb10a12c1f238 /src | |
parent | 180893e79dd358d2f8f720b200a62daa2838e341 (diff) | |
download | minetest-eb3840a3f88dd9902ff1c5ea50d90a7f33e08d82.tar.gz minetest-eb3840a3f88dd9902ff1c5ea50d90a7f33e08d82.tar.bz2 minetest-eb3840a3f88dd9902ff1c5ea50d90a7f33e08d82.zip |
Filmic HDR tone mapping
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 != "") |