Skip to content

Commit 2da74e2

Browse files
committed
Removed hard-coded traversal cost
1 parent 8207dff commit 2da74e2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

RadeonRays/src/accelerator/bvh2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ namespace RadeonRays
456456
auto rsa = mm_select(
457457
aabb_surface_area(right_min[i], right_max[i]), 0);
458458

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

461461
if (s < sah)
462462
{

RadeonRays/src/accelerator/bvh2.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ namespace RadeonRays
7171
// Threshold number of primitives to disable SAH split
7272
kMinSAHPrimitives = 32u,
7373
// Maximum stack size for non-parallel builds
74-
kStackSize = 1024u,
75-
// Traversal vs intersection cost ratio
76-
kTraversalCost = 10u
74+
kStackSize = 1024u
7775
};
7876

7977
// Enum for node type

0 commit comments

Comments
 (0)