mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
Adds preferences for limiting the maximum number of local lights, as well as distance-based fading of local lights.
This commit is contained in:
parent
9e792845f7
commit
7b02d81b54
4 changed files with 115 additions and 2 deletions
|
|
@ -108,6 +108,11 @@ public:
|
|||
static bool smSpecularLightViz;
|
||||
static bool smDetailLightingViz;
|
||||
|
||||
static S32 smMaximumNumOfLights;
|
||||
static bool smUseLightFade;
|
||||
static F32 smLightFadeEnd;
|
||||
static F32 smLightFadeStart;
|
||||
|
||||
// Used for console init
|
||||
AdvancedLightBinManager( AdvancedLightManager *lm = NULL,
|
||||
ShadowMapManager *sm = NULL,
|
||||
|
|
@ -130,6 +135,9 @@ public:
|
|||
|
||||
virtual bool setTargetSize(const Point2I &newTargetSize);
|
||||
|
||||
/// Scores the registered lights for sorting/ordering purposes
|
||||
void _scoreLights(const MatrixF& cameraTrans);
|
||||
|
||||
// ConsoleObject interface
|
||||
DECLARE_CONOBJECT(AdvancedLightBinManager);
|
||||
|
||||
|
|
@ -242,6 +250,8 @@ protected:
|
|||
void _setupPerFrameParameters( const SceneRenderState *state );
|
||||
|
||||
void setupSGData( SceneData &data, const SceneRenderState* state, LightInfo *light );
|
||||
|
||||
static S32 QSORT_CALLBACK _lightScoreCmp(const LightBinEntry* a, const LightBinEntry* b);
|
||||
};
|
||||
|
||||
#endif // _ADVANCEDLIGHTBINMANAGER_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue