Skip to content

Commit

Permalink
Merge pull request #82512 from Rindbee/fix-axis-being-mixed-up-in-3.x
Browse files Browse the repository at this point in the history
[3.x] BVH - fix axis getting mixed up when split leaf
  • Loading branch information
akien-mga committed Oct 1, 2023
2 parents 3947c11 + ab76395 commit fe7ed98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/math/bvh_split.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u

int order[POINT::AXIS_COUNT];

order[0] = size.min_axis();
order[POINT::AXIS_COUNT - 1] = size.max_axis();
order[0] = size.max_axis();
order[POINT::AXIS_COUNT - 1] = size.min_axis();

static_assert(POINT::AXIS_COUNT <= 3, "BVH POINT::AXIS_COUNT has unexpected size");
if (POINT::AXIS_COUNT == 3) {
Expand Down

0 comments on commit fe7ed98

Please sign in to comment.