summaryrefslogtreecommitdiffstats
path: root/scene
diff options
context:
space:
mode:
authorKyle Appelgate <grenappels@gmail.com>2023-10-17 08:56:35 -0400
committerRémi Verschelde <rverschelde@gmail.com>2024-09-16 16:32:22 +0200
commit2df506ea15891a4b2299dd734c98257e19df5b0a (patch)
tree07fe223ae9ee307de913a38f14ad2b1d28f60ba1 /scene
parent13d522791122a3c8c415884b3e087843ad04cc65 (diff)
downloadredot-engine-2df506ea15891a4b2299dd734c98257e19df5b0a.tar.gz
fix to ensure generated light probes do not get placed too close to manual light probes
(cherry picked from commit 97205ea5b8126c4f1f613288d7bd366e6155eeee)
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/lightmap_gi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp
index 038a78609f..bf928580e4 100644
--- a/scene/3d/lightmap_gi.cpp
+++ b/scene/3d/lightmap_gi.cpp
@@ -709,7 +709,7 @@ void LightmapGI::_gen_new_positions_from_octree(const GenProbesOctree *p_cell, f
const Vector3 *pp = probe_positions.ptr();
bool exists = false;
for (int j = 0; j < ppcount; j++) {
- if (pp[j].is_equal_approx(real_pos)) {
+ if (pp[j].distance_to(real_pos) < (p_cell_size * 0.5f)) {
exists = true;
break;
}