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

This feature processor manages Deferred DrawPackages for a Scene. More...

#include <DeferredMaterialFeatureProcessor.h>

Inherits AZ::Render::DeferredMaterialFeatureProcessorInterface.

Public Types

using ModelId = DeferredMaterialFeatureProcessorInterface::ModelId
 
using MaterialTypeShaderId = AZStd::pair< int32_t, RPI::ShaderVariantId >
 
- Public Types inherited from AZ::Render::DeferredMaterialFeatureProcessorInterface
using ModelId = AZ::Uuid
 

Public Member Functions

 AZ_RTTI (AZ::Render::DeferredMaterialFeatureProcessor, "{9CA50AFC-206B-4F8A-80E8-2592CF1244B0}", AZ::Render::DeferredMaterialFeatureProcessorInterface)
 
void AddModel (const ModelId &uuid, ModelDataInstanceInterface *meshHandle, const Data::Instance< RPI::Model > &model) override
 Create a deferred draw-item for the referenced material types, if they don't exist yet.
 
void RemoveModel (const ModelId &uuid) override
 Removes a mesh and potentially the draw-item for the material type.
 
AZ::Data::Instance< AZ::RPI::BufferGetDrawPacketIdBuffer (const RHI::DrawListTag &drawListTag) override
 
bool IsEnabled () override
 Wheter Deferred rendering was enabled at startup, controlled by CVAR r_deferredRenderingEnabled.
 
void Activate () override
 Perform any necessary activation and gives access to owning Scene.
 
void Deactivate () override
 Perform any necessary deactivation.
 
void Render (const RenderPacket &) override
 
void OnRenderPipelineChanged (RPI::RenderPipeline *renderPipeline, RPI::SceneNotification::RenderPipelineChangeType changeType) override
 
- Public Member Functions inherited from AZ::Render::DeferredMaterialFeatureProcessorInterface
 AZ_RTTI (AZ::Render::DeferredMaterialFeatureProcessorInterface, "{27B1C9E5-99D9-4DEC-AE66-5F0131B20BE3}", RPI::FeatureProcessor)
 
- Public Member Functions inherited from AZ::RPI::FeatureProcessor
 AZ_RTTI (FeatureProcessor, "{B8027170-C65C-4237-964D-B557FC9D7575}")
 
 AZ_CLASS_ALLOCATOR (FeatureProcessor, AZ::SystemAllocator)
 
SceneGetParentScene () const
 
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 OnEndCulling (const RenderPacket &)
 
virtual void OnRenderEnd ()
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Friends

class MeshIterator
 

Additional Inherited Members

- Protected Member Functions inherited from AZ::RPI::FeatureProcessor
void EnableSceneNotification ()
 
void DisableSceneNotification ()
 

Detailed Description

This feature processor manages Deferred DrawPackages for a Scene.

Member Function Documentation

◆ Activate()

void AZ::Render::DeferredMaterialFeatureProcessor::Activate ( )
overridevirtual

Perform any necessary activation and gives access to owning Scene.

Reimplemented from AZ::RPI::FeatureProcessor.

◆ AddModel()

void AZ::Render::DeferredMaterialFeatureProcessor::AddModel ( const ModelId &  uuid,
ModelDataInstanceInterface meshHandle,
const Data::Instance< RPI::Model > &  model 
)
overridevirtual

Create a deferred draw-item for the referenced material types, if they don't exist yet.

Implements AZ::Render::DeferredMaterialFeatureProcessorInterface.

◆ Deactivate()

void AZ::Render::DeferredMaterialFeatureProcessor::Deactivate ( )
overridevirtual

Perform any necessary deactivation.

Reimplemented from AZ::RPI::FeatureProcessor.

◆ GetDrawPacketIdBuffer()

AZ::Data::Instance< AZ::RPI::Buffer > AZ::Render::DeferredMaterialFeatureProcessor::GetDrawPacketIdBuffer ( const RHI::DrawListTag drawListTag)
overridevirtual

A buffer with the DrawPacketId for the given deferred DrawListTag. This buffer contains one entry for every mesh in the scene, with the id of the deferred fullscreen-DrawItem that is responsible for that mesh. The buffer is kept in sync with the MeshInfoBuffer, and can be indexed using the meshInfoIndex.

Implements AZ::Render::DeferredMaterialFeatureProcessorInterface.

◆ IsEnabled()

bool AZ::Render::DeferredMaterialFeatureProcessor::IsEnabled ( )
inlineoverridevirtual

Wheter Deferred rendering was enabled at startup, controlled by CVAR r_deferredRenderingEnabled.

Implements AZ::Render::DeferredMaterialFeatureProcessorInterface.

◆ RemoveModel()

void AZ::Render::DeferredMaterialFeatureProcessor::RemoveModel ( const ModelId &  uuid)
overridevirtual

Removes a mesh and potentially the draw-item for the material type.

Implements AZ::Render::DeferredMaterialFeatureProcessorInterface.

◆ Render()

void AZ::Render::DeferredMaterialFeatureProcessor::Render ( const RenderPacket )
overridevirtual

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.
  • This may be called in parallel with culling

Reimplemented from AZ::RPI::FeatureProcessor.


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