diff options
| author | Michele Valente | 2017-12-14 15:32:53 +0100 |
|---|---|---|
| committer | Michele Valente | 2017-12-14 15:32:53 +0100 |
| commit | dea5ba3991a5b4bdb6e8433a43a39136b57a9851 (patch) | |
| tree | 751f91da0967b8aca715354dfb3b72e272f9f22a /scene/3d/voxel_light_baker.cpp | |
| parent | f3ad14224e27f2a25196575e3c43ebc792c90894 (diff) | |
| download | godot-dea5ba3991a5b4bdb6e8433a43a39136b57a9851.tar.gz godot-dea5ba3991a5b4bdb6e8433a43a39136b57a9851.tar.zst godot-dea5ba3991a5b4bdb6e8433a43a39136b57a9851.zip | |
fix for compiling the new lightmapper
also changed two calls that were ambiguous
Diffstat (limited to 'scene/3d/voxel_light_baker.cpp')
| -rw-r--r-- | scene/3d/voxel_light_baker.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp index e68434361..98dc1590d 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); |
