Rebel Fork Framework
Urho3D::ShadowSplitProcessor Class Reference

#include <Urho3D/RenderPipeline/ShadowSplitProcessor.h>

Public Member Functions

 ShadowSplitProcessor (LightProcessor *owner, unsigned splitIndex)
 
void FinalizeShadow (const ShadowMapRegion &shadowMap, unsigned pcfKernelSize)
 
void FinalizeShadowBatches ()
 
auto & GetMutableUnsortedShadowBatches ()
 
auto & GetMutableShadowBatches ()
 
const auto & GetShadowBatches () const
 
void InitializeDirectional (DrawableProcessor *drawableProcessor, const FloatRange &splitRange, const ea::vector< Drawable * > &litGeometries)
 
void InitializeSpot ()
 
void InitializePoint (CubeMapFace face)
 
void ProcessDirectionalShadowCasters (DrawableProcessor *drawableProcessor, ea::vector< Drawable * > &shadowCastersBuffer)
 
void ProcessSpotShadowCasters (DrawableProcessor *drawableProcessor, const ea::vector< Drawable * > &shadowCasterCandidates)
 
void ProcessPointShadowCasters (DrawableProcessor *drawableProcessor, const ea::vector< Drawable * > &shadowCasterCandidates)
 
LightProcessor * GetLightProcessor () const
 
Light * GetLight () const
 
unsigned GetSplitIndex () const
 
const auto & GetShadowCasters () const
 
bool HasShadowCasters () const
 
Matrix4 GetWorldToShadowSpaceMatrix (float subPixelOffset) const
 
const ShadowMapRegion & GetShadowMap () const
 
float GetShadowMapTexelSizeInWorldSpace () const
 
unsigned GetShadowMapPadding () const
 
const FloatRange & GetCascadeZRange () const
 
Camera * GetShadowCamera () const
 

Private Member Functions

void InitializeBaseDirectionalCamera (Camera *cullCamera)
 
BoundingBox GetLitGeometriesBoundingBox (DrawableProcessor *drawableProcessor, const ea::vector< Drawable * > &litGeometries) const
 
BoundingBox GetSplitShadowBoundingBoxInLightSpace (DrawableProcessor *drawableProcessor, const ea::vector< Drawable * > &litGeometries) const
 
void AdjustDirectionalLightCamera (const BoundingBox &lightSpaceBoundingBox, float shadowMapSize)
 

Private Attributes

LightProcessor * lightProcessor_ {}
 
Light * light_ {}
 
unsigned splitIndex_ {}
 
RenderBackend renderBackend_ {}
 
SharedPtr< Node > shadowCameraNode_
 
SharedPtr< Camera > shadowCamera_
 
FloatRange cascadeZRange_ {}
 
FloatRange focusedCascadeZRange_ {}
 
ea::vector< Drawable * > shadowCasters_
 
ShadowMapRegion shadowMap_
 
float shadowMapWorldSpaceTexelSize_ {}
 
unsigned shadowMapPadding_ {}
 
ea::vector< PipelineBatch > unsortedShadowBatches_
 
ea::vector< PipelineBatchByState > sortedShadowBatches_
 
PipelineBatchGroup< PipelineBatchByState > shadowBatches_
 

Detailed Description

Manages single shadow split parameters and shadow casters. Spot lights always have one split. Directions lights have one split per cascade. Point lights always have six splits.

Member Function Documentation

◆ GetLightProcessor()

LightProcessor * Urho3D::ShadowSplitProcessor::GetLightProcessor ( ) const
inline

Return immutable

◆ GetShadowCasters()

const auto & Urho3D::ShadowSplitProcessor::GetShadowCasters ( ) const
inline

Return values are valid after shadow casters are processed

◆ GetWorldToShadowSpaceMatrix()

Matrix4 Urho3D::ShadowSplitProcessor::GetWorldToShadowSpaceMatrix ( float  subPixelOffset) const

Return values are valid after shadow map is finalized

◆ InitializeDirectional()

void Urho3D::ShadowSplitProcessor::InitializeDirectional ( DrawableProcessor *  drawableProcessor,
const FloatRange &  splitRange,
const ea::vector< Drawable * > &  litGeometries 
)

Initialize split parameters

◆ ProcessDirectionalShadowCasters()

void Urho3D::ShadowSplitProcessor::ProcessDirectionalShadowCasters ( DrawableProcessor *  drawableProcessor,
ea::vector< Drawable * > &  shadowCastersBuffer 
)

Process shadow casters

Member Data Documentation

◆ cascadeZRange_

FloatRange Urho3D::ShadowSplitProcessor::cascadeZRange_ {}
private

Frame-specific objects

◆ lightProcessor_

LightProcessor* Urho3D::ShadowSplitProcessor::lightProcessor_ {}
private

Immutable

◆ shadowCameraNode_

SharedPtr<Node> Urho3D::ShadowSplitProcessor::shadowCameraNode_
private

Internal cached objects

◆ unsortedShadowBatches_

ea::vector<PipelineBatch> Urho3D::ShadowSplitProcessor::unsortedShadowBatches_
private

Shadow casters


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