[quote]soit c’est en dessous et il skip une frame sur 2.[/quote]Ok, c’est bon, j’ai enfin compris !
I’m having difficulties understanding this behavior. Could you clarify why would it drop to 1/2?"
If the game can’t generate a new frame for every Vsync, it needs to wait for the next Vsync. Thus the frame buffer gets rendered every other Vsync, effectively dropping the frame-rate by half
Par contre, ce qui ce passe en realité est un peu plus complexe, vu que le framerate change tout le temps…
Un exemple, et l’explication qui va bien avec…
Any of you have checked their minimum framerates when VSYNC is on or off? I have some data from FRAPS (http://www.fraps.com) while playing UT2004:
Vsync ON
2004-04-12 16:00:23 - UT2004
Frames: 4756 - Time: 93582ms - Avg: 50.822 - Min: 29 - Max: 61
Vsync OFF
2004-04-12 16:03:07 - UT2004
Frames: 6787 - Time: 88385ms - Avg: 76.789 - Min: 51 - Max: 112
Those frame drops are noticeable in Far cry too when I look at some video hungry scenes. They do not happen when VSYNC if off.
if vsync is enabled: let’s say your refresh rate is 60 Hz (as his is). Now, let’s say that your system is only capable of rendering 59 frames per second. In other words, each frame that could be rendered is completed just after the screen starts to refresh. Now, instead of running at 59 fps (with tearing), you will get 30 fps for min, avg, and max. Ouch! That’s sort of the worst case scenario, but it’s still not what really happens.
Here’s what really goes on. The complexity of a given scene will change as you move around in the game. Scenes with low complexity might render at 100 fps and scenes with high complexity might render at 30 fps, but the average will be somewhere inbetween. Generally speaking, fram rate fluctuations between a few frames will be minimal, so if frame 555 takes 1/50 of a second to render, the preceding and following frames will probably take close to 1/50 of a second as well. However, over time you will have slowdowns, i.e. an explosion suddenly increases scene complexity for 1 or 2 seconds. Now, if your system can’t render a frame in less than one refresh cycle, the minimum frame rate for a sequence of frames will drop down to 1/2 of your refresh rate (the worst case scenario). If it can’t render in two refresh cycles, your minimum rate would drop to 1/3 of your refresh rate, or 1/4 for missing rendering in 3 cycles, etc
Look at his numbers, and you’ll see this. With no vsync, his max rendering speed was 112 fps, or 1/112 seconds per frame. Generally speaking, then, he maxes out at rendering 1 frame in a cycle and can almost render 2, so 60 fps max (61 in his case). His max sits at his refresh rate. The min he got was 51 fps, which is now lower than his refresh rate, so with vsynch he now ends up at 30 fps (29 in his case). The average will obviously be inbetween these two extremes, and in his case it looks like about 66% of the time he is rendering at faster than 60 fps and 33% of the time he is slower than 60 fps. (Mathematically: 2/3 * 60 + 1/3 * 30 = 150/3 = 50)
Now, let’s say he bumps up to an 85 Hz refresh rate. He can now max out at 85 fps (he won’t get higher than that since his system never renders at 170 fps or higher), and if he can always render at greater than 42.5 fps, his min will be 42.5. Well, looking at his non-vsync scores, he can do this, so his min fps and max fps increase by roughly 33%, and the average will likely be much closer to the 77 fps he gets with vsync disabled. If he maintained the 2-to-1 ratio of his 60 Hz rates, he would now have an average of 73 fps. Of course, he probably won’t, so his average will be more like 65 to 70 fps, but that’s a big step up from 50 fps
So what’s more important? High frame rates or high refresh rates? Personally, I think it’s a middle ground. You want frame rates of 60+ fps, but you also want the image quality that vsync gives. If you have a really nice monitor, any refresh rate of 120 Hz or more will make the question more or less meaningless. Worst case, you would get 60 fps (assuming your system is fast enough). Otherwise, you need to live with either lower frame rates or image tearing. Sorry. 
[/quote]Ce message a été édité par TeK le 06/08/2004