- never run the shader timer on the 0th frame. fixes this bug: https://forum.zdoom.org/viewtopic.php?f=2&t=62693

This commit is contained in:
Rachael Alexanderson 2021-05-18 14:37:05 -04:00
parent 8a4fa8b65f
commit cfc080e37f

View file

@ -291,7 +291,7 @@ static void CheckTimer(FRenderState &state, uint64_t ShaderStartTime)
// if firstFrame is not yet initialized, initialize it to current time
// if we're going to overflow a float (after ~4.6 hours, or 24 bits), re-init to regain precision
if ((state.firstFrame == 0) || (screen->FrameTime - state.firstFrame >= 1 << 24) || ShaderStartTime >= state.firstFrame)
state.firstFrame = screen->FrameTime;
state.firstFrame = screen->FrameTime - 1;
}