The hidden dark side to vsync

SonicIce

Diamond Member
Apr 12, 2004
4,771
0
76
What is vsync?
Vsync is an option in some modern 3D games and in videocard driver control panels to eliminate a phenomenon called "tearing". It's a slight image quality increase.
(I fabricated the vsync off image so it looks rather extreme, but it shows what tearing looks like since it doesn't show up in screenshots.)
Vsync off (tearing)
Vsync on (no tearing)

Some people think tearing only occurs when your framerate goes above your monitors refresh rate. This is not true because tearing can occur when your framerate is well below your refresh rate. Vsync does more than simply cap your games' framerate at your monitors refresh rate. In an attempt to prevent tearing even further, vsync will take your framerate and lock it at half of what your monitors refresh rate is. I tested with my monitor at 75Hz, so the games framerate hovered around 37fps or 38fps (75 / 2 = 37.5). It's up to you whether you'd rather play your games at 37fps without tearing, or somewhere around 50fps with tearing. Personally I would take the higher framerate.

I created a custom timedemo in Half-Life 2 and used Fraps to record the framerate every second. (Sorry I don't have any software to make a graph out of this data :() The first column is with vsync on, the seccond with vsync off. The y axis is time.

Vsync:
on -- off
FPS FPS
36 - 36
42 - 55
45 - 55
58 - 66
43 - 40
33 - 48
39 - 49
38 - 47
38 - 62
36 - 50
40 - 52
39 - 56
37 - 63
38 - 54
37 - 60
38 - 59
37 - 50
38 - 47
37 - 52
38 - 60
38 - 54
37 - 57
37 - 50
38 - 53
37 - 55
38 - 65
38 - 66
37 - 60
37 - 65
38 - 60
38 - 45
37 - 52
38 - 52
42 - 44
38 - 41
37 - 43
38 - 54

The "vsync on" column acually extended further because it took longer to complete the timedemo since the game was running slower, but I cut it off to save space. Notice how the framerate tends to stick around 37-38fps, half of my refresh rate. But with vsync off, I could be playing at something like 60fps, a much more pleasurable experience in my opinion. Vsync does have its uses. If you're playing an older game that never drops below your refresh rate, go ahead and enable vsync. You paid for that fancy videocard to get high framerates, don't turn vsync on and ruin it.
I found a Toms Hardware article from October 1998 that kind of backs up what im saying here. Article
"it seems also advisable to disable VSYNC even for normal game play."
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Except that your data contradicts this:

Vsync:
on -- off
FPS FPS
36 - 36
42 - 55
45 - 55
58 - 66
43 - 40

Four of your first 5 numbers show that it can't be "locked at" 37/38.

I've never used fraps, but could it be counting bursts above 75 Hz that can't actually be displayed (e.g. a 2/75-second segment that was easy to render so the game pumped out a useless 3rd frame)?
 

SonicIce

Diamond Member
Apr 12, 2004
4,771
0
76
I'm having second thoughs on using HL2 for testing. I don't know how it records demos. I also don't know exactly how vsync works, its not ALWAYS 37 or 75, maybe it takes some tenths of a second to change framerates and fraps took a measure when it was in the middle of changing rates. When vsync on column says 43fps and the off column says 40fps, they are acually in a differant part of the timedemo. Don't compare one side directly to the other. Just look at them as a whole.

Vsync on had an average framerate of 38.
Vsync off had an average framerate of 53.
 

NokiaDude

Diamond Member
Oct 13, 2002
3,966
0
0
Your computer is possesed. Vsync works fine on my computer. My LCD refresh rate is set to 60 so Vsync caps it at 60. FRAPS tells me I get 60FPS with Vsync enabled.
 

SonicIce

Diamond Member
Apr 12, 2004
4,771
0
76
Originally posted by: NokiaDude
Your computer is possesed. Vsync works fine on my computer. My LCD refresh rate is set to 60 so Vsync caps it at 60. FRAPS tells me I get 60FPS with Vsync enabled.

Maybe it's an Nvidia thing :confused: or 6600 GT thing more specifically? put more stress on it to see if it changes to 30fps.
what videocard do you have?
 

theMan

Diamond Member
Mar 17, 2005
4,386
0
0
all i know, is in some games, my comp gets really fcuked and even locks without vsync. if its fine without it, i dont use it.
 

NokiaDude

Diamond Member
Oct 13, 2002
3,966
0
0
Originally posted by: SonicIce
Originally posted by: NokiaDude
Your computer is possesed. Vsync works fine on my computer. My LCD refresh rate is set to 60 so Vsync caps it at 60. FRAPS tells me I get 60FPS with Vsync enabled.

Maybe it's an Nvidia thing :confused: or 6600 GT thing more specifically? put more stress on it to see if it changes to 30fps.
what videocard do you have?

7800GTX
 

NokiaDude

Diamond Member
Oct 13, 2002
3,966
0
0
It must be the driver for your POS Compaq 17" CRT. Why don't you upgrade and buy a 17" LCD like everyone else?
 

SonicIce

Diamond Member
Apr 12, 2004
4,771
0
76
so you're all saying it only caps the framerate at your monitors refresh rate? if this was true then why would vsync ever be turned off?
 

pcgeek11

Lifer
Jun 12, 2005
22,373
4,983
136
Originally posted by: NokiaDude
Your computer is possesed. Vsync works fine on my computer. My LCD refresh rate is set to 60 so Vsync caps it at 60. FRAPS tells me I get 60FPS with Vsync enabled.

On an LCD the refresh rate means NOTHING as far as this discussion. The LCD doesn't have electron guns etc... The LCD has all of those little electronic devices instead of Phosphor dots.

pcgeek11
 

NokiaDude

Diamond Member
Oct 13, 2002
3,966
0
0
Originally posted by: pcgeek11
Originally posted by: NokiaDude
Your computer is possesed. Vsync works fine on my computer. My LCD refresh rate is set to 60 so Vsync caps it at 60. FRAPS tells me I get 60FPS with Vsync enabled.

On an LCD the refresh rate means NOTHING as far as this discussion. The LCD doesn't have electron guns etc... The LCD has all of those little electronic devices instead of Phosphor dots.

pcgeek11

Nooooo no no no. Tearing DOES occur on LCD's. Trust me, I game with vsync now because I hated the tearing. I use a Samsung 930B with an EVGA 7800GTX. I know the refresh rate doesn't matter with an LCD but it does affect what vsync caps the FPS.
 

rbV5

Lifer
Dec 10, 2000
12,632
0
0
Quite simply, with vsync enabled and triple buffering off, if your framerate dips below your monitors refresh rate, it will cut the framerate to half the refresh rate.

Example: Using 60Hz monitor refresh setting, game framerate will drop to 30fps if vsync is enabled with triple buffering set to off if your PC can't deliver 60+fps.
 

SonicIce

Diamond Member
Apr 12, 2004
4,771
0
76
Originally posted by: rbV5
Quite simply, with vsync enabled and triple buffering off, if your framerate dips below your monitors refresh rate, it will cut the framerate to half the refresh rate.

Example: Using 60Hz monitor refresh setting, game framerate will drop to 30fps if vsync is enabled with triple buffering set to off if your PC can't deliver 60+fps.

whoa, your serious? you only get the halfed framerate with triple buffering off? is there any downside to triple buffering? how do i enable TB?
 

rbV5

Lifer
Dec 10, 2000
12,632
0
0
whoa, your serious? you only get the halfed framerate with triple buffering off? is there any downside to triple buffering? how do i enable TB?


*It uses addition Vram, (if you are using AA especially) if you run out of Vmem, you swap to AGP (or system memory)
*AFAIK, For DX, it has to be supported in-game, OGL generally can be forced at the driver level if its not supported in-game.
* It really only helps with vsync enabled.
 

FlyingPenguin

Golden Member
Nov 1, 2000
1,793
0
0
Utter nonsense. If your framerate is being halved by using VSync then you have some other technical issues you need to explore. For one thing crank down your resolution maybe. I love people who bitch about low FPS when they're trying to run a game at 1600 x 1280 with FSAA turned on.

I play most of my games at 1024 x 768 except older games like DoD which I'll play at 1280x. I'll trade resolution for snappy performance any day.

I've been a serious gamer since Doom 1/Duke Nukem days. Only time I ever tolerated vsync being disabled was when 3D cards only put out 23 fps. In those days the 1 or 2 fps improvement by disabled VSync was worth the tearing.

Once hardware broke the 60fps mark I've had vsync on and never looked back. I hate image tearing.

I have a rock stable 75 FPS in all my games with Vsync enabled and triple buffering.

I suggest any of you experiment for yourselves and make up your own minds, but on any modern system, VSync is a no brainer.

 

pcgeek11

Lifer
Jun 12, 2005
22,373
4,983
136
Originally posted by: NokiaDude
Originally posted by: pcgeek11
Originally posted by: NokiaDude
Your computer is possesed. Vsync works fine on my computer. My LCD refresh rate is set to 60 so Vsync caps it at 60. FRAPS tells me I get 60FPS with Vsync enabled.

On an LCD the refresh rate means NOTHING as far as this discussion. The LCD doesn't have electron guns etc... The LCD has all of those little electronic devices instead of Phosphor dots.

pcgeek11

Nooooo no no no. Tearing DOES occur on LCD's. Trust me, I game with vsync now because I hated the tearing. I use a Samsung 930B with an EVGA 7800GTX. I know the refresh rate doesn't matter with an LCD but it does affect what vsync caps the FPS.

I didn't say tearing doesn't occur on LCD Monitors I said that the refreash setting in windows doesn't mean anything to an LCD Monitor... That is all.

pcgeek11

 

SonicIce

Diamond Member
Apr 12, 2004
4,771
0
76
Originally posted by: FlyingPenguin
Utter nonsense. If your framerate is being halved by using VSync then you have some other technical issues you need to explore. For one thing crank down your resolution maybe. I love people who bitch about low FPS when they're trying to run a game at 1600 x 1280 with FSAA turned on.

I play most of my games at 1024 x 768 except older games like DoD which I'll play at 1280x. I'll trade resolution for snappy performance any day.

I've been a serious gamer since Doom 1/Duke Nukem days. Only time I ever tolerated vsync being disabled was when 3D cards only put out 23 fps. In those days the 1 or 2 fps improvement by disabled VSync was worth the tearing.

Once hardware broke the 60fps mark I've had vsync on and never looked back. I hate image tearing.

I have a rock stable 75 FPS in all my games with Vsync enabled and triple buffering.

I suggest any of you experiment for yourselves and make up your own minds, but on any modern system, VSync is a no brainer.

how do you know triple buffering is enabled in the games your playing?
 

rbV5

Lifer
Dec 10, 2000
12,632
0
0
Utter nonsense. If your framerate is being halved by using VSync then you have some other technical issues you need to explore.

How does vsync work? My understanding with double buffering, the framebuffer is split into 2 (dependant on the screen resolution and color depth), a frame is rendered to the back buffer by the graphics card, then swapped to the front buffer when finished and displayed to the screen through the DAC.

With vsync enabled, the back buffer is only copied to the front buffer when the electron gun is at the top of the screen(it will be at the top depending on the monitor refresh rate setting(speed)). If the graphics card can't draw the back buffer fast enough to complete the entire frame, the front buffer does not change until a complete frame is drawn...effectively reducing the framerate to exactly 1/2, or even 1/4 of the monitors refresh rate with vsync enabled.

With triple buffering, the framebuffer is split into 3, allowing for 2 back buffers. With vsync enabled, both back buffers are drawn before 1 swaps to the front buffer, now the graphics card can draw 1 back buffer, and start the 2nd back buffer if the electron gun hasn't reached the top line yet.

So, vsync can half (or more) your framerate if your card can draw frames twice as fast as the electron gun travels, or again, if it can't draw a single frame as fast as the gun travels.

If your card draws them too fast, with vsync enabled...no tearing...too slow with vsync enabled, the frame will wait to the next refresh, and your framerate drops in half or worse.

I'm no graphics programmer, but thats my understanding of the basic principles involved. LMK where I'm in error.
 

natto fire

Diamond Member
Jan 4, 2000
7,117
10
76
Originally posted by: NokiaDude
It must be the driver for your POS Compaq 17" CRT. Why don't you upgrade and buy a 17" LCD like everyone else?

I don't have an LCD, so your point is moot. Except, of course, your statement that Compaq CRTs are crap.
 

SonicIce

Diamond Member
Apr 12, 2004
4,771
0
76
Originally posted by: Captain_Howdy
Originally posted by: NokiaDude
It must be the driver for your POS Compaq 17" CRT. Why don't you upgrade and buy a 17" LCD like everyone else?

I don't have an LCD, so your point is moot. Except, of course, your statement that Compaq CRTs are crap.

i think he was talking to me :p unless you have a compaq crt also.

anyways i asked 2 of my friends to perform the same test I did and they got the same results. thanks rbV5 for explaining this more in depth
 

ponyo

Lifer
Feb 14, 2002
19,688
2,811
126
Originally posted by: rbV5
Quite simply, with vsync enabled and triple buffering off, if your framerate dips below your monitors refresh rate, it will cut the framerate to half the refresh rate.

Example: Using 60Hz monitor refresh setting, game framerate will drop to 30fps if vsync is enabled with triple buffering set to off if your PC can't deliver 60+fps.

This is my understanding as well.
 

Auric

Diamond Member
Oct 11, 1999
9,591
2
71
Originally posted by: Naustica
Originally posted by: rbV5
Quite simply, with vsync enabled and triple buffering off, if your framerate dips below your monitors refresh rate, it will cut the framerate to half the refresh rate.

Example: Using 60Hz monitor refresh setting, game framerate will drop to 30fps if vsync is enabled with triple buffering set to off if your PC can't deliver 60+fps.

This is my understanding as well.

Yeah. Forcing D3D TB is possible with ATI Tray Tools. In my experience though, some games like BF1942 run better with vsync off and I don't know that I've ever really seen tearing.
 

Dewey

Senior member
Mar 17, 2001
453
0
71
Originally posted by: rbV5
Quite simply, with vsync enabled and triple buffering off, if your framerate dips below your monitors refresh rate, it will cut the framerate to half the refresh rate.

Example: Using 60Hz monitor refresh setting, game framerate will drop to 30fps if vsync is enabled with triple buffering set to off if your PC can't deliver 60+fps.

There you go! If you frame rate drops below the vysnc value it will draw on the next frame, so every other frame = 1/2 vysnc value. Over the vsync you should be locked at vsync.
 

dguy6789

Diamond Member
Dec 9, 2002
8,558
3
76
Here is how it is.

You use vsync to get rid of tearing. Vsync will make your maximum FPS the same as your moniter's refresh rate.

HOWEVER, vsync WILL make your general fps lower than without it, EVEN IF YOUR FPS IS BELOW YOUR REFRESH RATE ANYWAY.

Vsync is a performance hurting, image quality improving feature just like AA or AF.