Jump to content
The Dark Mod Forums

Adaptive Vsync in The Dark Mod


nbohr1more

Recommended Posts

Hark There!

 

During the 2.07 development cycle, there were a few discussions about exclusive fullscreen that verged

into the topic of Vsync.

 

Because of this, I did a little research about what Vsync options OpenGL offers and tried to compare what

we have in our GL libraries.

 

To my great surprise, we use OpenGL's native "Swap Interval" feature to perform Vsync and it passes the

exact value you supply it directly to the driver.

 

This means that The Dark Mod has Adaptive Vsync ( swap interval -1) and probably has had it for years.

 

I tested this out and it seems to work for me but I'd like to know if this only works for Nvidia (etc).

 

Please try this out:

 

1) Start TDM

2) Open the console: CTRL + ALT + ~

3) Enter r_swapInterval -1

 

Then play a mission where you know FPS drops below 60. (No Honor Among Thieves, Briarwood Manor, etc.)

 

What you should see is that FPS is capped to 60 but the game does not drop you straight to 30FPS when you

go below 60.

 

It will be easier to tell if it's working if you pair it to uncapped FPS.

Addendum:

30 for who has the Monitor Refresh Rate set to 60 Hz (60->30->15)

36 for who has the Monitor Refresh Rate set to 72 Hz (someone with an old but gold analogue monitor, 72->36->18)

 

I'm testing now!

Edited by lowenz
  • Like 1

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

I'm testing now!

It's working :D

 

So the TDM players have 3 choices/options for the VSync:

1) Use the "default" double buffered output (r_swapinterval 1)

2) Use the "default" double buffered output (r_swapinterval 1) forcing the triple buffering via NVCP/Radeon Settings (first create a TDM dedicated profile)

3) use the Adaptive VSync (r_swapinterval -1)

 

2/3 are nearly-equivalent.

 

Todo for 2.08: add 3) in plain text in the video options menu.

Edited by lowenz
  • Like 2

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

My experience aligns with chakkman's. My first experiments with Doom 3 on Windows (in about 2005) showed that with default driver settings, my frame rates were not limited to integer divisions of the monitor refresh rate, unless I was running in a window with the editor open. I was under the impression that this is the behaviour you see with triple buffering, and does not require anything called "Adaptive VSync" (which I don't remember ever seeing in the driver settings, and I certainly never set r_swapInterval to anything unusual).

 

@nbohr: are you absolutely sure that Adaptive VSync does what you think, because it seems like the non-framerate-dropping behaviour you are describing is also a characteristic of straightforward triple buffering?

Link to comment
Share on other sites

I'm not sure when things changed but I do recall numerous support threads where players complained of dropping to 30FPS

and disabling vsync was the cure.

 

In my own case, if I set:

 

r_swapInterval 1 anything lower than 60FPS drops to 30FPS

 

r_swapInterval 0 No 60 FPS threshold. If I uncap FPS I can go to the max 160hz

 

r_swapInterval -1 I am capped to 60FPS but I do not drop to 30FPS when I go below 60FPS

 

If it behaves differently on other hardware\drivers it would be good to know whether there is any logic to that

or if it's just vendors falling outside of standards compliance.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Right, so Adaptive VSync does indeed solve the half-framerate problem and behave in the way that nbohr suggested, however triple buffering should also solve this (at least with vanilla Doom 3; perhaps something is different in the standalone mod which makes triple buffering behave differently).

 

Therefore I would suggest trying triple buffering first, because it should avoid the half framerate without negating the benefits of vsync (removing tearing). If triple buffering doesn't solve the problem, Adaptive VSync ought to be a solution (if the game does support it).

Link to comment
Share on other sites

From my experience and some, now rather antique articles about Adaptive VSync and the AMD equivalent...

Adaptive VSync is only good and some rumour works only when Triple Buffering is also enabled.

 

My personal experience has always been that in-game VSync is terrible, and any adaptive VSync is bad, only through Control Panel is it actually good and with Triple Buffering enabled.

 

Also, it seems that "Maximum Pre-Rendered Frames" does make a huge difference in mouse responsiveness, I tried this comparing 1 to 4, using a very cheap gaming mouse.

 

I haven't tried anything in here, but I'm going to give it a try, with OpenGL's and Nvidia's Adaptive VSync.

Link to comment
Share on other sites

My personal experience has always been that in-game VSync is terrible, and any adaptive VSync is bad, only through Control Panel is it actually good and with Triple Buffering enabled.

 

What does it mean for VSync to be "terrible" versus "bad" vs "good"? VSync does one specific thing (link buffer swaps to monitor refresh to avoid tearing), so I don't understand how you can have good or bad vsync. Do you mean the in-game settings do not work, or that you get screen tearing even with VSync supposedly enabled?

Link to comment
Share on other sites

 

What does it mean for VSync to be "terrible" versus "bad" vs "good"? VSync does one specific thing (link buffer swaps to monitor refresh to avoid tearing), so I don't understand how you can have good or bad vsync. Do you mean the in-game settings do not work, or that you get screen tearing even with VSync supposedly enabled?

 

Oh yes, sorry, I should have explained better.

 

By what I mean is that the dreaded "60 to 30 FPS" (I have 60hz, numbers will vary for other refresh rates), the occasional stutters and the mouse input lag happens way more often than usual.

 

Using traditional VSync, be it from the game or the control panel has the same effect and gives the cons of using VSync.

 

Using Adaptive VSync is more like a gamble, it may work or it may not work, if it works it may work wrongly (like traditional VSync) or rightfully.

If I enable Adaptive VSync in my Control Panel, enable Triple Buffering and switch Maximum Pre-Rendered Frames to 1, it will work and mostly better than other VSync, I will still have mouse input lag (and it's as good/bad as traditional VSync) but when I reach lower than 60 FPS, VSync is disabled and I don't have that feeling that it runs at 30 FPS, but I do get screen tearing.

Occasional stutters also happen, but not as often as with traditional VSync, on this one I am very sure it's just a placebo effect though, but it's possible that the fact Adaptive VSync is automatically disabled when lower than your refresh rate is what causes that stutter.

 

As a side note worth mentioning, there's also Fast Sync, but I highly discourage it for The Dark Mod unless you play heavily optimized maps, where FPS is never lower than your double (If you have 60, you need 120 FPS, even if it's not counted).

It's pretty much VSync without any feeling that VSync is used, but if your FPS gets lower than 120 (or higher, again his is dependent on refresh rate), even 119 will cause extreme stuttering and mouse input lag.

Edited by The Black Arrow
Link to comment
Share on other sites

Right, so Adaptive VSync does indeed solve the half-framerate problem and behave in the way that nbohr suggested, however triple buffering should also solve this (at least with vanilla Doom 3; perhaps something is different in the standalone mod which makes triple buffering behave differently).

 

Therefore I would suggest trying triple buffering first, because it should avoid the half framerate without negating the benefits of vsync (removing tearing). If triple buffering doesn't solve the problem, Adaptive VSync ought to be a solution (if the game does support it).

You can force TB in the driver control panel and it works nicely in TDM (first create a dedicated profile).

BUT it adds a little bit of input latency (not really a problem in stealth-oriented single player games like TDM).

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

 

Oh yes, sorry, I should have explained better.

 

By what I mean is that the dreaded "60 to 30 FPS" (I have 60hz, numbers will vary for other refresh rates), the occasional stutters and the mouse input lag happens way more often than usual.

 

Using traditional VSync, be it from the game or the control panel has the same effect and gives the cons of using VSync.

 

Using Adaptive VSync is more like a gamble, it may work or it may not work, if it works it may work wrongly (like traditional VSync) or rightfully.

If I enable Adaptive VSync in my Control Panel, enable Triple Buffering and switch Maximum Pre-Rendered Frames to 1, it will work and mostly better than other VSync, I will still have mouse input lag (and it's as good/bad as traditional VSync) but when I reach lower than 60 FPS, VSync is disabled and I don't have that feeling that it runs at 30 FPS, but I do get screen tearing.

Occasional stutters also happen, but not as often as with traditional VSync, on this one I am very sure it's just a placebo effect though, but it's possible that the fact Adaptive VSync is automatically disabled when lower than your refresh rate is what causes that stutter.

 

As a side note worth mentioning, there's also Fast Sync, but I highly discourage it for The Dark Mod unless you play heavily optimized maps, where FPS is never lower than your double (If you have 60, you need 120 FPS, even if it's not counted).

It's pretty much VSync without any feeling that VSync is used, but if your FPS gets lower than 120 (or higher, again his is dependent on refresh rate), even 119 will cause extreme stuttering and mouse input lag.

Yes but why force TB if you use Adaptive Sync? Or you mean "these are different solutions for the same problem....." ?

There's another recent challenger to monitor Sync management, S-Sync via RTSS:

 

https://forums.blurbusters.com/viewtopic.php?f=2&t=4173

https://forums.guru3d.com/threads/requesting-scanline-sync-tutorial.423722/#post-5602543

 

Scanline sync is, as far as I'm aware, user controllable tearline steering, which means it isn't technically a form of V-SYNC at all, but a V-SYNC OFF method that mimics the look of traditional V-SYNC, but without the lag.

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

I guess the real future solution for these issues is FreeSync, but I haven't had the chance to try it out yet. My graphics card does support it, but my monitor doesn't, and I'm not shelling out another 500 quid or more to replace a perfectly decent monitor just to experiment with FreeSync.

Link to comment
Share on other sites

Yes but why force TB if you use Adaptive Sync? Or you mean "these are different solutions for the same problem....." ?

There's another recent challenger to monitor Sync management, S-Sync via RTSS:

 

https://forums.blurbusters.com/viewtopic.php?f=2&t=4173

https://forums.guru3d.com/threads/requesting-scanline-sync-tutorial.423722/#post-5602543

 

Scanline sync is, as far as I'm aware, user controllable tearline steering, which means it isn't technically a form of V-SYNC at all, but a V-SYNC OFF method that mimics the look of traditional V-SYNC, but without the lag.

 

Triple Buffering works for Adaptive VSync too, it's not some fancy thing like Fast Sync after all, it's just VSync but automatically disabled when your frames reach lower than 59 frame, although it takes a small millisecond or two to disabale.

 

S-Sync sounds interesting, but it looks like Nvidia's Fast Sync with another name (the second link mentions it acts almost the same as).

 

I guess the real future solution for these issues is FreeSync, but I haven't had the chance to try it out yet. My graphics card does support it, but my monitor doesn't, and I'm not shelling out another 500 quid or more to replace a perfectly decent monitor just to experiment with FreeSync.

 

It beats G-Sync though, at least AMD don't add their value price upon monitors just because they support FreeSync.

Link to comment
Share on other sites

It beats G-Sync though, at least AMD don't add their value price upon monitors just because they support FreeSync.

 

Indeed. That and their nonexistent support for open-source drivers are the reasons I won't touch nVidia with a ten-foot pole.

Link to comment
Share on other sites

Well, G-Sync works better (and costs more) 'cause it needs some dedicated HW in a certified monitor. FreeSync doens't need it but its performance (in frame-chasing ) is also affected.

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...