Open 3D Engine Atom Gem API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Classes | Public Member Functions | Protected Member Functions | Friends | List of all members
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 Handler.

Inherited by AZ::Render::CapsuleLightFeatureProcessorInterface, AZ::Render::CubeMapCaptureFeatureProcessorInterface, AZ::Render::DecalFeatureProcessorInterface, AZ::Render::DiffuseGlobalIlluminationFeatureProcessorInterface, AZ::Render::DiffuseProbeGridFeatureProcessorInterface, 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::ReflectionProbeFeatureProcessorInterface, AZ::Render::RenderDebugFeatureProcessorInterface, AZ::Render::SimplePointLightFeatureProcessorInterface, AZ::Render::SimpleSpotLightFeatureProcessorInterface, AZ::Render::SkinnedMeshFeatureProcessorInterface, AZ::Render::SkyBoxFeatureProcessorInterface, AZ::Render::SMAAFeatureProcessorInterface, AZ::Render::TransformServiceFeatureProcessorInterface, and AZ::RPI::AuxGeomFeatureProcessorInterface.

Classes

struct  PrepareViewsPacket
 
struct  RenderPacket
 
struct  SimulatePacket
 

Public Member Functions

 AZ_RTTI (FeatureProcessor, "{B8027170-C65C-4237-964D-B557FC9D7575}")
 
 AZ_CLASS_ALLOCATOR (FeatureProcessor, AZ::SystemAllocator, 0)
 
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 *)
 Apply changes and add additional render passes to the render pipeline from the feature processors.
 
virtual void PrepareViews (const PrepareViewsPacket &, AZStd::vector< AZStd::pair< PipelineViewTag, ViewPtr >> &)
 
virtual void Simulate (const SimulatePacket &)
 
virtual void Render (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

◆ 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.

◆ 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()

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

The feature processor should enqueue draw packets to relevant draw lists.

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

◆ 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.

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