From bee811ae4ffa6767853233bfe32416ba2a709450 Mon Sep 17 00:00:00 2001 From: Doug McDiarmid Date: Thu, 27 May 2021 19:22:46 -0700 Subject: [PATCH] Moved Simulate to OnBeginPrepareRender. --- .../OcclusionCullingPlaneFeatureProcessor.cpp | 6 ++---- .../OcclusionCullingPlaneFeatureProcessor.h | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneFeatureProcessor.cpp index d4a1a37521..bed008a3da 100644 --- a/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneFeatureProcessor.cpp @@ -47,10 +47,8 @@ namespace AZ DisableSceneNotification(); } - void OcclusionCullingPlaneFeatureProcessor::Simulate([[maybe_unused]] const FeatureProcessor::SimulatePacket& packet) - { - AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender); - + void OcclusionCullingPlaneFeatureProcessor::OnBeginPrepareRender() + { AZStd::vector occlusionCullingPlanes; for (auto& occlusionCullingPlane : m_occlusionCullingPlanes) { diff --git a/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneFeatureProcessor.h index c54c816bfd..5319666745 100644 --- a/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneFeatureProcessor.h @@ -58,7 +58,9 @@ namespace AZ // FeatureProcessor overrides void Activate() override; void Deactivate() override; - void Simulate(const FeatureProcessor::SimulatePacket& packet) override; + + // RPI::SceneNotificationBus overrides ... + void OnBeginPrepareRender() override; // retrieve the full list of occlusion planes using OcclusionCullingPlaneVector = AZStd::vector>;