Skip to content

Commit

Permalink
Removed hard-coded traversal cost
Browse files Browse the repository at this point in the history
  • Loading branch information
gboisse committed Jan 19, 2018
1 parent 8207dff commit 2da74e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RadeonRays/src/accelerator/bvh2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ namespace RadeonRays
auto rsa = mm_select(
aabb_surface_area(right_min[i], right_max[i]), 0);

auto s = static_cast<float>(kTraversalCost) + (lc * lsa + rc * rsa) * area_inv;
auto s = m_traversal_cost + (lc * lsa + rc * rsa) * area_inv;

if (s < sah)
{
Expand Down
4 changes: 1 addition & 3 deletions RadeonRays/src/accelerator/bvh2.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ namespace RadeonRays
// Threshold number of primitives to disable SAH split
kMinSAHPrimitives = 32u,
// Maximum stack size for non-parallel builds
kStackSize = 1024u,
// Traversal vs intersection cost ratio
kTraversalCost = 10u
kStackSize = 1024u
};

// Enum for node type
Expand Down

0 comments on commit 2da74e2

Please sign in to comment.