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::Render::RayTracingFeatureProcessor Class Reference

This feature processor manages ray tracing data for a Scene. More...

#include <RayTracingFeatureProcessor.h>

Inherits AZ::RPI::FeatureProcessor.

Classes

struct  Mesh
 Contains data for the top level mesh, including the list of sub-meshes. More...
 
struct  MeshBlasInstance
 
struct  SubMesh
 Contains data for a single subMesh. More...
 
struct  SubMeshBlasInstance
 

Public Types

using SubMeshVector = AZStd::vector< SubMesh >
 
using IndexVector = AZStd::vector< uint32_t >
 
using BlasInstanceMap = AZStd::unordered_map< AZ::Data::AssetId, MeshBlasInstance >
 

Public Member Functions

 AZ_RTTI (AZ::Render::RayTracingFeatureProcessor, "{5017EFD3-A996-44B0-9ED2-C47609A2EE8D}", AZ::RPI::FeatureProcessor)
 
void Activate () override
 Perform any necessary activation and gives access to owning Scene.
 
void Deactivate () override
 Perform any necessary deactivation.
 
void OnRenderPipelineChanged (RPI::RenderPipeline *renderPipeline, RPI::SceneNotification::RenderPipelineChangeType changeType) override
 
void AddMesh (const AZ::Uuid &uuid, const Mesh &rayTracingMesh, const SubMeshVector &subMeshes)
 
void RemoveMesh (const AZ::Uuid &uuid)
 
void SetMeshTransform (const AZ::Uuid &uuid, const AZ::Transform transform, const AZ::Vector3 nonUniformScale)
 
void SetMeshReflectionProbe (const AZ::Uuid &uuid, const Mesh::ReflectionProbe &reflectionProbe)
 Sets the reflection probe for a mesh.
 
const SubMeshVector & GetSubMeshes () const
 Retrieves the map of all subMeshes in the scene.
 
SubMeshVector & GetSubMeshes ()
 
Data::Instance< RPI::ShaderResourceGroupGetRayTracingSceneSrg () const
 Retrieves the RayTracingSceneSrg.
 
Data::Instance< RPI::ShaderResourceGroupGetRayTracingMaterialSrg () const
 Retrieves the RayTracingMaterialSrg.
 
const RHI::Ptr< RHI::RayTracingTlas > & GetTlas () const
 Retrieves the RayTracingTlas.
 
RHI::Ptr< RHI::RayTracingTlas > & GetTlas ()
 
uint32_t GetRevision () const
 
RHI::RayTracingBufferPoolsGetBufferPools ()
 Retrieves the buffer pools used for ray tracing operations.
 
uint32_t GetSubMeshCount () const
 Retrieves the total number of ray tracing meshes.
 
RHI::AttachmentId GetTlasAttachmentId () const
 Retrieves the attachmentId of the Tlas for this scene.
 
const Data::Instance< RPI::BufferGetMeshInfoGpuBuffer () const
 Retrieves the GPU buffer containing information for all ray tracing meshes.
 
const Data::Instance< RPI::BufferGetMaterialInfoGpuBuffer () const
 Retrieves the GPU buffer containing information for all ray tracing materials.
 
void UpdateRayTracingSrgs ()
 Updates the RayTracingSceneSrg and RayTracingMaterialSrg, called after the TLAS is allocated in the RayTracingAccelerationStructurePass.
 
BlasInstanceMap & GetBlasInstances ()
 
- 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 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 ()
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Additional Inherited Members

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

Detailed Description

This feature processor manages ray tracing data for a Scene.

Member Function Documentation

◆ Activate()

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

Perform any necessary activation and gives access to owning Scene.

Reimplemented from AZ::RPI::FeatureProcessor.

◆ AddMesh()

void AZ::Render::RayTracingFeatureProcessor::AddMesh ( const AZ::Uuid &  uuid,
const Mesh rayTracingMesh,
const SubMeshVector &  subMeshes 
)

Adds ray tracing data for a mesh. This will cause an update to the RayTracing acceleration structure on the next frame

◆ Deactivate()

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

Perform any necessary deactivation.

Reimplemented from AZ::RPI::FeatureProcessor.

◆ GetRevision()

uint32_t AZ::Render::RayTracingFeatureProcessor::GetRevision ( ) const
inline

Retrieves the revision number of the ray tracing data. This is used to determine if the RayTracingShaderTable needs to be rebuilt.

◆ RemoveMesh()

void AZ::Render::RayTracingFeatureProcessor::RemoveMesh ( const AZ::Uuid &  uuid)

Removes ray tracing data for a mesh. This will cause an update to the RayTracing acceleration structure on the next frame

◆ SetMeshTransform()

void AZ::Render::RayTracingFeatureProcessor::SetMeshTransform ( const AZ::Uuid &  uuid,
const AZ::Transform  transform,
const AZ::Vector3  nonUniformScale 
)

Sets the ray tracing mesh transform This will cause an update to the RayTracing acceleration structure on the next frame


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