|
|
This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (October 2009) |
Screen tearing is a phenomenon in video where a newly rendered frame overlaps a previously rendered frame, creating a torn look as edges of objects (such as a wall or a tree) fail to line up. This occurs when the video card or the software using it begins updating the actively-displayed memory in a manner that is out of sync with the monitor's refresh rate.
Tearing can occur with most common display technologies and video cards, and is most frequently seen on systems where horizontally-moving visuals are commonly found, such as in slow camera pans in a movie, or classic side-scrolling video games. The material being shown may also exhibit vertical stretching or shrinking, or repeated parts of images, during vertical motion, depending on the nature of the video.
Prevention
The ways to prevent video tearing are dependent on the technology of the display device and video card, the software in use, and the nature of the material being shown. In most cases, the rendering engine must start by directing all graphics updates to an off-screen buffer, and then use the data in that buffer to update the active display in a predictable, perhaps linear, fashion.
Most systems will use this function along with one or both of these two methods:
V-sync
Vertical synchronization is an option found in most systems, wherein the video card is prevented from doing anything visible to the display memory until after the monitor has finished its current refresh cycle.
During the vertical blanking interval, the driver would order the video card to either rapidly copy the off-screen graphics area into the active display area (double buffering), or treat both memory areas as displayable, and simply switch back and forth between them (page flipping).
When vertical synchronization is in use, the effective frame rate of the rendering engine will exactly equal the monitor's refresh rate, if it was higher. Although this feature normally results in improved video quality, it is not without trade-offs in some cases. When one wishes to benchmark a video card or rendering engine, it is generally implied that the hardware and software render the display as fast as possible, without regard to monitor's capabilities or the resultant video tearing. Otherwise, the monitor and video card will effectively throttle the benchmarking program, causing it to generate invalid results.
Vertical synchronization can also lead to artifacts in video and movie presentations, as they are generally recorded at somewhat low frame rates (usually 24 to 30 FPS). When such a movie is played on a monitor set for a typical 60 Hz refresh rate, the video player will miss the monitor's deadline fairly frequently, in addition to the interceding frames being displayed at a slightly higher rate than they were intended for, resulting in an effect similar to judder.
Video games, which have a wide variety of rendering engines, tend to benefit well from vertical synchronization, as a rendering engine is normally expected to build each frame in real time, based on whatever the engine's variables specify at the moment a frame is requested.
Beam tracing
Some graphics systems support a function wherein the software can perform its memory accesses so that they stay at the same time point relative to the display hardware's refresh cycle. In this case, the software would write to the areas of the display that have just been updated, staying just behind the monitor's active refresh point. This allows for copy routines or rendering engines which have a somewhat unpredictable throughput, as long as the rendering engine is capable of "catching up" with the monitor's active refresh point when it falls behind.
Alternatively, the software could instead stay just ahead of the active refresh point. Depending on how far ahead one chooses to stay, this method may demand code that copies or renders the display at a fixed, constant speed. Too much latency would cause the monitor to overtake the software on occasion, leading to rendering artifacts, tearing, etc.
Demo software on classic systems such as the Commodore 64 and ZX Spectrum frequently exploited these techniques, owing to the predictable nature of their respective video systems, to achieve effects that might otherwise be impossible.
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)




