Graphical Tearing under rotation

Started by
3 comments, last by fanaticlatic 11 years, 4 months ago
Hi all,

Has anyone encountered a tearing issue under rotation? If so could you share your thoughts on this.

I am having a screen tearing issue when v-syncing is ON??? By on I mean the presentation interval is set to ONE rather than IMMEDIATE; and the HResult from the creation is S_OK.

My thinking now is either the driver is overriding my games settings or there is a trick of the eye going on during the rotation.

To set the scene, I have a single circular wheel on screen rotating repeatedly about it's centre 360 degrees, this wheel covers most of the screen. The tearing appears near the bottom and top of this wheel. I am not clearing the screen just rendering over the backbuffer.

I have ran some tests originally designed to simplify the application. This meant increasing the rotation delta between frames e.g. rather than rotating 1 degree per frame we rotate 180 degree per frame. Surprisingly this seems to stop the tearing from appearing? We also tried the delta at 90, and 45 degrees and there was no tearing!

Thanks in advance,

Mark.
"I have more fingers in more pies than a leper at a bakery!"
Advertisement
I've noticed if you try for 60hz your delta time between frames is not always EXACTLY 0.016666666667f (many times not even within an epsilon of it), which isn't surprising as Windows makes no claim to be a real-time operating system.

One suggestion is to rotate the wheel by a number of degrees (or radians) that accounts for the delta time between this frame and last frame (i.e. multiply your rotation strength by delta time).
The control panel for your graphics cards is probably set to override v-sync. Check it.
You can also print the FPS easily enough to the console once every second. That would be an easy way to determine what is happening.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid


I've noticed if you try for 60hz your delta time between frames is not always EXACTLY 0.016666666667f (many times not even within an epsilon of it), which isn't surprising as Windows makes no claim to be a real-time operating system.

One suggestion is to rotate the wheel by a number of degrees (or radians) that accounts for the delta time between this frame and last frame (i.e. multiply your rotation strength by delta time).

Yes the windows timings will be out possibly by quite a margin as you say, but when you think about it that would make sense hence why I should be receiving a v-sync message that will cause the graphics system to flip its buffers so the actual frame timings shouldn't affect it. Your suggestion about updating the wheel based on time (which is how it should have been done in the first place to be honest!) is a good one, and something I shall be implementing on the next test. Thanks for the help.



The control panel for your graphics cards is probably set to override v-sync. Check it.
You can also print the FPS easily enough to the console once every second. That would be an easy way to determine what is happening.


L. Spiro

Yes the v-sync being overridden was one of my first thoughts and unfortunately that does not seem to be the case, at least I couldn't find any setting that might affect it. I did try a couple of tests with forced triple buffering, anisotropic filtering turned on and off etc. all to no avail. I should say the system only has the onboard graphics, hence why the only thing on screen pretty much is a textured quad that is being rotated. As for the FPS, our engine has the ability to display the FPS but perhaps that is giving me some false positives. I shall try forcing the FPS overlay of the directx device on it. I think that still works even using the release directx libraries.


Thanks for your thoughts folks.

Mark.
"I have more fingers in more pies than a leper at a bakery!"
I believe we have a fix for this issue.

It seems there is a blocking call in the engine code that was handled without issue on the original higher spec'd pc but creates a stutter on the test pc. It's this stutter over multiple frames that seems to cause the tearing on our wheel.

Thanks for the help everyone.
"I have more fingers in more pies than a leper at a bakery!"

This topic is closed to new replies.

Advertisement