diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-09-28 20:04:40 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-09-28 20:04:40 +0200 |
commit | fbe611e45eebe48e2fdf4065fc70acad1cca2e0e (patch) | |
tree | 8d9286be24ac2122a5f11ce4d014c5ab54c04abd /core | |
parent | b25f1f9c79dafb57577a5e93851efe58e6b6c3ea (diff) | |
parent | e705aa4550b433461f670868342b757b864d1013 (diff) | |
download | redot-engine-fbe611e45eebe48e2fdf4065fc70acad1cca2e0e.tar.gz |
Merge pull request #82482 from Rindbee/fix-bugs-in-bvh
Fix not refitting upward from leaf nodes
Diffstat (limited to 'core')
-rw-r--r-- | core/math/bvh_refit.inc | 2 | ||||
-rw-r--r-- | core/math/bvh_structs.inc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/math/bvh_refit.inc b/core/math/bvh_refit.inc index 717a3438c7..b20b805bb0 100644 --- a/core/math/bvh_refit.inc +++ b/core/math/bvh_refit.inc @@ -134,7 +134,7 @@ void refit_branch(uint32_t p_node_id) { TLeaf &leaf = _node_get_leaf(tnode); if (leaf.is_dirty()) { leaf.set_dirty(false); - refit_upward(p_node_id); + refit_upward(rp.node_id); } } } // while more nodes to pop diff --git a/core/math/bvh_structs.inc b/core/math/bvh_structs.inc index 06f6e5d05d..d40c631ce2 100644 --- a/core/math/bvh_structs.inc +++ b/core/math/bvh_structs.inc @@ -83,7 +83,7 @@ public: void clear() { num_items = 0; - set_dirty(true); + set_dirty(false); } bool is_full() const { return num_items >= MAX_ITEMS; } |