Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 08-Oct-2004, 14:37   #1
skazz
Junior Member
 
Join Date: Aug 2004
Location: The Netherlands
Posts: 87
Default triple buffering - what does it do exactly?

Hi,

I have searched around a bit, but not yet found a succinct answer to my question.

I understand that triple buffering separates the direct link between rendering and screen refresh, and for instance allows vsync (1-to-1 link between frames rendered and frames displayed on screen, yes?) to be achieved with less of a performance hit, but what I would like to know is whether triple buffering is even remotely necessary if you are running a CRT monitor and have no real need for vsync.

In the game Richard Burns Rally there is no vsync option from within the setup, but there is a triple buffering option, which has got me even more confused as to what is what.

Could someone post me a link to a site which explains vsync and triple buffering - both the positive aspects and the performance hit on modern GPU architecture?

cheers, Skazz
skazz is offline   Reply With Quote
Old 08-Oct-2004, 15:38   #2
RejZoR
Member
 
Join Date: May 2004
Location: Europe\Slovenia\Ljubljana
Posts: 300
Default

VSync synchronizes vertical screen refresh with ingame framerate (removes image tearing)

Double Buffer
http://c2.com/cgi/wiki?DoubleBuffer

Triple Buffer
http://c2.com/cgi/wiki?TripleBuffer
__________________
Intel Core i7 920 | 6 GB RAM | ASUS Rampage II Gene | Sapphire HD6870 Toxic | WD Caviar Black 2TB | Auzentech Forte | Altec Lansing MX5021 2.1
RejZoR is offline   Reply With Quote
Old 08-Oct-2004, 15:50   #3
kyleb
Senior Member
 
Join Date: Nov 2002
Posts: 4,165
Default

I'm not sure what you were trying to explain with the first part, but I can tell you that triple buffering does absolutely nothing without vsync. With double buffering there is a backbuffer for the monitor to draw to and frontbuffer for the monitor to draw from. With vsync, the monitor must finish drawing the current in the frame in frontbuffer before moving the next frame from the backbuffer up to be drawn by the monitor. Triple buffering simply gives a third buffer to draw to so the videocard does not have to sit idle waiting for the buffers to flip. So it uses a little vram but, unless you are close to running out of vram to being with, it won't have any notable impact on performance.
kyleb is offline   Reply With Quote
Old 08-Oct-2004, 16:47   #4
RejZoR
Member
 
Join Date: May 2004
Location: Europe\Slovenia\Ljubljana
Posts: 300
Default

He asked on what Vsync does and whats the positive side of it.
__________________
Intel Core i7 920 | 6 GB RAM | ASUS Rampage II Gene | Sapphire HD6870 Toxic | WD Caviar Black 2TB | Auzentech Forte | Altec Lansing MX5021 2.1
RejZoR is offline   Reply With Quote
Old 08-Oct-2004, 17:04   #5
kyleb
Senior Member
 
Join Date: Nov 2002
Posts: 4,165
Default

Vsync, as I explained above, simply synchronizes the frame swaps so that the monitor can draw the full frame before moveing to the next one. That is the postive side of it as well; without vsync you wind up with each refresh being a composite of different frames, and with movement you get discontinuity between those frames known as tearing.
kyleb is offline   Reply With Quote
Old 08-Oct-2004, 17:11   #6
skazz
Junior Member
 
Join Date: Aug 2004
Location: The Netherlands
Posts: 87
Default

Thanks for the answers... I hope you don't mind answering a few additional questions

My conclusion would be that the benefits of vsync therefore require that your video card is capable of producing enough fps to provide 1 frame per refresh. However, this would imply requiring the video card to deliver 85/100Hz on a CRT and 60/72 Hz on a TFT, which is rather high for many games...

Say I want 100Hz, what happens if my video card can't provide the full 100Hz refresh rate in game?

As for that tearing. Is it an equal problem on TFTs and CRTs? I play lots of games on my CRT with fixed 100Hz refresh rate, no vsync, and therefore would expect much tearing. Yes, when the view changes at high speed (e.g. spin round in FPS or racing game) I see the odd tear, but the rest of the time I don't notice any. Does that mean that I am right in assuming that tearing is more of a TFT issue?
skazz is offline   Reply With Quote
Old 08-Oct-2004, 17:28   #7
thegrommit
Member
 
Join Date: Oct 2003
Posts: 192
Default

Quote:
Originally Posted by skazz

As for that tearing. Is it an equal problem on TFTs and CRTs? I play lots of games on my CRT with fixed 100Hz refresh rate, no vsync, and therefore would expect much tearing. Yes, when the view changes at high speed (e.g. spin round in FPS or racing game) I see the odd tear, but the rest of the time I don't notice any. Does that mean that I am right in assuming that tearing is more of a TFT issue?
Lower your resolution so that your framerate is higher than your CRT's refresh rate and see what happens. A specific example would be to play the original UT's Deck16 map. Walk into the corridor with the flak cannon and flickering light.
thegrommit is offline   Reply With Quote
Old 08-Oct-2004, 18:34   #8
kyleb
Senior Member
 
Join Date: Nov 2002
Posts: 4,165
Default

The benefit of vsync quite simply no tearing and vsync will always do that regardless of framerate, so being able to keep up with your refresh isn't an issue on it's own. On the other hand, Being limited to two framebuffers becomes an issue with vsync as the videocard is often left waiting for the monitor to finish it's current refresh. So, taking your 100hz example, if the videocard cannot keep up with 100hz it must work at some fraction of that; be it 50fps, 33.3fps, 25fps or so on. Triple buffering solves that issue by providing space for the videocard to continue drawing to instead of sitting ilde until the buffer flip comes with a new refresh.

As for tearing, it doesn't matter what kind of display is used, having the framebuffer swaps synchronized with the refresh rate is the only way to stop it. It isn't always noticeable simply because some situations mask it's appearance more than others. For instance, imagine looking at a wall with vertical stripes. While moving side to side the top portion of the screen will likely show a frame with the stripes in a different location than the portion on the bottom; if the videocard managed more than two frames during that refresh then there will be more fragments of frames showing the stripes at different offsets in between. Now take that same wall, and move back and forth from it. Now the stripes are simply getting larger and smaller; so unless your framerate is really low or you are moving really fast, the contrast between the various fragments of frames displayed will not be particularly noticeable.

Granted, in some situations tearing is more apparent at high framerate like in the case thegrommit mentioned. It is all relative to movement between the rendered frames and the fact that the monitor draws left to right, line by line, from top to bottom.
kyleb is offline   Reply With Quote
Old 08-Oct-2004, 18:53   #9
skazz
Junior Member
 
Join Date: Aug 2004
Location: The Netherlands
Posts: 87
Default

Thanks once again for the very clear explanation.

And I read in another post on b3d that NVidia drivers don't allow you to set triple buffering for games globally, so you are reliant on the game itself. This means setting my example Richard Burns Rally to vsync via drivers and enabling triple buffering in settings for the game itself would get me vsync with very little performance hit, I hope.

As for other games : Vsync penalty is thus to a certain extent dependent on whether or not triple buffering is available. I know in Doom 3 I get something like 20% performance hit with my 6800LE (only 128MB RAM) when enabling vsync without worrying about triple buffering, so I get the idea that I'll only use it when I actually suffer noticeable lack of playability due to tearing.
skazz is offline   Reply With Quote
Old 08-Oct-2004, 19:47   #10
kyleb
Senior Member
 
Join Date: Nov 2002
Posts: 4,165
Default

The only real "performance hit" with triple buffering and vsync is the fact that your framerate can never exceed your refresh rate; Which really isn't anything to be concerned with in game where the lows in framerate are what we have to worry about. Benchmark, On the other hand, is artificially limited by vsync by simply capping the framerate with triple buffering and even more so by forcing the videocard to work with intervals of the refresh rate with double buffering. This is why you see such a large drop in your Doom3 benchmark and why one should always turn vsync off for benchmarking. But in game it comes down to the minimum framerate; and where you can keep things above 50fps with vsync off you can do the same with vsync on at 100hz. In a game like Doom3 that isn't very realistic, but in less demanding games one can easily get smooth gameplay out of vsync with just double buffering provided they can accomplish a high enough refresh rate.

As for Nvidia drivers, they quite simply don't have very good support for triple buffering. It works just fine, in the sense that you can force it on though the application in D3D, but it defaults to off so one can only get triple buffering on Nvidia hardware on the few games D3D that do alow you to call for triple buffering. Opengl on the other hand doesn't have a way an application to call for triple buffering leaving the only way to get it is for the drivers to force it, but Nvidia doesn't provide that option.

No need to thank me either, I have my own selfish reasons for thourghly explaining all this. I figure the more people who understand this issue the more chance there is of Nvidia changeing it's stance, and I'd like my 6800gt a lot better if they did.
kyleb is offline   Reply With Quote
Old 09-Oct-2004, 07:04   #11
SmuvMoney
Junior Member
 
Join Date: May 2003
Location: Chicago, IL
Posts: 67
Send a message via ICQ to SmuvMoney Send a message via AIM to SmuvMoney Send a message via MSN to SmuvMoney Send a message via Yahoo to SmuvMoney
Default

kyleb, I actually RMA'ed my 6800 GT because I couldn't get OpenGL triple buffering to work. I was too used to it with my previous ATi cards.
__________________
Peace & God Bless,

$muvMoney
John 14:27 & Numbers 6:24

A64 3500+ 939 | Epox 9NDA3+ | 1 GB RAM | X800XT PE | Audigy2 ZS | 120 GB HD | 3com 3C905C-TX | USR 56K | Thermaltake Tsumani | Silent Purepower 410W PSU
SmuvMoney is offline   Reply With Quote
Old 14-Oct-2004, 11:13   #12
jolle
Member
 
Join Date: Apr 2004
Posts: 145
Default

shame you cant force it in OGL like in Catalysts.. handy in OGL games, which arent that many tho, but still (HL+mods mainly hehe)..
DirectX prohibits forcing of TB in drivers for D3d, I´ve heard atleast..
jolle is offline   Reply With Quote
Old 14-Oct-2004, 15:45   #13
kyleb
Senior Member
 
Join Date: Nov 2002
Posts: 4,165
Default

You heard right. The drivers can default it to on though for d3d so it is on unless the app calls for it off, which ati drivers do.
kyleb is offline   Reply With Quote
Old 14-Oct-2004, 18:41   #14
phenix
Member
 
Join Date: Feb 2003
Location: Cambridge, MA
Posts: 620
Default

Why it is not possible to force triple buffering in D3D via control panel. That would be really cool. In openGL I usually use Vsync and Triple buffering on all the time in the control panel.
Tearing is very noticeble and I dont want to compromise IQ by turning vsync off. I think it is as important as AA.
phenix is offline   Reply With Quote
Old 14-Oct-2004, 19:34   #15
kyleb
Senior Member
 
Join Date: Nov 2002
Posts: 4,165
Default

You shouldn't have any trouble getting triple buffering in D3D with Ati drivers every game that I know of which forces it off has an option in the config to turn it back on (aside from CS:S anyway, but you can still get triple buffering with a bit of fooling around in it).

As for why you can't force triple buffering via the D3D control panel, from what I understand it is simply how MS makes the rules.
kyleb is offline   Reply With Quote
Old 14-Oct-2004, 20:01   #16
phenix
Member
 
Join Date: Feb 2003
Location: Cambridge, MA
Posts: 620
Default

Quote:
Originally Posted by kyleb
You shouldn't have any trouble getting triple buffering in D3D with Ati drivers every game that I know of which forces it off has an option in the config to turn it back on (aside from CS:S anyway, but you can still get triple buffering with a bit of fooling around in it).
Do you mean it is "on" by default in all D3D games and you can only turn it "off" if the game allows you? I used to think that it is the opposite. It is defaulted to "off" and you can only turn it "on" if the game provides the appropriate control.

EDIT: minor things
phenix is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can anyone explain this? (About triple buffering) Broken Hope 3D Hardware, Software & Output Devices 8 06-Sep-2004 02:05
How to enable triple buffering in DirectX games? phenix PC Games 4 25-Aug-2004 17:54
Memory Hit of Triple Buffering Quitch 3D Architectures & Chips 29 21-Jun-2004 13:53
Triple Buffering Quitch 3D Architectures & Chips 1 06-Oct-2003 13:30
Triple Buffering rwolf 3D Architectures & Chips 22 22-Sep-2003 15:30


All times are GMT +1. The time now is 03:10.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.