mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 22:30:42 +02:00
Merge pull request #11333 from ctrlaltdavid/faster-fade-in
Reduce entity fade-in time
This commit is contained in:
commit
ce3ed68861
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ float Interpolate::simpleNonLinearBlend(float fraction) {
|
|||
}
|
||||
|
||||
float Interpolate::calculateFadeRatio(quint64 start) {
|
||||
const float FADE_TIME = 1.0f;
|
||||
const float FADE_TIME = 0.5f;
|
||||
float t = 2.0f * std::min(((float)(usecTimestampNow() - start)) / ((float)(FADE_TIME * USECS_PER_SECOND)), 1.0f);
|
||||
float fadeRatio = (t < 1.0f) ? 0.5f * powf(2.0f, 10.0f * (t - 1.0f)) : 0.5f * (-powf(2.0f, -10.0f * (t - 1.0f)) + 2.0f);
|
||||
|
||||
|
|
Loading…
Reference in a new issue