Skip to content

Commit

Permalink
#5584: We can use the world AABB to perform the front-end culling of …
Browse files Browse the repository at this point in the history
…single model nodes, it is already oriented using localAABB and local2World.
  • Loading branch information
codereader committed Nov 1, 2021
1 parent 4c2e733 commit 5b29f12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions radiantcore/model/StaticModelNode.cpp
Expand Up @@ -97,9 +97,9 @@ void StaticModelNode::renderSolid(RenderableCollector& collector, const VolumeTe

const Matrix4& l2w = localToWorld();

// Test the model's intersection volume, if it intersects pass on the
// render call
if (volume.TestAABB(_model->localAABB(), l2w) != VOLUME_OUTSIDE)
// The space partitioning system will consider this node also if the cell is only partially visible
// Do a quick bounds check against the world AABB to cull ourselves if we're not in the view
if (volume.TestAABB(worldAABB()) != VOLUME_OUTSIDE)
{
// Submit the model's geometry
_model->renderSolid(collector, l2w, *_renderEntity, *this);
Expand Down

0 comments on commit 5b29f12

Please sign in to comment.