Trying to fully understand screen tearing, would love it if you guys could help me understand it fully.

Everything about displays and monitors. 120Hz, 144Hz, 240Hz, 4K, 1440p, input lag, display shopping, monitor purchase decisions, compare, versus, debate, and more. Questions? Just ask!
Post Reply
fowteen
Posts: 106
Joined: 18 Mar 2020, 16:30

Trying to fully understand screen tearing, would love it if you guys could help me understand it fully.

Post by fowteen » 15 May 2020, 13:30

So, I understand that the gpu renders as much frames as it can constantly (unless vsync or a fps cap is used) and that a monitor refreshes a certain amount of times a second (that amount correlates to the monitors refresh rate). When the amount of frames a gpu sends to the monitor doesn't match to it's refresh rate then screen tearing can happen which is when two frames (an old and new one) are still on the screen at the same time so for example if you move your camera to a different place then a certain amount of a previous image you were looking at is still on the screen. So I think that is how it works, please let me know if I messed anything up. Now I heard that screen tearing can still occur when fps = hz which I don't understand how that works. I also heard that if the fps is higher than the refresh rate then more tears can appear (from the extra frames I assume) however they go away quicker (because more up to date frames are available I assume). I also don't know how screen tearing works at fps lower than the refresh rate, for example are there more tears like when the fps is higher than hz or do the tears stay on the screen longer. I would really appreciate if you guys could correct me if I said anything wrong and answer my questions because I really find this topic interesting and would like to fully understand how all of this works.

User avatar
RedCloudFuneral
Posts: 40
Joined: 09 May 2020, 00:23

Re: Trying to fully understand screen tearing, would love it if you guys could help me understand it fully.

Post by RedCloudFuneral » 15 May 2020, 17:36

Chief went quite in depth on this in the low-input-lag thread: viewtopic.php?f=10&t=6842

The very simplified answer to tearing(when FPS is above refresh rate) is that the monitor draws the frame row by row on the monitor. When a new frame is sent to the monitor during a refresh cycle it tosses away the old one(which will have already been drawn to part of the monitor) and starts drawing the new one.

fowteen
Posts: 106
Joined: 18 Mar 2020, 16:30

Re: Trying to fully understand screen tearing, would love it if you guys could help me understand it fully.

Post by fowteen » 16 May 2020, 10:34

I read through that a bit but I can't fully understand it because I think he is talking about something else. I would really appreciate it if Chief could help answer my questions and maybe explain those pictures and how frames are displayed in a bit of detail.

User avatar
Chief Blur Buster
Site Admin
Posts: 11725
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: Trying to fully understand screen tearing, would love it if you guys could help me understand it fully.

Post by Chief Blur Buster » 19 May 2020, 09:57

fowteen wrote:
15 May 2020, 13:30
Now I heard that screen tearing can still occur when fps = hz which I don't understand how that works.
Imagine VSYNC ON as a equivalent to a special case of "tearing" inside the VBI.

But if you time the refresh cycles "a partial refresh cycle off", you will have a tearline in the middle of the screen, in exactly the same position.

So the no-tear framerate=Hz only occurs if the timing of the frame deliveries occurs inside the VBI (which contains the VSYNC), which is what VSYNC ON stands for.

Tearing will occur even at framerate=Hz if the tearline is outside the VBI (frame presentation timing is not aligned with the VSYNC). For example frame presentation being permanently half-a-refresh-cycle off or quarter-a-refresh-cycle-off.

If the frame presentation is only a tiny bit late (tiny portion of one refresh late), the tearline will be near the top edge.

If the frame presentation is half a refresh cycle off, the tearline will be at screen centre.

If the frame presentation is very late (most of a refresh late), the tearline will be near bottom edge.

Slight difference in Hz (e.g. 143fps or 145fps at 144Hz) will create a rollng tearline, rolling at the beat frequency of framerate versus refreshrate.
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

Image
Forum Rules wrote:  1. Rule #1: Be Nice. This is published forum rule #1. Even To Newbies & People You Disagree With!
  2. Please report rule violations If you see a post that violates forum rules, then report the post.
  3. ALWAYS respect indie testers here. See how indies are bootstrapping Blur Busters research!

fowteen
Posts: 106
Joined: 18 Mar 2020, 16:30

Re: Trying to fully understand screen tearing, would love it if you guys could help me understand it fully.

Post by fowteen » 19 May 2020, 11:40

Chief Blur Buster wrote:
19 May 2020, 09:57
So the no-tear framerate=Hz only occurs if the timing of the frame deliveries occurs inside the VBI (which contains the VSYNC), which is what VSYNC ON stands for.
Sorry, what is this VBI you are talking about?

flood
Posts: 929
Joined: 21 Dec 2013, 01:25

Re: Trying to fully understand screen tearing, would love it if you guys could help me understand it fully.

Post by flood » 19 May 2020, 14:00

vblank interval. the period of time when nothing on the screen is being updated.

something like this might help understand
https://arstechnica.com/gadgets/2018/01 ... er-second/

for example, you can think of the signal in your video cable like
<data for top left pixel> ... <data for bottom right pixel> <nothing, this is the vblank interval> <data for top left pixel> ... <data for bottom right pixel> <nothing, this is the vblank interval> etc

tearing occurs when the gpu updates the framebuffer between <data for top left pixel> and <data for bottom right pixel>

fowteen
Posts: 106
Joined: 18 Mar 2020, 16:30

Re: Trying to fully understand screen tearing, would love it if you guys could help me understand it fully.

Post by fowteen » 19 May 2020, 14:39

flood wrote:
19 May 2020, 14:00
the period of time when nothing on the screen is being updated.
Sorry I don't understand this. I though a monitor basically refreshes constantly at whatever speed the refresh rate is?

flood
Posts: 929
Joined: 21 Dec 2013, 01:25

Re: Trying to fully understand screen tearing, would love it if you guys could help me understand it fully.

Post by flood » 19 May 2020, 14:53

example
suppose your monitor is running at 100Hz, and you have a 2ms vblank interval

at time
0ms: monitor is updating pixel 1 (top left corner)
4ms: monitor is updating the middle pixel of the monitor
8ms: monitor is updating the last pixel (bottom right corner)
between 8ms and 10ms: nothing is happening, this is the vblank interval
10ms: monitor is updating pixel 1 again
etc

fowteen
Posts: 106
Joined: 18 Mar 2020, 16:30

Re: Trying to fully understand screen tearing, would love it if you guys could help me understand it fully.

Post by fowteen » 19 May 2020, 15:36

sorry I still have no understanding on this. I have no previous understanding in all of this aswell so it might be hard for me to learn all of this. I think I will just try to read some wikis and do some reasearch by myself to understand all of this. Thanks for trying to help though.

User avatar
Chief Blur Buster
Site Admin
Posts: 11725
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: Trying to fully understand screen tearing, would love it if you guys could help me understand it fully.

Post by Chief Blur Buster » 26 May 2020, 21:44

Lesson:

1. Not all pixels refresh at the same time

#1 important lesson!
To understand how a display refreshes, please see these high speed videos:
High speed videos of scanout

TestUFO Test That Flashes 4 Pictures In Rapid Flicker Fashion (for high speed cameras)
For a test www.testufo.com/scanout (Try it now if you're not epileptic!). it will display 4 images in a rapid sequence at full frame rate. Now point a Samsung Galaxy camera at ultra-slo-mo 960 frames per second at that test. The resulting high speed video (ultra-slow-motion) looks like this on a common TN LCD:

>>> Play This Video First <<<
phpBB [video]

(There's more videos at High speed videos of scanout including fast/slow LCDs and OLEDs)

Play the above video now, before reading the below post
It will help you understand better (really).

You'll realize displays refreshes 1 pixel at a time, like a calendar, left-to-right, top-to-bottom. Just like a calendar that that is 1920 days wide (per week) and 1080 weeks tall. Imagine refreshing one pixel at a time, super-fast -- dislay panels have to be a superhero (like superman) in refreshing pixels really fast.

Imagine trying to record a 2D picture over a 1D medium (wire). It has to be serialized one pixel at a time. That's why it's done this way, because it's not possible to transmit a whole picture instantaneously all at the same time, it has to transmit one pixel at a time through the cable wire -- literally. (Advanced detail, it might compress a whole row, or packetize, but it's still a defacto one continuous serial sequence of binary numbers like 10101010's). This is the art of the raster scanning mechanism, true from 1930s analog television broadcasts, all the way to 2020s DisplayPort cables.

The matter of fact, is that cables deliver 1 pixel row at a time top-to-bottom, and most displays often refresh 1 pixel row a time, top-to-bottom. Some displays (DLP, Plasma) may have to convert to different refreshing patterns, but the simplest refresh pattern is the raster-based top-to-bottom refresh.

Now, if you map it out to a graph, the graph looks like this:

Image

The VBI (vertical blanking interval) is the tiny pause after a refresh cycle finishes "sweeping", but before next refresh cycle begins. Be noted, that the sweep is the instantaneous beginning of the LCD GtG, and not the GtG momentum that trails behind.

The VBI can be tiny (short pauses between scanout sweeps in video), or can be huge (long pauses between scanout sweeps in video)

Image

Now, if you use VSYNC OFF, frame presentation no longer waits for VSYNC, and can "splice in realtime" into scanout.

Image

VSYNC OFF can also be metaphorically be thought as real-time streaming of frameslices into the middle of display scanout.

Stationary tearlines occur when frame rates are similar to Hz, so the next tearline occurs at approximately the same tearline location:

Image

Also, if you increase VSYNC OFF frame rate, it can become huge numbers of tiny frame slices:

Image

Now study this again:
1. Not all pixels refresh at the same time
This is the most important lesson! You should be watching the video before looking at the pictures in this post.

Lessons Learned
1. Not all pixels refresh at the same time
2. Screens refresh from top-to-bottom in one sweep
3. Blanking interval (VBI) is the pause between sweeps
4. "VSYNC" comes from "Vertical Sync" which is a portion of VBI ("Vertical Blanking Interval").
5. "VSYNC ON" means wait for VBI before switching frames (don't interrupt the scanout with new frame)
6. "VSYNC OFF" means don't wait for VBI before switching frames (interrupt the scanout, tear in a new frame)

Do you understand better?
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

Image
Forum Rules wrote:  1. Rule #1: Be Nice. This is published forum rule #1. Even To Newbies & People You Disagree With!
  2. Please report rule violations If you see a post that violates forum rules, then report the post.
  3. ALWAYS respect indie testers here. See how indies are bootstrapping Blur Busters research!

Post Reply