Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbikker committed Dec 30, 2024
1 parent 881f78a commit 0cb48d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tiny_bvh.h
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ void BVH::Build( const bvhvec4slice& vertices, const uint32_t* indices, uint32_t
}
void BVH::PrepareBuild( const bvhvec4slice& vertices, const uint32_t* indices, const uint32_t prims )
{
uint32_t primCount = prims > 0 ? prims : vertices.count;
uint32_t primCount = prims > 0 ? prims : vertices.count / 3;
const uint32_t spaceNeeded = primCount * 2; // upper limit
// allocate memory on first build
if (allocatedNodes < spaceNeeded)
Expand Down

0 comments on commit 0cb48d3

Please sign in to comment.