mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +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
|
|
@ -78,6 +78,16 @@ AFTER_MODULE_INIT( Sim )
|
|||
Con::NotifyDelegate shadowCallback( &ShadowMapManager::updateShadowDisable );
|
||||
Con::addVariableNotify( "$pref::Shadows::disable", shadowCallback );
|
||||
Con::addVariableNotify( "$Shadows::disable", shadowCallback );
|
||||
|
||||
Con::addVariable("$pref::Shadows::teleportDist",
|
||||
TypeF32, &ShadowMapPass::smShadowsTeleportDist,
|
||||
"Minimum distance moved per frame to determine that we are teleporting.\n");
|
||||
Con::addVariableNotify("$pref::Shadows::teleportDist", shadowCallback);
|
||||
|
||||
Con::addVariable("$pref::Shadows::turnRate",
|
||||
TypeF32, &ShadowMapPass::smShadowsTurnRate,
|
||||
"Minimum angle moved per frame to determine that we are turning quickly.\n");
|
||||
Con::addVariableNotify("$pref::Shadows::turnRate", shadowCallback);
|
||||
}
|
||||
|
||||
Signal<void(void)> ShadowMapManager::smShadowDeactivateSignal;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue