Originally posted by: nullpointerus
[ 1 ][ 2 ][ 3 ][ 4 ][ 5 ][ 6 ][ 7 ][ 8 ][ 9 ] ( <-- time intervals of unspecified units )
[ x ][ _ ][ _ ][ _ ][ x ][ _ ][ _ ][ _ ][ x ] ( <-- x=frame, _=wait )
Right?
awesome ... that is right ... you showed triple buffering .... let me add double plus vsync
[ 1 ][ 2 ][ 3 ][ 4 ][ 5 ][ 6 ][ 7 ][ 8 ][ 9 ]
[ x ][ _ ][ _ ][ _ ][ x ][ _ ][ _ ][ _ ][ x ]
ok... so the x is a vertical refresh. lets say each number is an even interval of time between renders. if a frame can render in each interval you get this (lower case letters for spacing):
[ 1 ][ 2 ][ 3 ][ 4 ][ 5 ][ 6 ][ 7 ][ 8 ][ 9 ]
[ A ][ B ][ c ][ d ][ E ][ F ][ G ][ H ][ I ]
[ X ][ _ ][ _ ][ _ ][ x ][ _ ][ _ ][ _ ][ x ]
now ... here's what you see with double buffering:
[ 1 ][ 2 ][ 3 ][ 4 ][ 5 ][ 6 ][ 7 ][ 8 ][ 9 ]
[ A ][ B ][ _ ][ _ ][ B ][ F ][ _ ][ _ ][ F ]
[ X ][ _ ][ _ ][ _ ][ x ][ _ ][ _ ][ _ ][ x ]
here's what you get with triple buffering:
[ 1 ][ 2 ][ 3 ][ 4 ][ 5 ][ 6 ][ 7 ][ 8 ][ 9 ]
[ A ][ B ][ c ][ d ][ d ][ F ][ G ][ H ][ H ]
[ X ][ _ ][ _ ][ _ ][ x ][ _ ][ _ ][ _ ][ x ]
here's what you get with NO VSYNC
[ 1 ][ 2 ][ 3 ][ 4 ][ 5 ][ 6 ][ 7 ][ 8 ][ 9 ]
[ A ][ B ][ c ][ d ][dE][ F ][ G ][ H ][HI]
[ X ][ _ ][ _ ][ _ ][ x ][ _ ][ _ ][ _ ][ x ]
so .... summary:
double buffering + vsync has the most delay between the input you gave and what happens on the screen. you see frames "A" "B" and "F" with lots of input lag
triple buffering shows you the most recently completed frame with the most recent input update. you see frames "A" "d" and "H" with as little input lag as a completed frame can have.
no vsync gives you either the most recently completed frame or a combination of the most recently completed frame + the portion of the next most recently completed frame torn on the display. you see frames "A" "dE"(possible tear) and "HI"(possible tear) with the same input lag as triple buffering in the d and H parts but less input lag in the E and I parts.
i think bfg is actually thinking that in the no vsync situation frames "B" "c" and "d" will all be SEEN ... they are, in fact, "dropped" by the monitor. the monitor will not display any frames between vertical refreshes ... period. you ALWAYS "see" 60fps on a monitor whose refresh is 60fps because that is as many frames as it is capable of drawing in one second. period.
the reason a higher fps gives better performance is because that means the most recently rendered frame is closer in time to the vertical refresh and the image is smoother.
triple buffering accomplishes this as well as possible without tearing. no vsync gives the least input lag with only the torn part of the screen that represents the actual frame currently being swapped in in the middle of a vertical refresh.
Bottom line: triple buffering does not inherently introduce significantly more input lag than running with no vsync, and the advantage is only in the torn part of your screen even so.
monitors cannot display more than their refresh rate even if your game can render frames and swap buffers at 400 fps. the only thing that means is that the monitor will be drawing from a front buffer that gets swapped out in the middle of a refresh and could show tearing.
YOU ALWAYS ONLY SHOWN EXACTLY 60 FRAMES IN ONE SECOND IF YOUR MONITOR REFRESHES AT 60fps.
whether all frames are different (game renders faster), some are the same (game renders slower) or some frames are split between two images (no vsync), you are always "dropping" frames.