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

  • velanapontinha - Friday, June 26, 2009 - link

    The eyes and brain that watch a game or a movie are the same. If there was a "Pepsi challenge"-like contest between 30fps, 60fps and 200fps, the error rate would be astronomical, and a lot of overspending gamers would feel bad about spending so much money on hardware that is able to create frames they never see - nor even miss.
  • JS - Friday, June 26, 2009 - link

    The difference is not in the frame rate, but the fact that a film is not a sequence of perfectly sharp static images (like games normally are). Motion blur is automatically introduced by the shutter time on the film camera. That is why 24 fps works for film but not so well for games.

    Most people would definitely see the difference.
  • james jwb - Friday, June 26, 2009 - link

    films also do not require the viewer to make decisions based on what they see. For a movie, fast paced movements in a war scene doesn't require the viewer to see every detail in perfect accuracy and definition, what happens next isn't your choice, you are just watching. In a game, what you see decides what you'll do, and a motion blurred to death fast movement will never suffice in some game genres. You need a compromise somewhere and with games, a higher than film frame rate will significantly help overcome this.
  • BJ Eagle - Saturday, June 27, 2009 - link

    Ahh - good point about the bluring in films...

    But heres another one then:
    In nVidia control panel (vista x64 driver ver 186.18) it clearly states under triple buffering (though only OpenGL is affected as discussed) "Turning on this setting improves performance when Vertical sync is also turned on"...
    This is not quite the impression I got from reading this article. Clearly there is still some confusion of when to enable what settings and having an article like this contradicting nVidias recommendation doesn't really help.. me at least :)
  • profoundWHALE - Monday, January 19, 2015 - link

    I'm just going to leave this here:

    http://www.testufo.com/
  • james jwb - Friday, June 26, 2009 - link

    I can see myself using triple buffering in most situations, but games like CS:S, i don't think it would be wise. For a game like this consistently high frame and refresh rates would be the preferred option. Actually that would be the preferred option for all games, but in order to do this you'd have to delay playing new, graphic intensive games for two years to allow the hardware to catch up.
  • DerekWilson - Friday, June 26, 2009 - link

    i'd still want triple buffering for CS:S ...

    for me, tearing is distracting and i use the top of my display more than the bottom (even if new data were drawn lower on the screen it wouldn't be beneficial to me).
  • james jwb - Friday, June 26, 2009 - link

    ah, see here's a point to consider as to why i said what i said. I use a CRT at 100hz, so the tearing issue becomes almost insignificant. Sure, if I was on an LCD I would agree with youm tearing in CS:S is a disaster in that scenario.
  • JarredWalton - Friday, June 26, 2009 - link

    What I really want is LCDs with a native 120Hz refresh rate and data rate. That last part is key; I want 1920x1200 at 120Hz, not 1920x1200 with 60 images and some funky software interpolating to 120Hz. It would require DisplayPort, dual-link DVI, or HDMI 1.4 (I think?), but with triple buffering that would be the best of all worlds.
  • james jwb - Friday, June 26, 2009 - link

    @ Jarred, i couldn't agree more, but you know that already :)

    If someone like HP can bring a 24" IPS 120hz to market with similar performance to their current model, I'd be in tech-drool heaven. Under this scenario, I'd play CS:S with double buffering, no v-sync, but games that were graphic intensive and could not sustain high frame rates, I'd definitely love the option of triple buffering.

Log in

Don't have an account? Sign up now