What triple buffering is responsible for

Going back to our 75Hz 100fps example. When Vsync is enabled, the artifacts disappear. When the rendering speed in especially complex scenes drops to about 60 fps and VSync is enabled, the real frame rate drops by almost half. .

In other words, vertical sync combined with double buffering is only good if the rendering speed does not drop below the refresh rate, as otherwise performance drops dramatically.

Agree, it would be strange if engineers did not find a solution to this problem. In order to prevent the rendering speed from falling due to waiting for the primary buffer to become free, a triple buffering technology was developed - that is, it was added to the scheme described above one more framebuffer, thanks to which the card can not wait for the primary buffer to be released and calculate the picture in this third buffer.

Triple buffering works as follows (at 50 fps rendering and 75 Hz monitor refresh rate). The first frame is in the primary buffer, two-thirds of the second frame is processed in the secondary buffer.

After the screen is refreshed with the first frame, the last third of the second frame is sent to the secondary buffer, and a third of the third frame starts to be rendered in the third buffer. After the second screen refresh, the second frame is copied to the primary buffer by the first frame, and the first third of the third the frame is moved to the secondary buffer.

The remaining two-thirds of frame number three are processed in the third buffer, the screen is first refreshed with the second frame, and frame three is completely transferred to the back buffer, and then this process is repeated from the beginning.

As you can easily calculate, in this case, two frames are displayed on the screen in three refresh cycles, which is two-thirds of the refresh rate, that is, 50 frames per second, and this is the full potential rendering speed for this example. Thanks to the triple buffering scheme, the idle time of the video card is minimized, and, as you can see, this gives very good results.

Unfortunately, not all computer games support triple buffering. Besides, it takes up computing resources and a certain part of video memory. However, there is no alternative to this technology for obtaining high-quality images at low rendering speeds. p>

After reading this material, some may have a question: is it worth enabling vertical sync in the settings of the video card or is it better to disable it. There is no definite answer to this question. Obviously, if you just want to look at that your video card is capable of and "run" some synthetic or game tests, then it is better to disable VSync.

In this case, you are not going to enjoy the picture or the gameplay, but just want to get information about the maximum performance of the video card in certain units. By the way, all GPU tests are carried out with disabled vertical sync, so in real In game situations, the map may turn out to be noticeably slower than it was mentioned in this or that test.