mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 20:35:35 +00:00
motion based updates for shadow caching
adds a $pref::Shadows::teleportDis and $pref::Shadows::turnRate (defaults 4, and 1 respectively) if either is exceeded during a given frame, shadow chaches are forced to refresh themselves.
This commit is contained in:
parent
7af95e6a8e
commit
01419d7935
5 changed files with 55 additions and 19 deletions
|
|
@ -84,10 +84,10 @@ public:
|
|||
static bool smDisableShadowsEditor;
|
||||
static bool smDisableShadowsPref;
|
||||
|
||||
/// milliseconds before static redraw
|
||||
static S32 smStaticShadowUpdateFreq;
|
||||
/// milliseconds before dynamic redraw
|
||||
static S32 smDynamicShadowUpdateFreq;
|
||||
/// distance moved per frame before forcing a shadow update
|
||||
static F32 smShadowsTeleportDist;
|
||||
/// angle turned per frame before forcing a shadow update
|
||||
static F32 smShadowsTurnRate;
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -112,6 +112,8 @@ private:
|
|||
SimObjectPtr<DynamicShadowRenderPassManager> mDynamicShadowRPM;
|
||||
LightManager* mLightManager;
|
||||
ShadowMapManager* mShadowManager;
|
||||
Point3F mPrevCamPos;
|
||||
Point3F mPrevCamRot;
|
||||
};
|
||||
|
||||
class ShadowRenderPassManager : public RenderPassManager
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue