mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- put in timer resets for the shader system, so that they can continue being passed as floats
This commit is contained in:
parent
763222b571
commit
d2bc24737b
1 changed files with 4 additions and 2 deletions
|
@ -118,8 +118,10 @@ void FRenderState::Reset()
|
|||
|
||||
bool FRenderState::ApplyShader()
|
||||
{
|
||||
static int firstFrame = 0;
|
||||
if (firstFrame == 0)
|
||||
static uint64_t firstFrame = 0;
|
||||
// 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 ((firstFrame == 0) || (screen->FrameTime - firstFrame >= 1<<24))
|
||||
firstFrame = screen->FrameTime;
|
||||
|
||||
static const float nulvec[] = { 0.f, 0.f, 0.f, 0.f };
|
||||
|
|
Loading…
Reference in a new issue