Monday, November 13, 2006

Screen Tearing Explained

You may have heard of gamers complaining of screen tearing in forums and posts and may be wondering what the heck they were complaining about. If you have a device that can output a large number of frames per second (fps) such as a computer or a gaming console, - then depending on your output display device such as your computer monitor or your TV and its settings, you may experience screen tearing if your fps is way more than your TV can handle.

What is screen tearing and how does it affect me?
To understand the screen tearing effect, you need to understand the rate at which your gaming console or computer sends images to the display device. This rate is measured in frames per second and is the number of frames that are composed by your gaming console or computer and updated to the output display panel (your TV for example) per second. A high fps indicates a powerful gaming engine (hardware and software) and results in a very smooth image on your screen - assuming your TV can handle it.

Wait a minute - what was that again? Yes - that's right - your TV needs to be able to handle it and draw each frame on the screen as quickly as your gaming console, such as the XBox 360, can output the frame. So for instance consider this sequence of events:



  1. Gaming console generates frames at 24 fps

  2. The first frame is generated by the console and sent to your TV

  3. The TV accepts this frame and is busy repainting the screen with this image

  4. While the TV is repainting the image, along comes the next frame, even before the TV has had a chance to update the first frame

  5. What happens now is that the second frame starts updating on the top of the first frame and you have an old frame and a new frame at the same time on your TV

  6. The clean horizontal split between the old frame and the new frame looks like a tear as the image gets distorted at that point causing a screen tearing effect.

  7. As the console outputs more frames than the TV can handle, this effect can be come quite pronounced and be very distracting and unpleasant to watch.


Here is what it looks like (click on the image to view a larger image):





How do I avoid it?
The way to avoid this is to match your fps with the refresh rate of your output display device. This is handled with a flag called the VSYNC flag - that needs to be turned on - your game or your TV setup screen may have this setting. Turning the VSYNC flag on means that the output device will not start drawing a new frame on screen until it has had a chance to completely display the old one. This means that you may generate say 24 frames per second, but your display will only be able to display 12 frames per second if that's all that it can handle without the screen tearing effect. Double and triple buffering techniques can be used in either the software drivers or hardware to hold the extra frames in memory while the current frame is being rendered - however this approach requires more memory for it to work.

3 comments:

aacool said...

Hi,

I am the publisher of Desicritics.org , a leading online magazine related to media, gaming, culture, politics, sports and more with a global South Asian perspective. I'd like to invite you to write for Desicritics - more info on Desicritics is available here: http://desicritics.org/2006/01/25/205846.php

Please email me at aamanlamba at gmail dot com and I'll get you set up.

Lal said...

Hi,

Hats off to you. Very useful information.

FoxFire said...

"A high fps indicates a powerful gaming engine"

That is wrong. A high FPS means you're using a more powerful system. Not engine. It so happens that the more powerful the game, the less FPS you're bound to get.
Take Crysis for example: a very powerful game engine, however most gaming machines churn out very low FPS in this game.