mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 03:03:35 +02:00
div by zero fix
This commit is contained in:
parent
18d723b6b4
commit
cbb0d27f68
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ void LODManager::autoAdjustLOD(float batchTime, float engineRunTime, float delta
|
|||
float maxTime = glm::max(renderTime, engineRunTime);
|
||||
const float BLEND_TIMESCALE = 0.3f; // sec
|
||||
const float safeDeltaTime = (deltaTime == 0.0f) ? 0.001f : deltaTime;
|
||||
float blend = BLEND_TIMESCALE / deltaTimeSec;
|
||||
float blend = BLEND_TIMESCALE / safeDeltaTime;
|
||||
if (blend > 1.0f) {
|
||||
blend = 1.0f;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue