#include <ProjectedShadowFeatureProcessor.h>
Inherits AZ::Render::ProjectedShadowFeatureProcessorInterface.
Public Member Functions | |
AZ_RTTI (AZ::Render::ProjectedShadowFeatureProcessor, "{02AFA06D-8B37-4D47-91BD-849CAC7FB330}", AZ::Render::ProjectedShadowFeatureProcessorInterface) | |
void | Activate () override |
Perform any necessary activation and gives access to owning Scene. | |
void | Deactivate () override |
Perform any necessary deactivation. | |
void | Simulate (const SimulatePacket &packet) override |
void | PrepareViews (const PrepareViewsPacket &, AZStd::vector< AZStd::pair< RPI::PipelineViewTag, RPI::ViewPtr > > &) override |
void | Render (const RenderPacket &packet) override |
ShadowId | AcquireShadow () override |
Creates a new projected shadow and returns a handle that can be used to reference it later. | |
void | ReleaseShadow (ShadowId id) override |
Releases a projected shadow given its ID. | |
void | SetShadowTransform (ShadowId id, Transform transform) override |
Sets the world space transform of where the shadow is cast from. | |
void | SetNearFarPlanes (ShadowId id, float nearPlaneDistance, float farPlaneDistance) override |
Sets the near and far plane distances for the shadow. | |
void | SetAspectRatio (ShadowId id, float aspectRatio) override |
Sets the aspect ratio for the shadow. | |
void | SetFieldOfViewY (ShadowId id, float fieldOfViewYRadians) override |
Sets the field of view for the shadow in radians in the Y direction. | |
void | SetShadowmapMaxResolution (ShadowId id, ShadowmapSize size) override |
Sets the maximum resolution of the shadow map. | |
void | SetShadowBias (ShadowId id, float bias) override |
Sets the shadow bias. | |
void | SetNormalShadowBias (ShadowId id, float normalShadowBias) override |
Sets the normal shadow bias. | |
void | SetShadowFilterMethod (ShadowId id, ShadowFilterMethod method) override |
Sets the shadow filter method. | |
void | SetFilteringSampleCount (ShadowId id, uint16_t count) override |
Sets the sample count for filtering of the shadow boundary, max 64. | |
void | SetUseCachedShadows (ShadowId id, bool useCachedShadows) override |
void | SetShadowProperties (ShadowId id, const ProjectedShadowDescriptor &descriptor) override |
Sets all of the shadow properties in one call. | |
const ProjectedShadowDescriptor & | GetShadowProperties (ShadowId id) override |
Gets the current shadow properties. Useful for updating several properties at once in SetShadowProperties() without having to set every property. | |
void | SetEsmExponent (ShadowId id, float exponent) |
Public Member Functions inherited from AZ::Render::ProjectedShadowFeatureProcessorInterface | |
AZ_RTTI (AZ::Render::ProjectedShadowFeatureProcessorInterface, "{C5651D73-3448-4D76-91C0-0E636A197F63}", AZ::RPI::FeatureProcessor) | |
virtual ShadowId | AcquireShadow ()=0 |
Creates a new projected shadow and returns a handle that can be used to reference it later. | |
virtual void | ReleaseShadow (ShadowId id)=0 |
Releases a projected shadow given its ID. | |
virtual void | SetShadowTransform (ShadowId id, Transform transform)=0 |
Sets the world space transform of where the shadow is cast from. | |
virtual void | SetNearFarPlanes (ShadowId id, float nearPlaneDistance, float farPlaneDistance)=0 |
Sets the near and far plane distances for the shadow. | |
virtual void | SetAspectRatio (ShadowId id, float aspectRatio)=0 |
Sets the aspect ratio for the shadow. | |
virtual void | SetFieldOfViewY (ShadowId id, float fieldOfView)=0 |
Sets the field of view for the shadow in radians in the Y direction. | |
virtual void | SetShadowmapMaxResolution (ShadowId id, ShadowmapSize size)=0 |
Sets the maximum resolution of the shadow map. | |
virtual void | SetShadowBias (ShadowId id, float bias)=0 |
Sets the shadow bias. | |
virtual void | SetNormalShadowBias (ShadowId id, float normalShadowBias)=0 |
Sets the normal shadow bias. | |
virtual void | SetShadowFilterMethod (ShadowId id, ShadowFilterMethod method)=0 |
Sets the shadow filter method. | |
virtual void | SetFilteringSampleCount (ShadowId id, uint16_t count)=0 |
Sets the sample count for filtering of the shadow boundary, max 64. | |
virtual void | SetUseCachedShadows (ShadowId id, bool useCachedShadows)=0 |
virtual void | SetShadowProperties (ShadowId id, const ProjectedShadowDescriptor &descriptor)=0 |
Sets all of the shadow properties in one call. | |
virtual const ProjectedShadowDescriptor & | GetShadowProperties (ShadowId id)=0 |
Gets the current shadow properties. Useful for updating several properties at once in SetShadowProperties() without having to set every property. | |
Public Member Functions inherited from AZ::RPI::FeatureProcessor | |
AZ_RTTI (FeatureProcessor, "{B8027170-C65C-4237-964D-B557FC9D7575}") | |
AZ_CLASS_ALLOCATOR (FeatureProcessor, AZ::SystemAllocator) | |
Scene * | GetParentScene () 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 (ReflectContext *context) |
Additional Inherited Members | |
Public Types inherited from AZ::Render::ProjectedShadowFeatureProcessorInterface | |
using | ShadowId = RHI::Handle< uint16_t, ProjectedShadowFeatureProcessorInterface > |
Static Public Attributes inherited from AZ::Render::ProjectedShadowFeatureProcessorInterface | |
static constexpr float | MaxProjectedShadowRadians = AZ::DegToRad(150.0f) |
Protected Member Functions inherited from AZ::RPI::FeatureProcessor | |
void | EnableSceneNotification () |
void | DisableSceneNotification () |
This feature processor handles creation of shadow passes and manages shadow related data. Use AcquireShadow() to create a new shadow. The ID that is returned from AcquireShadow() corresponds to an index in the m_projectedShadows and m_projectedFilterParams buffers in the View SRG.
|
overridevirtual |
Creates a new projected shadow and returns a handle that can be used to reference it later.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Perform any necessary activation and gives access to owning Scene.
Reimplemented from AZ::RPI::FeatureProcessor.
|
overridevirtual |
Perform any necessary deactivation.
Reimplemented from AZ::RPI::FeatureProcessor.
|
overridevirtual |
Gets the current shadow properties. Useful for updating several properties at once in SetShadowProperties() without having to set every property.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Releases a projected shadow given its ID.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
The feature processor should enqueue draw packets to relevant draw lists.
Reimplemented from AZ::RPI::FeatureProcessor.
|
overridevirtual |
Sets the aspect ratio for the shadow.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Sets the field of view for the shadow in radians in the Y direction.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Sets the sample count for filtering of the shadow boundary, max 64.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Sets the near and far plane distances for the shadow.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Sets the normal shadow bias.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Sets the shadow bias.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Sets the shadow filter method.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Sets the maximum resolution of the shadow map.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Sets all of the shadow properties in one call.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Sets the world space transform of where the shadow is cast from.
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
Sets if this shadow should be rendered every frame or only when it detects a change. Changes are detected by the presence of a flag on the view which tracks if any of the draws submitted to it contained that flag. The mesh feature processor sets this flag on any cullable that moves, and it is combined with all other flags for draws submitted to each view. See MeshCommon::MeshMovedName for the name of the flag used to track movement See RPI::Scene::GetViewTagBitRegistry() for where the flag bits are determined See RPI::View::GetOrFlags() for how the bits are retrieved
Implements AZ::Render::ProjectedShadowFeatureProcessorInterface.
|
overridevirtual |
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.
Reimplemented from AZ::RPI::FeatureProcessor.