summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-14 16:27:38 +0100
committerGitHub <noreply@github.com>2017-12-14 16:27:38 +0100
commitb872439eefb7d54a572ace3a57fea01787c46952 (patch)
tree3730309d2daf7997158a2fcd7bbc777bc5e58cf8
parentccea45e4fd7f2fa23584e2ab3fe42a228781795f (diff)
parentdea5ba3991a5b4bdb6e8433a43a39136b57a9851 (diff)
Merge pull request #14657 from Valentactive/fix_compiling_new_lightmapper
fix for compiling the new lightmapper
-rw-r--r--scene/3d/baked_lightmap.cpp2
-rw-r--r--scene/3d/voxel_light_baker.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp
index 6fdfec38a8..8af8c2f7da 100644
--- a/scene/3d/baked_lightmap.cpp
+++ b/scene/3d/baked_lightmap.cpp
@@ -254,7 +254,7 @@ bool BakedLightmap::_bake_time(void *ud, float p_secs, float p_progress) {
if (time - btd->last_step > 1000000) {
int mins_left = p_secs / 60;
- int secs_left = Math::fmod(p_secs, 60.0);
+ int secs_left = Math::fmod(p_secs, 60.0f);
int percent = p_progress * 100;
bool abort = bake_step_function(btd->pass + percent, btd->text + " " + itos(percent) + "% (Time Left: " + itos(mins_left) + ":" + itos(secs_left) + "s)");
btd->last_step = time;
diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp
index e684343612..98dc1590d8 100644
--- a/scene/3d/voxel_light_baker.cpp
+++ b/scene/3d/voxel_light_baker.cpp
@@ -1029,7 +1029,7 @@ void VoxelLightBaker::plot_light_spot(const Vector3 &p_pos, const Vector3 &p_axi
continue; // too far away
}
- float att = Math::pow(1.0 - angle / p_spot_angle, p_spot_attenuation);
+ float att = Math::pow(1.0f - angle / p_spot_angle, p_spot_attenuation);
{
float d = light_pos.distance_to(to);
@@ -1638,9 +1638,9 @@ Vector3 VoxelLightBaker::_compute_ray_trace_at_pos(const Vector3 &p_pos, const V
for (int i = 0; i < samples; i++) {
- float random_angle1 = (((rand() % 65535) / 65535.0) * 2.0 - 1.0) * spread;
+ float random_angle1 = (((Math::rand() % 65535) / 65535.0) * 2.0 - 1.0) * spread;
Vector3 axis(0, sin(random_angle1), cos(random_angle1));
- float random_angle2 = ((rand() % 65535) / 65535.0) * Math_PI * 2.0;
+ float random_angle2 = ((Math::rand() % 65535) / 65535.0) * Math_PI * 2.0;
Basis rot(Vector3(0, 0, 1), random_angle2);
axis = rot.xform(axis);