Skip to content

Commit

Permalink
Merge pull request #82482 from Rindbee/fix-bugs-in-bvh
Browse files Browse the repository at this point in the history
Fix not refitting upward from leaf nodes
  • Loading branch information
YuriSizov committed Sep 28, 2023
2 parents b25f1f9 + e705aa4 commit fbe611e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/math/bvh_refit.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/math/bvh_structs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down

0 comments on commit fbe611e

Please sign in to comment.