So you can have a tear-free gaming experience
Vsync is an option that you’ll see in most PC video games and sometimes even in other applications. But what is Vsync? What does it do? Should you switch it on or off?
The answer to this is complicated, but once you understand the purpose of Vsync you’ll know when to switch it on or leave it off.
What Is Vsync?
The first thing you need to know is that your monitor can show a certain number of discrete images every second. This is known as the refresh rate, which is how many times the monitor can completely refresh the image on-screen with something new.
If you don’t already know, the illusion of moving pictures on a screen is created by rapidly displaying a sequence of still images. Each image shows the subject in a different slice of time. Most movies you watch in the cinema are filmed at 24 frames per second. So you see 24 slices of time shown within each second.
There’s also plenty of content recorded at 30 and 60 frames per second. Action camera footage, for example, is typically recorded at 60 frames per second.
The more unique frames that can be shown in one second, the smoother and sharper motion appears. Your brain merges the frames together and perceives it as a moving picture.
In a computer system, the GPU (graphics processing unit) prepares frames to be sent to the display. However, if the display isn’t ready for a new frame because it’s still working on drawing the previous one, it can cause a situation where parts of different frames are displayed at the same time. Vsync is meant to prevent this situation, by syncing the frames from the GPU to the refresh rate of the monitor.
Typical Refresh Rates
The most common display refresh rate out there is 60Hz. That is, 60 refreshes per second. Most computer monitors and televisions offer at least this much.
You can also buy computer monitors in a variety of refresh rates, which include; 75Hz, 120 Hz, 144 Hz, 240 Hz and 300 Hz. There may be other oddball numbers as well, but these are typical, with higher refresh rates being rarer outside specialized gaming systems.
Televisions are almost all 60 Hz units, with 120 Hz sets now entering the mainstream market along with the latest generation of gaming consoles that support that refresh rate.
Matching Frame Rates to Refresh Rate
The refresh rate of the screen doesn’t have to match the frame rate of the content exactly. For example, if you’re playing 30 frames per second video on a 60Hz display, then you just need to display two identical frames at 60Hz, totaling 30 unique frames.
24fps footage poses a challenge, since 24 does not divide neatly into 60. There are different ways to solve this. Some screens use a form of video conversion known as a “pulldown” that compensates for the mismatch at the cost of running the content at a slightly different speed than intended.
Many modern displays can also switch to different refresh rates. So a TV might switch to 48 Hz or even 24 Hz to get perfect synchronization with 24fps footage. 120Hz TVs don’t have to do this, since 24 divides evenly into 120.
When to Use Vsync
With video games, frames aren’t produced in such an ordered fashion as with film or video. Left without any limiters, the CPU, GPU, and game engine try to produce as many frames as possible. However, since the workload that the game engine puts on these components can vary, the frame rate may fluctuate.
As mentioned above, when the GPU is sending frames that are not in sync with the monitor’s refresh rate, you’ll get that tell-tale screen tearing look where different parts of the image don’t line up.
When you activate Vsync, your GPU only sends out a frame to be displayed when the monitor is ready to draw a new frame, also effectively limiting the rate at which frames are rendered. But this can actually cause yet another issue that results from how frames are “buffered”. Next, we’ll discuss two common types of frame buffering.
Double- Versus Triple- Buffered Vsync
A “buffer” is a region of memory that’s designated as a waiting area to be read when some other device or process is ready for it. When your GPU renders a frame, it’s written to a buffer. Then the screen reads the frame from that buffer to draw it.
So-called “double buffering” is the norm today. There are two buffers, taking turns to act as the “front” and back” buffer. The display draws the frame from the front buffer, while the GPU writes to the back buffer. Then the two buffers switch roles and the process repeats.
Without Vsync, the two buffers can be swapped at any time. So it’s possible that the screen will draw part of each buffer in the frame, which results in tearing. When you switch Vsync on, that tearing does go away. However, if the GPU doesn’t manage to finish writing to the back buffer in 1/60th of a second, that frame is skipped. This results in an effective 30 frames per second.
Unless your computer can consistently render 60 frames per second, you’re liable to experience either a locked 30fps or wildly swinging framerates snapping between 30 and 60.
Triple-buffering adds a second back buffer, which means that there’s always a frame ready to be swapped to the front buffer, making it possible to have odd numbers such as 45 or 59 frames per second on a 60 Hz screen. If you’re given the option, triple-buffering is always a good option.
Enhanced Vsync Types
Graphics card makers continue to grapple with screen tearing and other artifacts caused by screen tearing. Each major manufacturer has come up with advanced versions of Vsync that try to offer all the benefits without the drawbacks.
Nvidia has AdaptiveSync and FastSync, each with their own intelligent approach to Vsync. The former only switches on Vsync if a game’s frame rate is equal or higher than the refresh rate. Should it drop below that, Vsync is disabled, eliminating buffer latency. The latter solution is better as it enables triple buffering and provides the highest frame rate without tearing.
AMD has Enhanced Sync, which is like AdaptiveSync.
Vsync Versus Variable Refresh Rate
Both technologies let the monitor and GPU talk to each other in such a way that frames are synced with near flawless precision. In other words, all drawbacks of Vsync are addressed here.
The main caveat is that the monitor itself has to support the technology. It’s rare to find monitors that support both standards, but Nvidia has recently relented and added FreeSync support for certain monitors. You can also attempt activating FreeSync on monitors not whitelisted by Nvidia, but the results may not be great in some cases.
So let’s summarize what you need to know about using Vsync:
- If your game cannot sustain a frame rate equal to or above your monitor’s refresh rate, enable triple buffering or lower the refresh rate.
- If your GPU offers a more advanced version of Vsync, it’s worth trying out.
- G-Sync and FreeSync are desirable alternatives to Vsync if you have access to them.
- If you want the minimum of input lag for competitive gaming, switch off Vsync and live with the screen tearing, if variable refresh is unavailable.
Those are the basics of what Vsync is. Now get out there and have some fun with a tear-free gaming experience.