Rebel Fork Framework
|
Manages light parameters, lit geometries, shadow splits and shadow casters. More...
#include <Urho3D/RenderPipeline/LightProcessor.h>
Public Member Functions | |
LightProcessor (Light *light) | |
void | BeginUpdate (DrawableProcessor *drawableProcessor, LightProcessorCallback *callback) |
Begin update from main thread. | |
void | Update (DrawableProcessor *drawableProcessor, const LightProcessorCallback *callback) |
Update light in worker thread. | |
void | EndUpdate (DrawableProcessor *drawableProcessor, LightProcessorCallback *callback, unsigned pcfKernelSize) |
End update from main thread. | |
unsigned | GetForwardLitHash () const |
unsigned | GetShadowHash (unsigned splitIndex) const |
unsigned | GetLightVolumeHash () const |
Light * | GetLight () const |
const ea::vector< Drawable * > & | GetLitGeometries () const |
bool | HasForwardLitGeometries () const |
bool | HasLitGeometries () const |
bool | DoesOverlapCamera () const |
bool | HasShadow () const |
IntVector2 | GetShadowMapSize () const |
unsigned | GetNumSplits () const |
const ShadowSplitProcessor * | GetSplit (unsigned splitIndex) const |
ShadowSplitProcessor * | GetMutableSplit (unsigned splitIndex) |
ea::span< const ShadowSplitProcessor > | GetSplits () const |
ea::span< ShadowSplitProcessor > | GetMutableSplits () |
ShadowMapRegion | GetShadowMap () const |
const CookedLightParams & | GetParams () const |
Static Public Attributes | |
static const unsigned | NumSplitFramesToLive = 600 |
Number of frames for shadow splits expiration. | |
Private Member Functions | |
void | InitializeShadowSplits (DrawableProcessor *drawableProcessor) |
void | UpdateHashes () |
void | CookShaderParameters (Camera *cullCamera, const DrawableProcessorSettings &settings) |
IntVector2 | GetNumSplitsInGrid () const |
Private Attributes | |
Light * | light_ {} |
ea::vector< ShadowSplitProcessor > | splits_ |
unsigned | splitRemainingTimeToLive_ {} |
RenderBackend | renderBackend_ {} |
bool | isShadowRequested_ {} |
unsigned | numSplitsRequested_ {} |
bool | cameraIsInsideLightVolume_ {} |
unsigned | numActiveSplits_ {} |
int | shadowMapSplitSize_ {} |
IntVector2 | shadowMapSize_ {} |
bool | hasLitGeometries_ {} |
bool | hasForwardLitGeometries_ {} |
ea::vector< Drawable * > | litGeometries_ |
ea::vector< Drawable * > | shadowCasterCandidates_ |
ShadowMapRegion | shadowMap_ |
Accumulative shadow map region containing all the splits. | |
CookedLightParams | cookedParams_ |
unsigned | forwardLitBatchHash_ {} |
unsigned | lightVolumeBatchHash_ {} |
ea::array< unsigned, MAX_LIGHT_SPLITS > | shadowBatchStateHashes_ {} |
Additional Inherited Members | |
Protected Member Functions inherited from Urho3D::NonCopyable | |
NonCopyable (const NonCopyable &other)=delete | |
NonCopyable (NonCopyable &&other)=delete | |
NonCopyable & | operator= (const NonCopyable &other)=delete |
NonCopyable & | operator= (NonCopyable &&other)=delete |
Manages light parameters, lit geometries, shadow splits and shadow casters.
|
inline |
Return pipeline state hashes
|
inline |
Return values are always valid
|
inline |
Return values are valid after threaded update
|
inline |
Return values are valid after update is finished
|
private |
Setup splits
|
private |
Processing results
|
private |
Pipeline state hashes
|
private |
Parameters extracted from light settings
|
private |
Point and spot lights: only forward lit geometries. Directional lights: all lit geometries, for shadow focusing.
|
private |
Point and spot lights: all possible shadow casters. Directional lights: temporary buffer for split queries.