Skip to content

Commit

Permalink
LG debug
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <lg@larrygritz.com>
  • Loading branch information
lgritz committed Sep 19, 2024
1 parent 8b284f2 commit 8f4e4bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/testrender/bvh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ build_bvh(OIIO::cspan<Vec3> verts, OIIO::cspan<TriangleIndices> triangles,
float center = bbox.center()[bestAxis];
int binID = (int)((center - current.centroid.min[bestAxis])
* binFactor[bestAxis]);
if (!(binID >= 0 && binID < NumBins)) {
print("binID {} NumBins {} i={}\n", binID, NumBins, i);
}
OSL_ASSERT(binID >= 0 && binID < NumBins);
if (binID <= bestBin) {
boundsL.extendBy(bbox);
Expand Down

0 comments on commit 8f4e4bc

Please sign in to comment.