The Gamer's Graphics & Display Settings Guide

[Page 10] Graphics Settings - Triple Buffering



Triple Buffering


In the Graphics Process section of this guide under Step 8, an overview is provided of the way in which the graphics card holds rendered frames in the Frame Buffer. There are actually two buffers on modern graphics cards, the Primary Buffer and the Secondary Buffer, also often called the Front Buffer and the Back Buffer. Both are storage areas on the Video RAM of the graphics card, and the process of using two buffers at one time is called Double Buffering. It was only relatively recently that graphics cards had enough VRAM to provide two buffers at all resolutions, since a single frame of high resolution detailed graphics can take up a great deal of video memory, much less two of them.


The graphics card uses the secondary buffer to compose a new frame while the primary buffer is sending an existing completed frame to the monitor. When these tasks are done, the buffers are essentially 'flipped' around so that the recently completed frame in the secondary buffer now becomes the primary buffer ready to send to the monitor, while a new frame begins composing in what was the primary buffer a moment ago. This is repeated over and over and thus the use of two buffers means that the graphics card is not constantly waiting for a single frame buffer to be cleared before getting on with rendering more frames to store there. It's like putting out a fire using two buckets of water instead of just one - one bucket can be filled with water while the contents of the other is being thrown on the fire, and then they're switched and the process repeated; much faster than just using a single bucket.


There is still a problem with double buffering, and that is when VSync is enabled, the graphics card can often fill both buffers and then have to stop working on any new frames until the monitor indicates it is ready for a new frame for its next refresh. Only then can the graphics card clear the primary buffer, switch buffers and begin rendering the next frame in the secondary buffer. This waiting is what causes a drop in FPS when VSync is enabled on many systems, and is covered in more detail in the Vertical Synchronization section of this guide.


Wouldn't it then make sense to have more than two buffers? Why not three buffers for example - that would give the graphics card more room to render frames without having to worry about where to store them before they're sent to the monitor, even if VSync is enabled. Well there is an option which does just that, called Triple Buffering. And it generally does precisely what the name implies, it creates a third buffer in the VRAM, which we can call the Tertiary buffer.



Enabling Triple Buffering


Some games come with an option to enable Triple Buffering, either from within the in-game settings menus or using advanced tweaks (see my relevant game tweak guide). However if the game you are using does not have any such option, then you can try forcing Triple Buffering on the game using the methods below.



Enabling Triple Buffering for OpenGL-based games such as Doom 3, Quake 4, Prey or Enemy Territory: Quake Wars is very simple - go to your graphics card's control panel and enable it from there. However this won't work for enabling Triple Buffering in Direct3D-based games, which are the bulk of modern games. Instead, you will need to use a utility called Direct3D Overrider (D3DOverrider) which comes with free RivaTuner utility.


Once RivaTuner is installed, go to your \Program Files (x86)\RivaTuner...\Tools\ directory and you'll see the D3DOverrider directory. You can move this entire directory somewhere else, then uninstall RivaTuner if you don't want to keep it - Direct3D Overrider is a standalone utility which doesn't require RivaTuner. Launch the D3DOverrider.exe file and the utility will minimize to your System Tray/Notification Area. To view or alter its settings at any time, click on its icon. The default configuration in D3DOverrider is fine; that is, 'Application Detection Level' of Medium, 'Force Triple Buffering' On and 'Force VSync' On. If you want, you can set the 'Start with Windows' option to On as well, to ensure D3DOverrider is always active.


Now whenever you want to run a game with Triple Buffering, simply make sure D3DOverrider is loaded up in the background first before launching the game. As the game is launched you'll hear a small notification sound indicating that D3DOverrider is working. If VSync is enabled, then Triple Buffering will also be enabled and will work to counter the negative performance impacts of VSync.



Problems with Triple Buffering


It may seem odd that if Triple Buffering resolves the problem of low framerates when VSync is enabled, it doesn't appear as a standard option in many games, or is not enabled by default. There are three main concerns that appear to be the reason behind this:


1. If it is not properly supported by the game in question, it can cause visual glitches. Just as tearing is a visual glitch caused by information being transferred too fast in the buffers for the monitor to keep up, so too in theory, can triple buffering cause visual anomalies, due to game timing issues for example.


2. It uses additional Video RAM, and hence can result in problems for those with less VRAM onboard their graphics card. This is particularly true for people who also want to use very high resolutions with high quality textures and additional effects like Antialiasing and Anisotropic Filtering, since this takes up even more VRAM for each frame. Enabling Triple Buffering on a card without sufficient VRAM results in things like additional hitching (slight pauses) when new textures are being swapped into and out of VRAM as you move into new areas of a game. You may even get an overall performance drop due to the extra processing on the graphics card for the extra Tertiary buffer.


3. It can introduce control lag. This manifests itself as a noticeable lag between when you issue a command to your PC and the effects of it being shown on screen. This may be primarily due to the nature of VSync itself and/or some systems being low on Video RAM due to the extra memory overhead of Triple Buffering.


However it appears that most recent graphics cards and most new games will not experience major problems by enabling Triple Buffering. Given the fact that it can help to both remove tearing while also preventing the significant FPS drop encountered when VSync is enabled, it is at least worth trying for yourself to see the results on your system.