Skip to content

Commit

Permalink
Force majorant grid to have at least size (1,1,1)
Browse files Browse the repository at this point in the history
  • Loading branch information
szellmann committed Nov 26, 2024
1 parent b27cc3f commit 5f9a488
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scene/volume/spatial_field/BlockStructuredField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ void BlockStructuredField::buildGrid()
#ifdef WITH_CUDA
box3f worldBounds = {bounds().min,bounds().max};
int3 dims{(worldBounds.max-worldBounds.min)/float3(8.f)};
dims = max(int3(1),dims);
m_gridAccel.init(dims, worldBounds);

dco::GridAccel &vaccel = m_gridAccel.visionarayAccel();
Expand All @@ -199,6 +200,7 @@ void BlockStructuredField::buildGrid()
#else
box3f worldBounds = {bounds().min,bounds().max};
int3 dims{(worldBounds.max-worldBounds.min)/float3(8.f)};
dims = max(int3(1),dims);
m_gridAccel.init(dims, worldBounds);

dco::GridAccel &vaccel = m_gridAccel.visionarayAccel();
Expand Down

0 comments on commit 5f9a488

Please sign in to comment.