#include <DirectionalLightFeatureProcessorInterface.h>
Inherits AZ::RPI::FeatureProcessor.
Inherited by AZ::Render::DirectionalLightFeatureProcessor.
Public Types | |
enum | DebugDrawFlags : uint32_t { DebugDrawNone = 0b000 , DebugDrawColoring = 0b001 , DebugDrawBoundingBoxes = 0b010 , DebugDrawAll = ~DebugDrawNone } |
using | LightHandle = RHI::Handle< uint16_t, class DirectionalLight > |
Public Member Functions | |
AZ_RTTI (AZ::Render::DirectionalLightFeatureProcessorInterface, "82C274F8-C635-4725-9ECB-0D7FA0DC0C6C", AZ::RPI::FeatureProcessor) | |
virtual LightHandle | AcquireLight ()=0 |
virtual bool | ReleaseLight (LightHandle &lightHandle)=0 |
virtual LightHandle | CloneLight (LightHandle lightHandle)=0 |
virtual void | SetRgbIntensity (LightHandle handle, const PhotometricColor< PhotometricUnit::Lux > &lightColor)=0 |
virtual void | SetDirection (LightHandle handle, const Vector3 &direction)=0 |
virtual void | SetAngularDiameter (LightHandle handle, float angularDiameter)=0 |
virtual void | SetShadowmapSize (LightHandle handle, ShadowmapSize size)=0 |
virtual void | SetCascadeCount (LightHandle handle, uint16_t cascadeCount)=0 |
virtual void | SetShadowmapFrustumSplitSchemeRatio (LightHandle handle, float ratio)=0 |
virtual void | SetCascadeFarDepth (LightHandle handle, uint16_t cascadeIndex, float farDepth)=0 |
virtual void | SetCameraConfiguration (LightHandle handle, const Camera::Configuration &cameraConfiguration, const RPI::RenderPipelineId &renderPipelineId=RPI::RenderPipelineId())=0 |
virtual void | SetShadowFarClipDistance (LightHandle handle, float farDist)=0 |
virtual void | SetCameraTransform (LightHandle handle, const Transform &cameraTransform, const RPI::RenderPipelineId &renderPipelineId=RPI::RenderPipelineId())=0 |
virtual void | SetGroundHeight (LightHandle handle, float groundHeight)=0 |
virtual void | SetViewFrustumCorrectionEnabled (LightHandle, bool enabled)=0 |
virtual void | SetDebugFlags (LightHandle handle, DebugDrawFlags flags)=0 |
virtual void | SetShadowFilterMethod (LightHandle handle, ShadowFilterMethod method)=0 |
virtual void | SetFilteringSampleCount (LightHandle handle, uint16_t count)=0 |
virtual void | SetShadowReceiverPlaneBiasEnabled (LightHandle handle, bool enable)=0 |
virtual void | SetShadowBias (LightHandle handle, float bias)=0 |
Reduces acne by applying a small amount of bias along shadow-space z. | |
virtual void | SetNormalShadowBias (LightHandle handle, float normalShadowBias)=0 |
Reduces acne by biasing the shadowmap lookup along the geometric normal. | |
virtual void | SetCascadeBlendingEnabled (LightHandle handle, bool enable)=0 |
Sets whether or not blending between shadow map cascades is enabled. | |
virtual void | SetFullscreenBlurEnabled (LightHandle handle, bool enable)=0 |
Sets whether or not to apply fullscreen blur after fullscreen shadow pass. | |
virtual void | SetFullscreenBlurConstFalloff (LightHandle handle, float blurConstFalloff)=0 |
Sets the amount of constant falloff on the fullscreen shadow blur. | |
virtual void | SetFullscreenBlurDepthFalloffStrength (LightHandle handle, float blurDepthFalloffStrength)=0 |
Sets the strength of the depth falloff on the fullscreen shadow blur. | |
virtual void | SetAffectsGI (LightHandle handle, bool affectsGI)=0 |
Specifies if this light affects the diffuse global illumination in the scene. | |
virtual void | SetAffectsGIFactor (LightHandle handle, float affectsGIFactor)=0 |
Specifies the contribution of this light to the diffuse global illumination in the scene. | |
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 () |
Additional Inherited Members | |
Protected Member Functions inherited from AZ::RPI::FeatureProcessor | |
void | EnableSceneNotification () |
void | DisableSceneNotification () |
DirectionalLightFeatureProcessorInterface provides an interface to acquire, release, and update a directional light. This is necessary for code outside of the Atom features gem to communicate with the DirectionalLightFeatureProcessor.
|
pure virtual |
This creates a new directional light which can be referenced by the returned LightHandle. This must be released via ReleaseLight() when no longer needed.
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This creates a new LightHandle by copying data from an existing LightHandle.
lightHandle | the handle to clone. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This releases a LightHandle which removes the directional light.
lightHandle | the handle to release. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
Specifies if this light affects the diffuse global illumination in the scene.
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
Specifies the contribution of this light to the diffuse global illumination in the scene.
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This sets a directional light's angular diameter. This value should be small, for instance the sun is 0.5 degrees across.
handle | the light handle. |
angularDiameter | Directional light's angular diameter in degrees. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This sets camera configuration which affect to cascade segmentation.
handle | the light handle. |
cameraConfiguration | the camera configuration. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This sets camera transform which affect to cascade segmentation.
handle | the light handle. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
Sets whether or not blending between shadow map cascades is enabled.
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This sets cascade count of the shadowmap.
handle | the light handle. |
cascadeCount | the count of cascade (from 1 to 4). |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This sets the far depth of the cascade. If this is called, the ratio of frustum split scheme will be ignored.
handle | the light handle. |
cascadeIndex | the index of the cascade to be changed. |
farDepth | the far depth to be set. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This specifies what debug features to display.
handle | the light handle. |
flags | flags specifying the debug features. See DebugDrawFlags for more info. By drawing debug colors and bounding boxes, we can see how cascading of shadowmaps works. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This sets the direction of the light. direction should be normalized.
handle | the light handle. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This sets sample count for filtering of shadow boundary.
handle | the light handle. |
count | Sample Count for filtering (up to 64) |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
Sets the amount of constant falloff on the fullscreen shadow blur.
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
Sets the strength of the depth falloff on the fullscreen shadow blur.
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
Sets whether or not to apply fullscreen blur after fullscreen shadow pass.
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This specifies the height of the ground.
handle | the light handle. |
groundHeight | height of the ground. The position of view frustum is corrected using groundHeight to get better quality of shadow around the area close to the camera. To enable the correction, SetViewFrustumCorrectionEnabled(true) is required. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
Reduces acne by biasing the shadowmap lookup along the geometric normal.
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This sets the intensity in RGB lux for a given LightHandle.
handle | the light handle. |
lightColor | the intensity in RGB lux. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
Reduces acne by applying a small amount of bias along shadow-space z.
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This sets shadow specific far clip depth. Pixels beyond the far clip depth do not receive shadows. Reducing this value improves shadow quality.
handle | the light handle. |
farDist | the far clip depth. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This specifies filter method of shadows.
handle | the light handle. |
method | filter method. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This sets ratio between logarithm/uniform scheme to split view frustum. If this is called, frustum splitting becomes automatic and the far depths given by SetCascadeFarDepth() are discarded.
handle | the light handle. |
ratio | the ratio (in [0,1]) between logarithm scheme and uniform scheme to split view frustum into segments. ratio==0 means uniform and ratio==1 means logarithm. uniform: the most detailed cascade covers wider area but less detailed. logarithm: the most detailed cascade covers narrower area but more detailed. The least detailed cascade is not affected by this parameter. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This sets the shadowmap size (width and height) of the light.
handle | the light handle. |
size | the shadowmap size (width/height). |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
Sets whether the directional shadowmap should use receiver plane bias. This attempts to reduce shadow acne when using large pcf filters.
Implemented in AZ::Render::DirectionalLightFeatureProcessor.
|
pure virtual |
This specifies whether view frustum correction is enabled or not.
handle | the light handle. |
enabled | flag specifying whether view frustum positions are corrected. The calculation of it is caused when position or configuration of the camera is changed. |
Implemented in AZ::Render::DirectionalLightFeatureProcessor.