aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-05-31 20:22:37 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-05-31 20:22:37 +0300
commit74aa598769b7d6b34af8a3c022ff9b3b79a293eb (patch)
tree2b2a66ca0274b6711951be6692c7e06d1377038f /src
parent747ff7daf875652be1063fa49316125977b0ba79 (diff)
downloadminetest-74aa598769b7d6b34af8a3c022ff9b3b79a293eb.tar.gz
minetest-74aa598769b7d6b34af8a3c022ff9b3b79a293eb.tar.bz2
minetest-74aa598769b7d6b34af8a3c022ff9b3b79a293eb.zip
Fix MSVC build (pow type overload stuff)
Diffstat (limited to 'src')
-rw-r--r--src/mapblock_mesh.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index 658ffe5ee..b5962501c 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -278,9 +278,9 @@ static u8 getSmoothLight(enum LightBank bank, v3s16 p, MeshMakeData *data)
//light = (float)light / ((float)ambient_occlusion * 0.5 + 1.0);
float light_amount = (8 - ambient_occlusion) / 4.0;
float light_f = (float)light / 255.0;
- light_f = pow(light_f, 2.2); // gamma -> linear space
+ light_f = pow(light_f, 2.2f); // gamma -> linear space
light_f = light_f * light_amount;
- light_f = pow(light_f, 1.0/2.2); // linear -> gamma space
+ light_f = pow(light_f, 1.0f/2.2f); // linear -> gamma space
if(light_f > 1.0)
light_f = 1.0;
light = 255.0 * light_f + 0.5;