Long gone are the days of Mario breaking blocks and punching monsters with his two-dimensional eight-bit fists. Today’s games are far more what is vsync advanced; they offer spell-bounding visuals, heroic quests, and all-round thrilling experience.
All of this has been made possible by ever-improving gaming consoles and computers. The devices and components used to run these games are advancing at such a rapid pace that every now and then, they outdo each other, making some parts compatible to run these state of the art games at their maximum performance. This causes problems like having a GPU that is so fast that our monitor is unable to keep up with it.
This causes graphical errors in the game, making the display output look like it has been cut to pieces by a samurai. Game developers work tirelessly on creating and improving the graphics of a game, and they are also a vital part of the gameplay. Hence issues like the can ruin the entire gaming experience. And this is where technologies like Vsync jumps into action to save the day.
Table of Contents
The word Vsync is an acronym for vertical sync, but what is Vsync, and what exactly is the use of this toggle button that can be seen in settings of many video games? Vsync is basically a graphics technology that is used to synchronize a game’s FPS (frames per second) or frame rate with the refresh rate of the gaming monitor.
This synchronization helps in making the graphics smoother and to prevent screen tearing. Screen tearing happens when the frame rate of a game is higher than the refresh rate of the monitor. And monitor tries to display portions of different frames together instead of separately, which in turn results in graphics appearing as broken or in a split-screen. This causes an otherwise beautiful game to look terrible and full of glitches.
So what is Vsync’s role here? Vsync steps in to ensure that the frame rate of the game does not exceed the refresh rate of the monitor. This helps the monitor in handling the graphics as Vsync allows the drawing of frames onto the display only after the monitor is finished with its refresh cycle. So we see no screen tearing when Vsync is turned on.
The need for Vsync
What is Vsync’s necessity and functions? To understand this, let’s take a look at how graphics work on a computer. Every screen of every laptop or mobile phone, even the one you are looking at right now, never displays a single still image but a number of photos one after the other called frames.
Whenever we are watching a movie, playing a game, or just moving our mouse cursor, it is these frames that make it seem like a smooth transition video, while in reality, it is just a collection of frames being displayed at a very high rate one after the other. And the rate at which these frames are displayed is known as a frame rate or FPS.
These frames are generated by a GPU or graphical processing unit of the computer or device. GPU then sends these frames to the display unit or monitor to be displayed. The monitor refreshes its screen several times in one second to display each frame. And the rate at which the monitor refreshes its screen is known as refresh rate, which is measured in hertz (Hz), which is a measure of frequency.
The problem of screen tearing occurs when the frame rate exceeds the refresh rate of the monitor. For example, if we are running a game at 120 frames per second. But the refresh rate of our monitor is only 60 Hz; then the monitor will not be able to keep up with the fast pace of frame rates. This is why Vsync is needed to keep the frame rate less than or equal to the refresh rate of the monitor. Let’s look in detail as to how this is achieved.
Our display unit, the monitor, draws an image multiple times in a second (its refresh rate), and this number usually never fluctuates. On the other hand, our GPU also renders an image multiple times in one second (frame rate). But this number can and does fluctuate. And this is the reason behind screen tearing.
The graphical processing unit of the computer has its own dedicated memory called VRAM, and VRAM is equipped with a particular spot for frames knowns as the frame buffer. This buffer is divided into two parts, namely primary (front) pad, and secondary (back) buffer. As soon as a frame is ultimately rendered, it is stored in the primary buffer so that it can be sent to the display unit during the refresh. While this happens, GPU uses the secondary buffer to render the next frame.
This sounds like a disciplined, well organized process, but there is a problem. Buffer swaps can take place at any moment. When the monitor gives the signal that it is ready for another refresh, GPU responds by sending it a frame, but this might happen while there is a buffer swap already underway. This occurs because the GPU’s frame rate usually exceeds the monitor’s refresh rate, which we learned before. As a result of which monitor receives multiple frames and tries to display them all at once.
So if the view changes between those frames, the on-screen display looks split into various parts. The top portion of the screen displays one picture, and the bottom portion shows a different one. This issue is mostly seen when the camera moves horizontally, making the virtual scene look staggered. And since the frames get registered vertically, like the projector film in a cinema hall, screen tearing is not seen vertically and only seen I horizontal fashion.
This is the complete answer to “What is Vsync’s duty?” Vsync takes control of the buffer swapping process and does not allow buffering until the display does a successful refresh. To put it simply, turning on Vsync prevents the frame rate from crossing the refresh rate. So if the monitor has a refresh rate of 30 Hz, then it does not matter how powerful the GPU is, the frame rate will not cross 30 FPS. FPS nearly gets a locked under a ceiling, whose height is equal to the refresh rate.
This screen tearing solution comes with a cost. When we enable the Vsync option, and our computer’s graphical processing unit is not able to maintain a stable frame rate. One that matches the refresh rate of the display unit, there will be a visible issue. The displayed feed will lose its fluidity and will appear to be stuttering. This is because the GPU is not able to provide a new frame to the monitor. When it refreshes, and hence the monitor is forced to restore the same frame twice while it waits for the GPU to send a new structure.
In an attempt to bring order to things, Vsync once again takes charge and reduces the frame rate to fifty percent value of the monitor’s refresh rate. But this leads to another problem, one that gamers across the globe hate, lag! This happens because the computer continues to receive and understand the inputs given to it by the user. But its GPU is simply not allowed to generate frames fast enough. This causes a significant delay between the information provided and the related responses to appear on the screen.
This lag also depends upon the type of engine that the game is running on as well as the refresh rate of the monitor in use. The higher the refresh rate lesser will be the lag. But even a little lag can be troublesome, especially when it comes to online or competitive gaming where the margin of error is razor-thin and even a delay of milliseconds can be the deciding factor between victory or defeat.
Nothing spoils the gaming experience like lag does. So what is Vsync’s utility if it is going to cause lag? Why should we use it in the first place? Well, if you are just a casual gamer with a monitor that has a decent refresh rate, it might not be a big problem that cannot be tolerated. But if you are a professional gamer or game streamer, then there are a few alternatives that we can use.
Browsing through the game settings, we can find another solution, the triple buffering option. Turning on triple buffer changes the way GPU typically works. It starts using three buffers instead of the original two. GPU keeps one primary pad but adds an additional secondary buffer.
Now what this option does is it eliminates the process of buffer swapping as soon as the monitor wants a screen refresh, one of the secondary buffers. That has a completed frame converted into a primary protector, and it provides the new structure to monitor. This process is repeated every time.
No screen tear occurs because buffer swapping has been eliminated, and there is no lag as well. So triple buffering provides both the things. Firstly beautiful graphics with no screen tearing, and secondly, a lag-free smooth gaming experience.
Few other alternatives are Enhanced Sync (By AMD) and AdaptiveSync (By Nvidia). Both of the above options, when turned on, activate Vsync and monitor the frame rate as well. If the frame rate falls below the monitor’s refresh rate, they automatically turn off Vsync to prevent lag.
Another solution is FastSync (By Nvidia); it turns on Vsync when needed and complements it with triple buffering to ensure the best available performance. This option gets the job done, but it has its own downside that it consumes a lot of power to function.
Should one use Vsync?
The answer to this question depends on two things; personal preference and the type of set up available. Suppose you are not too concerned with graphics and don’t mind a bit of screen tearing here. There is no need to gamble with frame rates by turning on Vsync.
On the other hand, if graphics are imperative to you, then the best case would be to get a monitor with a high refresh rate. After this, Vsync can take care of thins. Suppose need be and just in case if that is not enough. Enhanced Sync and FastSync etc. are also available.
Frequently asked questions
- What is Vsync?
- Vsync is a software solution to prevent screen tearing in games and other software. It can be toggled on and off from the graphic settings menu of a game.
- What is screen tearing?
- Screen tearing is a visual error that occurs in games when a game’s frame rate exceeds the display unit’s refresh rate. It causes the display to appear staggered or fractured.
- How to stop screen tearing?
- Screening can be prevented by turning on the Vsync option from the graphic settings menu in a game.
- Is the frame rate the same as the refresh rate?
- No, both terms have different meanings. Frame rate or FPS (frames per second) is the number of frames that a graphical processing unit (GPU) can create or render in one second. The refresh rate is the number of times a monitor can refresh its display in one second; it is measured in hertz (Hz).
- What is the best frame rate?
- According to Thomas Edison, our eyes need a minimum of 46 frames per second to perceive motion, and a frame rate less than that will result in straining our eyes. Going by these stats, 60 frames per second is a reasonable frame rate for gaming, but our eyes can see much faster speeds as well.
- Which is the best option between FastSync, Enhanced Sync, and AdaptiveSync?
- FastSync delivers the best performance but also consumes the most power.
- What is meant by a lag in gaming?
- Lag or lagging in a game refers to the delay between inputs given in a fun and their display output. It causes the game to look like it is working in slow motion.