in Gems/Umbra/Code/Source/UmbraSceneComponent/UmbraSceneComponentController.cpp [516:530]
AzFramework::OcclusionState UmbraSceneComponentController::UmbraOcclusionView::GetEntityVisibility(const AZ::EntityId& entityId) const
{
AZ_Assert(m_controller.IsSceneReady(), "Umbra scene component controller and assets must be valid and ready before query.");
AZ_Assert(m_query, "Umbra query object must be valid before query.");
AZ_Assert(m_objectIndexList, "Umbra object index list must be valid before query.");
// If the occlusion data or query are not ready or the entity ID is not correspond to one that was recorded with the scene then assume it is not occluded.
if (!m_controller.IsSceneReady() || !m_query || !m_objectIndexList || !entityId.IsValid() || !m_controller.m_storedEntityIds.contains(entityId))
{
return AzFramework::OcclusionState::Unknown;
}
// If the entity ID is part of the baked scene data and found in the visible entity ID list then it is visible.
return m_visibleEntityIds.contains(entityId) ? AzFramework::OcclusionState::Visible : AzFramework::OcclusionState::Hidden;
}