Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

John Carmack has a tweet:

"Triple buffering adds latency and jitter; it should be avoided. The Answer is non-isochronous display updates."

Can anyone explain what he meant by adds latency and jitter?

share|improve this question

1 Answer

It adds latency because you've got 3 buffers involved instead of 2, so it takes one more frame for your rendered image to get to the screen.

I have no idea what kind of "jitter" Carmack is talking about here, though.

EDIT

Maybe, just maybe, this could make sense in a highly variable framerate context: frames rendered with a given delta-time but displayed later with a different delta, resulting in a visible jitter?

share|improve this answer
When John Carmack refers to triple buffering does that mean when all three buffers have images in them the earliest backbuffer is replaced with the new image or does that mean that mean rendering of the new image is blocked until one of the backbuffers is available? – user782220 Jul 5 '12 at 20:21
Buffer #1 is being rendered into. #2 is being displayed. #3 is waiting for a good time to replace #2 on the display. The additional latency allows rendering to continue instead of pausing for the swap like a double buffered setup. If you're done rendering before the swap then yes, you'd get some jerking because of the pauses happening two frames behind the current real time. Summary: you're using a current time to smooth out a historical render, which can vary and make for small twitches. – Patrick Hughes Jul 6 '12 at 4:05
@PatrickHughes: Your explanation of why there is jerking doesn't make sense. – user782220 Jul 6 '12 at 7:48
If you measure your interval by the previous flip, which was based on rendering from two frames ago, and then use that interval to calculate data in the current frame you're always going to be lagging the real interval by one frame. If your frames vary in time by any amount this will cause a following behavior where the game calculations don't match what will be displayed from those calculations.\ – Patrick Hughes Jul 6 '12 at 17:53
Why measure your interval from the previous flip instead of the previous frame? Every new frame usually uses the timing from the previous frame for any time-based calculations like acceleration, etc., and it shouldn't matter, whether that frame was already displayed on screen or not. – Mario Oct 28 '12 at 23:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.