Wrapping It Up

So there you have it. Triple buffering gives you all the benefits of double buffering with no vsync enabled in addition to all the benefits of enabling vsync. We get smooth full frames with no tearing. These frames are swapped to the front buffer only on refresh, but they have just as little input lag as double buffering with no vsync at the start of output to the monitor. Even though "performance" doesn't always get reported right with triple buffering, the graphics hardware is working just as hard as it does with double buffering and no vsync and the end user gets all the benefit with out the potential downside. Triple buffering does take up a handful of extra memory on the graphics hardware, but on modern hardware this is not a significant issue.

Just to recap, from our previous example, here are what the three frames we looked at rendering stack up side by side.

 


Triple Buffering


 

 


Double Buffering


 

 


Double Buffering with vsync


 

We've presented the qualitative argument and the quantitative argument in support of triple buffering. So, now the question is: does this data change things? Are people going to start looking for that triple buffering option more now than without this information? Let's find out.

{poll 135:300}

Regardless of the results, we do hope that this article has been helpful both in explaining an often overlooked option. While it might not be something we test with because of the issues with measuring performance, triple buffering is the setting we prefer to play with. We hope we've helped show our readers why they should give triple buffering a shot as well. 

We also hope more developers will start making triple buffering the default option in their games, as it will deliver the best experience to gamers interested in both quality and performance. There are only a handful of games that include triple buffering as a built in option, and NVIDIA and AMD drivers currently only allow forcing triple buffering in OpenGL games. This really needs to change, as there is no reason we shouldn't see pervasive triple buffering today.


UPDATE: There has been a lot of discussion in the comments of the differences between the page flipping method we are discussing in this article and implementations of a render ahead queue. In render ahead, frames cannot be dropped. This means that when the queue is full, what is displayed can have a lot more lag. Microsoft doesn't implement triple buffering in DirectX, they implement render ahead (from 0 to 8 frames with 3 being the default).

The major difference in the technique we've described here is the ability to drop frames when they are outdated. Render ahead forces older frames to be displayed. Queues can help smoothness and stuttering as a few really quick frames followed by a slow frame end up being evened out and spread over more frames. But the price you pay is in lag (the more frames in the queue, the longer it takes to empty the queue and the older the frames are that are displayed).

In order to maintain smoothness and reduce lag, it is possible to hold on to a limited number of frames in case they are needed but to drop them if they are not (if they get too old). This requires a little more intelligent management of already rendered frames and goes a bit beyond the scope of this article.

Some game developers implement a short render ahead queue and call it triple buffering (because it uses three total buffers). They certainly cannot be faulted for this, as there has been a lot of confusion on the subject and under certain circumstances this setup will perform the same as triple buffering as we have described it (but definitely not when framerate is higher than refresh rate).

Both techniques allow the graphics card to continue doing work while waiting for a vertical refresh when one frame is already completed. When using double buffering (and no render queue), while vertical sync is enabled, after one frame is completed nothing else can be rendered out which can cause stalling and degrade actual performance.

When vsync is not enabled, nothing more than double buffering is needed for performance, but a render queue can still be used to smooth framerate if it requires a few old frames to be kept around. This can keep instantaneous framerate from dipping in some cases, but will (even with double buffering and vsync disabled) add lag and input latency. Even without vsync, render ahead is required for multiGPU systems to work efficiently.

So, this article is as much for gamers as it is for developers. If you are implementing render ahead (aka a flip queue), please don't call it "triple buffering," as that should be reserved for the technique we've described here in order to cut down on the confusion. There are games out there that list triple buffering as an option when the technique used is actually a short render queue. We do realize that this can cause confusion, and we very much hope that this article and discussion help to alleviate this problem.

Digging Deeper: Galloping Horses Example
Comments Locked

184 Comments

View All Comments

  • The0ne - Friday, June 26, 2009 - link

    I truly believe this article and the arguments are really for the hardcore gamers. I game myself but rarely do I care for the few minor issues that occur every now and then. If you're not a hardcore gamer it's really not an issue whether you have any of these options on.
  • OblivionLord - Friday, June 26, 2009 - link

    What i would like to see in the tests is multiple passes and some custom test runs ingame using while frabs to capture the framecount.. not just complete synthetic benching using either the ingame timedemo or a custom timedemo. This way things are a bit more realistic to how the benches reflect gameplay performance.

    Also throw in the Min and Max framerates for those that want to know. Not just limit us to the AVG.

    This triple buffering issue is just small fries compared to the overall method of how this site conducts its tests to other sites.
  • ereetos - Friday, June 26, 2009 - link

    In some games, extremely high FPS will distort the physics in games (e.g. quake, call of duty)

    with your video card rendering 125 fps, you can move faster than people running 60fps, shoot faster, and jump further. When you bump that up to 250 fps, you have an increased advantage which is why multiplayer gets capped to 250fps by punkbuster software.

    If you enable triple buffer, but no vsync, will this still be the case? or will the game engine interpret it as a lower frame rate?
  • DerekWilson - Friday, June 26, 2009 - link

    it is impossible to disable vsync and enable triple buffering.

    the point of triple buffering is to allow one buffer to remained locked all the way through a vertical refresh cycle so that there is no corruption while still allowing the game to have two buffers to bounce back and forth between.

    i was unaware of the punkbuster "feature" ... i imagine that since the game would report only 60 FPS with triple buffering, even if you were getting the lag advantage of something like 300 FPS, that it would not be limited in that case.

    but i don't know how punkbuster works, so i could very well be wrong.
  • Dynotaku - Friday, June 26, 2009 - link

    So here's a question. I have a 120hz LCD. I run it with vsync disabled, and in for instance CoD4, I get around 90FPS most of the time. No tearing that I can really detect.

    So with a 120hz monitor, is triple buffering still better or is it a case where it doesn't make that much difference as long as you're getting 60+ FPS?
  • JarredWalton - Friday, June 26, 2009 - link

    If you enabled VSYNC, you'd get 60FPS, while with triple buffering you should get 90FPS still (but with perhaps slightly more latency).
  • Dynotaku - Friday, June 26, 2009 - link

    I guess my question is, is it better to disable vsync or enable triple buffering? It probably doesn't matter much at 90 FPS. I'm running without vsync and I don't see any tearing and the framerate is amazing an really fluid.
  • DerekWilson - Friday, June 26, 2009 - link

    if you have a real 120hz refresh, triple buffering would be even better as there would be no tearing and the maximum additional lag added by triple buffering would be cut in half.

    Running at 90 FPS on a 120 Hz monitor, triple buffering would still be the best option.
  • jp777cmoe - Saturday, July 18, 2009 - link

    with or without vsync on? i have a 120hz monitor.. not sure if i should go no vsync + triple buffering or vsync with triple buffering
  • vegemeister - Tuesday, August 6, 2013 - link

    He would get "90 FPS", but since his monitor is not running at 90Hz, what he would actually see is a ridiculous amount of judder.

Log in

Don't have an account? Sign up now