File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Gems/Atom/RPI/Code/Source/RPI.Public Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -490,6 +490,10 @@ namespace AZ
490
490
worklistData->m_sceneEntityContextId ,
491
491
[&](AzFramework::OcclusionRequestBus::Events* handler)
492
492
{
493
+ // An occlusion culling system might precompute visibility data for static objects or entities in a scene. If the
494
+ // system that implements OcclusionRequestBus supports that behavior then we want to perform an initial visibility
495
+ // test using the entity ID. This can avoid potentially more expensive dynamic tests, like those against an
496
+ // occlusion buffer.
493
497
if (visibleEntry->m_typeFlags & AzFramework::VisibilityEntry::TYPE_RPI_Cullable)
494
498
{
495
499
auto cullable = static_cast <RPI::Cullable*>(visibleEntry->m_userData );
@@ -499,6 +503,9 @@ namespace AZ
499
503
}
500
504
}
501
505
506
+ // Entries that don't meet the above criteria or return an inconclusive or partially visible state will perform a
507
+ // dynamic, bounding box visibility test. One entity can have multiple visibility entries that may need to be tested
508
+ // individually. If the entire entity is hidden, no further testing is required.
502
509
if (state != AzFramework::OcclusionState::Hidden)
503
510
{
504
511
state = handler->GetOcclusionViewAabbVisibility (viewName, visibleEntry->m_boundingVolume );
You can’t perform that action at this time.
0 commit comments