mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 13:49:46 +02:00
fix divide-by-zero asan warning in LODManager::autoAdjustLOD
This commit is contained in:
parent
6ec91cfa82
commit
30c5fa6fa1
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ void LODManager::autoAdjustLOD(float realTimeDelta) {
|
||||||
// Note: we MUST clamp the blend to 1.0 for stability
|
// Note: we MUST clamp the blend to 1.0 for stability
|
||||||
float blend = (realTimeDelta < LOD_ADJUST_RUNNING_AVG_TIMESCALE) ? realTimeDelta / LOD_ADJUST_RUNNING_AVG_TIMESCALE : 1.0f;
|
float blend = (realTimeDelta < LOD_ADJUST_RUNNING_AVG_TIMESCALE) ? realTimeDelta / LOD_ADJUST_RUNNING_AVG_TIMESCALE : 1.0f;
|
||||||
_avgRenderTime = (1.0f - blend) * _avgRenderTime + blend * maxRenderTime; // msec
|
_avgRenderTime = (1.0f - blend) * _avgRenderTime + blend * maxRenderTime; // msec
|
||||||
if (!_automaticLODAdjust) {
|
if (!_automaticLODAdjust || _avgRenderTime == 0.0f) {
|
||||||
// early exit
|
// early exit
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue