Fix MSVC build (pow type overload stuff)
authorPerttu Ahola <celeron55@gmail.com>
Thu, 31 May 2012 17:22:37 +0000 (20:22 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Thu, 31 May 2012 17:22:37 +0000 (20:22 +0300)
src/mapblock_mesh.cpp

index 658ffe5eea31fae855a9020e4c41b6880fb3e513..b5962501c988b7c09d1f03794deb9290ebddcf99 100644 (file)
@@ -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;