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::DiskLightFeatureProcessor Class Referencefinal

Inherits AZ::Render::DiskLightFeatureProcessorInterface.

Public Member Functions

 AZ_RTTI (AZ::Render::DiskLightFeatureProcessor, "{F69C0188-2C1C-47A5-8187-17433C34AC2B}", AZ::Render::DiskLightFeatureProcessorInterface)
 
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 Render (const RenderPacket &packet) override
 
LightHandle AcquireLight () override
 Creates a new disk light which can be referenced by the returned LightHandle. Must be released via ReleaseLight() when no longer needed.
 
bool ReleaseLight (LightHandle &handle) override
 Releases a LightHandle which removes the disk light.
 
LightHandle CloneLight (LightHandle handle) override
 Creates a new LightHandle by copying data from an existing LightHandle.
 
void SetRgbIntensity (LightHandle handle, const PhotometricColor< PhotometricUnitType > &lightColor) override
 Sets the intensity in RGB candela for a given LightHandle.
 
void SetPosition (LightHandle handle, const AZ::Vector3 &lightPosition) override
 Sets the position for a given LightHandle.
 
void SetDirection (LightHandle handle, const AZ::Vector3 &lightDirection) override
 Sets the direction for a given LightHandle.
 
void SetAttenuationRadius (LightHandle handle, float attenuationRadius) override
 Sets the radius in meters at which the provided LightHandle will no longer have an effect.
 
void SetDiskRadius (LightHandle handle, float radius) override
 Sets the disk radius for the provided LightHandle.
 
void SetConstrainToConeLight (LightHandle handle, bool useCone) override
 Sets whether the disk should constrain its light to a cone. (use SetInnerConeAngle and SetOuterConeAngle to set cone angle parameters)
 
void SetConeAngles (LightHandle handle, float innerDegrees, float outerDegrees) override
 Sets the inner and outer cone angles in radians.
 
void SetShadowsEnabled (LightHandle handle, bool enabled) override
 Sets if shadows are enabled.
 
void SetShadowBias (LightHandle handle, float bias) override
 Sets the shadow bias.
 
void SetNormalShadowBias (LightHandle handle, float bias) override
 Sets the normal shadow bias.
 
void SetShadowmapMaxResolution (LightHandle handle, ShadowmapSize shadowmapSize) override
 Sets the shadowmap size (width and height) of the light.
 
void SetShadowFilterMethod (LightHandle handle, ShadowFilterMethod method) override
 Specifies filter method of shadows.
 
void SetFilteringSampleCount (LightHandle handle, uint16_t count) override
 Sets sample count for filtering of shadow boundary (up to 64)
 
void SetEsmExponent (LightHandle handle, float esmExponent) override
 Sets the Esm exponent to use. Higher values produce a steeper falloff in the border areas between light and shadow.
 
void SetUseCachedShadows (LightHandle handle, bool useCachedShadows) override
 Sets if this shadow should be rendered every frame (not cached) or only when it detects a change (cached).
 
void SetAffectsGI (LightHandle handle, bool affectsGI) override
 Specifies if this light affects the diffuse global illumination in the scene.
 
void SetAffectsGIFactor (LightHandle handle, float affectsGIFactor) override
 Specifies the contribution of this light to the diffuse global illumination in the scene.
 
void SetDiskData (LightHandle handle, const DiskLightData &data) override
 Sets all of the the disk data for the provided LightHandle.
 
const DiskLightDataGetDiskData (LightHandle handle) const override
 Get a read only copy of a disk lights data, useful for debug rendering.
 
const Data::Instance< RPI::BufferGetLightBuffer () const
 
uint32_t GetLightCount () const
 
- Public Member Functions inherited from AZ::Render::DiskLightFeatureProcessorInterface
 AZ_RTTI (AZ::Render::DiskLightFeatureProcessorInterface, "{A78A8FBD-1494-4EF9-9C05-AF153FDB1F17}", AZ::RPI::FeatureProcessor)
 
virtual LightHandle AcquireLight ()=0
 Creates a new disk light which can be referenced by the returned LightHandle. Must be released via ReleaseLight() when no longer needed.
 
virtual bool ReleaseLight (LightHandle &handle)=0
 Releases a LightHandle which removes the disk light.
 
virtual LightHandle CloneLight (LightHandle handle)=0
 Creates a new LightHandle by copying data from an existing LightHandle.
 
virtual void SetRgbIntensity (LightHandle handle, const PhotometricColor< PhotometricUnitType > &lightColor)=0
 Sets the intensity in RGB candela for a given LightHandle.
 
virtual void SetPosition (LightHandle handle, const AZ::Vector3 &lightPosition)=0
 Sets the position for a given LightHandle.
 
virtual void SetDirection (LightHandle handle, const AZ::Vector3 &lightDirection)=0
 Sets the direction for a given LightHandle.
 
virtual void SetAttenuationRadius (LightHandle handle, float attenuationRadius)=0
 Sets the radius in meters at which the provided LightHandle will no longer have an effect.
 
virtual void SetDiskRadius (LightHandle handle, float radius)=0
 Sets the disk radius for the provided LightHandle.
 
virtual void SetConstrainToConeLight (LightHandle handle, bool useCone)=0
 Sets whether the disk should constrain its light to a cone. (use SetInnerConeAngle and SetOuterConeAngle to set cone angle parameters)
 
virtual void SetConeAngles (LightHandle handle, float innerRadians, float outerRadians)=0
 Sets the inner and outer cone angles in radians.
 
virtual void SetShadowsEnabled (LightHandle handle, bool enabled)=0
 Sets if shadows are enabled.
 
virtual void SetShadowBias (LightHandle handle, float bias)=0
 Sets the shadow bias.
 
virtual void SetNormalShadowBias (LightHandle handle, float bias)=0
 Sets the normal shadow bias.
 
virtual void SetShadowmapMaxResolution (LightHandle handle, ShadowmapSize shadowmapSize)=0
 Sets the shadowmap size (width and height) of the light.
 
virtual void SetShadowFilterMethod (LightHandle handle, ShadowFilterMethod method)=0
 Specifies filter method of shadows.
 
virtual void SetFilteringSampleCount (LightHandle handle, uint16_t count)=0
 Sets sample count for filtering of shadow boundary (up to 64)
 
virtual void SetEsmExponent (LightHandle handle, float exponent)=0
 Sets the Esm exponent to use. Higher values produce a steeper falloff in the border areas between light and shadow.
 
virtual void SetUseCachedShadows (LightHandle handle, bool useCachedShadows)=0
 Sets if this shadow should be rendered every frame (not cached) or only when it detects a change (cached).
 
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.
 
virtual void SetDiskData (LightHandle handle, const DiskLightData &data)=0
 Sets all of the the disk data for the provided LightHandle.
 
virtual const DiskLightDataGetDiskData (LightHandle handle) const =0
 Get a read only copy of a disk lights data, useful for debug rendering.
 
- 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

- Public Types inherited from AZ::Render::DiskLightFeatureProcessorInterface
using LightHandle = RHI::Handle< uint16_t, class DiskLight >
 
- Static Public Attributes inherited from AZ::Render::DiskLightFeatureProcessorInterface
static constexpr PhotometricUnit PhotometricUnitType = PhotometricUnit::Candela
 
- Protected Member Functions inherited from AZ::RPI::FeatureProcessor
void EnableSceneNotification ()
 
void DisableSceneNotification ()
 

Member Function Documentation

◆ AcquireLight()

LightHandle AZ::Render::DiskLightFeatureProcessor::AcquireLight ( )
overridevirtual

Creates a new disk light which can be referenced by the returned LightHandle. Must be released via ReleaseLight() when no longer needed.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ Activate()

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

Perform any necessary activation and gives access to owning Scene.

Reimplemented from AZ::RPI::FeatureProcessor.

◆ CloneLight()

LightHandle AZ::Render::DiskLightFeatureProcessor::CloneLight ( LightHandle  handle)
overridevirtual

Creates a new LightHandle by copying data from an existing LightHandle.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ Deactivate()

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

Perform any necessary deactivation.

Reimplemented from AZ::RPI::FeatureProcessor.

◆ GetDiskData()

const DiskLightData & AZ::Render::DiskLightFeatureProcessor::GetDiskData ( LightHandle  handle) const
overridevirtual

Get a read only copy of a disk lights data, useful for debug rendering.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ ReleaseLight()

bool AZ::Render::DiskLightFeatureProcessor::ReleaseLight ( LightHandle handle)
overridevirtual

Releases a LightHandle which removes the disk light.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ Render()

void AZ::Render::DiskLightFeatureProcessor::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.

◆ SetAffectsGI()

void AZ::Render::DiskLightFeatureProcessor::SetAffectsGI ( LightHandle  handle,
bool  affectsGI 
)
overridevirtual

Specifies if this light affects the diffuse global illumination in the scene.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetAffectsGIFactor()

void AZ::Render::DiskLightFeatureProcessor::SetAffectsGIFactor ( LightHandle  handle,
float  affectsGIFactor 
)
overridevirtual

Specifies the contribution of this light to the diffuse global illumination in the scene.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetAttenuationRadius()

void AZ::Render::DiskLightFeatureProcessor::SetAttenuationRadius ( LightHandle  handle,
float  attenuationRadius 
)
overridevirtual

Sets the radius in meters at which the provided LightHandle will no longer have an effect.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetConeAngles()

void AZ::Render::DiskLightFeatureProcessor::SetConeAngles ( LightHandle  handle,
float  innerRadians,
float  outerRadians 
)
overridevirtual

Sets the inner and outer cone angles in radians.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetConstrainToConeLight()

void AZ::Render::DiskLightFeatureProcessor::SetConstrainToConeLight ( LightHandle  handle,
bool  useCone 
)
overridevirtual

Sets whether the disk should constrain its light to a cone. (use SetInnerConeAngle and SetOuterConeAngle to set cone angle parameters)

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetDirection()

void AZ::Render::DiskLightFeatureProcessor::SetDirection ( LightHandle  handle,
const AZ::Vector3 &  lightDirection 
)
overridevirtual

Sets the direction for a given LightHandle.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetDiskData()

void AZ::Render::DiskLightFeatureProcessor::SetDiskData ( LightHandle  handle,
const DiskLightData data 
)
overridevirtual

Sets all of the the disk data for the provided LightHandle.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetDiskRadius()

void AZ::Render::DiskLightFeatureProcessor::SetDiskRadius ( LightHandle  handle,
float  radius 
)
overridevirtual

Sets the disk radius for the provided LightHandle.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetEsmExponent()

void AZ::Render::DiskLightFeatureProcessor::SetEsmExponent ( LightHandle  handle,
float  exponent 
)
overridevirtual

Sets the Esm exponent to use. Higher values produce a steeper falloff in the border areas between light and shadow.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetFilteringSampleCount()

void AZ::Render::DiskLightFeatureProcessor::SetFilteringSampleCount ( LightHandle  handle,
uint16_t  count 
)
overridevirtual

Sets sample count for filtering of shadow boundary (up to 64)

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetNormalShadowBias()

void AZ::Render::DiskLightFeatureProcessor::SetNormalShadowBias ( LightHandle  handle,
float  bias 
)
overridevirtual

Sets the normal shadow bias.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetPosition()

void AZ::Render::DiskLightFeatureProcessor::SetPosition ( LightHandle  handle,
const AZ::Vector3 &  lightPosition 
)
overridevirtual

Sets the position for a given LightHandle.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetRgbIntensity()

void AZ::Render::DiskLightFeatureProcessor::SetRgbIntensity ( LightHandle  handle,
const PhotometricColor< PhotometricUnitType > &  lightColor 
)
overridevirtual

Sets the intensity in RGB candela for a given LightHandle.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetShadowBias()

void AZ::Render::DiskLightFeatureProcessor::SetShadowBias ( LightHandle  handle,
float  bias 
)
overridevirtual

Sets the shadow bias.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetShadowFilterMethod()

void AZ::Render::DiskLightFeatureProcessor::SetShadowFilterMethod ( LightHandle  handle,
ShadowFilterMethod  method 
)
overridevirtual

Specifies filter method of shadows.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetShadowmapMaxResolution()

void AZ::Render::DiskLightFeatureProcessor::SetShadowmapMaxResolution ( LightHandle  handle,
ShadowmapSize  shadowmapSize 
)
overridevirtual

Sets the shadowmap size (width and height) of the light.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetShadowsEnabled()

void AZ::Render::DiskLightFeatureProcessor::SetShadowsEnabled ( LightHandle  handle,
bool  enabled 
)
overridevirtual

Sets if shadows are enabled.

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ SetUseCachedShadows()

void AZ::Render::DiskLightFeatureProcessor::SetUseCachedShadows ( LightHandle  handle,
bool  useCachedShadows 
)
overridevirtual

Sets if this shadow should be rendered every frame (not cached) or only when it detects a change (cached).

Implements AZ::Render::DiskLightFeatureProcessorInterface.

◆ Simulate()

void AZ::Render::DiskLightFeatureProcessor::Simulate ( const SimulatePacket )
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.

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

Reimplemented from AZ::RPI::FeatureProcessor.


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