diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-12-19 17:09:05 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-12-19 17:09:05 -0300 |
commit | 06dd10b3905a7d48beffe0523b785d513747f511 (patch) | |
tree | 54e255db20358f4a61cb44a09a6ef7b22139d165 | |
parent | bf47b15e2c8a36dbf2c229156623f72830857591 (diff) |
Fix raytrace lightmap bake bias
-rw-r--r-- | scene/3d/voxel_light_baker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp index 7903d362ae..edb9b9efd6 100644 --- a/scene/3d/voxel_light_baker.cpp +++ b/scene/3d/voxel_light_baker.cpp @@ -1687,10 +1687,10 @@ Vector3 VoxelLightBaker::_compute_ray_trace_at_pos(const Vector3 &p_pos, const V Vector3 direction = normal_xform.xform(axis).normalized(); - Vector3 pos = p_pos + Vector3(0.5, 0.5, 0.5) + direction * bias; - Vector3 advance = direction * _get_normal_advance(direction); + Vector3 pos = p_pos /*+ Vector3(0.5, 0.5, 0.5)*/ + advance * bias; + uint32_t cell = CHILD_EMPTY; while (cell == CHILD_EMPTY) { |