Skip to content

Commit

Permalink
Fixed C_INT and C_TRAV.
Browse files Browse the repository at this point in the history
This was a leftover from changing the hard defines to variables in BVHBase; now fixed.
  • Loading branch information
jbikker authored Feb 28, 2025
1 parent 4a30313 commit 21f131d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tiny_bvh.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ THE SOFTWARE.
// These are defaults, which initialize the public members c_int and c_trav in
// BVHBase (and thus each BVH instance).
#ifndef C_INT
#define C_INT_ 1
#define C_INT 1
#endif
#ifndef C_TRAV
#define C_TRAV_ 1
#define C_TRAV 1
#endif

// SBVH: "Unsplitting"
Expand Down Expand Up @@ -663,8 +663,8 @@ class BVHBase
uint32_t usedNodes = 0; // number of nodes used for the BVH.
uint32_t triCount = 0; // number of primitives in the BVH.
uint32_t idxCount = 0; // number of primitive indices; can exceed triCount for SBVH.
float c_trav = C_TRAV_; // cost of a traversal step, used to steer SAH construction.
float c_int = C_INT_; // cost of a primitive intersection, used to steer SAH construction.
float c_trav = C_TRAV; // cost of a traversal step, used to steer SAH construction.
float c_int = C_INT; // cost of a primitive intersection, used to steer SAH construction.
bvhvec3 aabbMin, aabbMax; // bounds of the root node of the BVH.
// Custom memory allocation
void* AlignedAlloc( size_t size );
Expand Down Expand Up @@ -7924,4 +7924,4 @@ void BVH_Verbose::MergeSubtree( const uint32_t nodeIdx, uint32_t* newIdx, uint32
#pragma GCC diagnostic pop
#endif

#endif // TINYBVH_IMPLEMENTATION
#endif // TINYBVH_IMPLEMENTATION

0 comments on commit 21f131d

Please sign in to comment.