Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RPI::FeatureProcessor Class Reference

Interface that FeatureProcessors should derive from @detail FeatureProcceors will record simulation state from the simulation job graph into a buffer that is isolated from the asynchronous rendering graph. Simulate() is called from the simulation graph preparing and publishing data for use by the asynchronous rendering execution graph. Render() is called from the render graph, converting state data to GPU/rendering state and submitting to the pipeline coordinator. Feature processors will contain or derive from listeners with a data buffers as needed to minimize contention. FeatureProcesors will collate the data from the listeners into a data packet/feature for submission to the render pipeline coordinator. More...

#include <FeatureProcessor.h>

Inherits SceneNotificationBus::Handler.

Inherited by AZ::RPI::AuxGeomFeatureProcessorInterface, AZ::Render::CapsuleLightFeatureProcessorInterface, AZ::Render::CubeMapCaptureFeatureProcessorInterface, AZ::Render::DecalFeatureProcessorInterface, AZ::Render::DirectionalLightFeatureProcessorInterface, AZ::Render::DiskLightFeatureProcessorInterface, AZ::Render::DisplayMapperFeatureProcessorInterface, AZ::Render::ImageBasedLightFeatureProcessorInterface, AZ::Render::MeshFeatureProcessorInterface, AZ::Render::OcclusionCullingPlaneFeatureProcessorInterface, AZ::Render::PointLightFeatureProcessorInterface, AZ::Render::PolygonLightFeatureProcessorInterface, AZ::Render::PostProcessFeatureProcessorInterface, AZ::Render::ProjectedShadowFeatureProcessorInterface, AZ::Render::QuadLightFeatureProcessorInterface, AZ::Render::RayTracingFeatureProcessor, AZ::Render::ReflectionProbeFeatureProcessorInterface, AZ::Render::RenderDebugFeatureProcessorInterface, AZ::Render::SMAAFeatureProcessorInterface, AZ::Render::SimplePointLightFeatureProcessorInterface, AZ::Render::SimpleSpotLightFeatureProcessorInterface, AZ::Render::SkinnedMeshFeatureProcessorInterface, AZ::Render::SkyAtmosphereFeatureProcessorInterface, AZ::Render::SkyBoxFeatureProcessorInterface, AZ::Render::SpecularReflectionsFeatureProcessorInterface, AZ::Render::SplashScreenFeatureProcessor, and AZ::Render::TransformServiceFeatureProcessorInterface.

Classes

struct  PrepareViewsPacket
 
struct  RenderPacket
 
struct  SimulatePacket
 

Public Member Functions

 AZ_RTTI (FeatureProcessor, "{B8027170-C65C-4237-964D-B557FC9D7575}")
 
 AZ_CLASS_ALLOCATOR (FeatureProcessor, AZ::SystemAllocator)
 
SceneGetParentScene () const
 
virtual void Activate ()
 Perform any necessary activation and gives access to owning Scene.
 
virtual void Deactivate ()
 Perform any necessary deactivation.
 
virtual void ApplyRenderPipelineChange (RenderPipeline *pipeline)
 
virtual void AddRenderPasses (RenderPipeline *pipeline)
 
virtual void PrepareViews (const PrepareViewsPacket &, AZStd::vector< AZStd::pair< PipelineViewTag, ViewPtr > > &)
 
virtual void Simulate (const SimulatePacket &)
 
virtual void Render (const RenderPacket &)
 
virtual void OnEndCulling (const RenderPacket &)
 
virtual void OnRenderEnd ()
 

Protected Member Functions

void EnableSceneNotification ()
 
void DisableSceneNotification ()
 

Friends

class Scene
 

Detailed Description

Interface that FeatureProcessors should derive from @detail FeatureProcceors will record simulation state from the simulation job graph into a buffer that is isolated from the asynchronous rendering graph. Simulate() is called from the simulation graph preparing and publishing data for use by the asynchronous rendering execution graph. Render() is called from the render graph, converting state data to GPU/rendering state and submitting to the pipeline coordinator. Feature processors will contain or derive from listeners with a data buffers as needed to minimize contention. FeatureProcesors will collate the data from the listeners into a data packet/feature for submission to the render pipeline coordinator.

It is recommended that each feature processor maintain a data buffer that is buffered N times for the data that is expected to be delivered via an Ebus.

Member Function Documentation

◆ Activate()

◆ AddRenderPasses()

virtual void AZ::RPI::FeatureProcessor::AddRenderPasses ( RenderPipeline pipeline)
inlinevirtual

Add additional render passes to the render pipeline before it's finalized The render pipeline must have m_allowModification set to true (see Scene::TryApplyRenderPipelineChanges() function) This function is called when the render pipeline is added or rebuilt

Reimplemented in AZ::Render::SkyAtmosphereFeatureProcessor.

◆ ApplyRenderPipelineChange()

virtual void AZ::RPI::FeatureProcessor::ApplyRenderPipelineChange ( RenderPipeline pipeline)
inlinevirtual

O3DE_DEPRECATION_NOTICE(GHI-12687)

Deprecated:
use AddRenderPasses(RenderPipeline*) Apply changes and add additional render passes to the render pipeline from the feature processors

◆ Deactivate()

◆ OnEndCulling()

virtual void AZ::RPI::FeatureProcessor::OnEndCulling ( const RenderPacket )
inlinevirtual

Notifies when culling is finished, but draw lists have not been finalized or sorted If a feature processor uses visibility lists instead of letting the culling system submit draw items it should access the visibility lists here

Reimplemented in AZ::Render::MeshFeatureProcessor.

◆ OnRenderEnd()

virtual void AZ::RPI::FeatureProcessor::OnRenderEnd ( )
inlinevirtual

The feature processor may do clean up when the current render frame is finished

  • This is called every RPI::RenderTick.

Reimplemented in AZ::Render::AuxGeomFeatureProcessor, AZ::Render::CubeMapCaptureFeatureProcessor, AZ::Render::ReflectionProbeFeatureProcessor, and AZ::Render::SkinnedMeshFeatureProcessor.

◆ PrepareViews()

virtual void AZ::RPI::FeatureProcessor::PrepareViews ( const PrepareViewsPacket ,
AZStd::vector< AZStd::pair< PipelineViewTag, ViewPtr > > &   
)
inlinevirtual

Allows the feature processor to expose supporting views based on the main views passed in. Main views (persistent views) are views that must be rendered and impacts the presentation of the application. Support views (transient views) are views that must be rendered only to correctly render the main views. This function is called per frame and it happens on main thread. Support views should be added to outViews with their associated pipeline view tags.

◆ Render()

◆ Simulate()

virtual void AZ::RPI::FeatureProcessor::Simulate ( const SimulatePacket )
inlinevirtual

The feature processor should perform any internal simulation at this point - For instance, updating a particle system or animation. Not every feature processor will need to implement this.

  • This may not be called every frame.
  • This may be called in parallel with other feature processors.

Reimplemented in AZ::Render::RenderDebugFeatureProcessor, AZ::Render::DecalTextureArrayFeatureProcessor, AZ::Render::CapsuleLightFeatureProcessor, AZ::Render::DirectionalLightFeatureProcessor, AZ::Render::DiskLightFeatureProcessor, AZ::Render::PointLightFeatureProcessor, AZ::Render::PolygonLightFeatureProcessor, AZ::Render::QuadLightFeatureProcessor, AZ::Render::SimplePointLightFeatureProcessor, AZ::Render::SimpleSpotLightFeatureProcessor, AZ::Render::SMAAFeatureProcessor, and AZ::Render::ProjectedShadowFeatureProcessor.


The documentation for this class was generated from the following file: