Sign in to follow this  

Tearing with high frame rate

This topic is 2846 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm seeing tearing with my geometry if i get close and try to move the camera angle very quickly. The frame rate however is well over 100 FPS. One question is how can the image be tearing at all with a frame rate that high? Next is what to do about it?

Share this post


Link to post
Share on other sites
The image is tearing exactly because the framerate is high. If the frame rate is higher than the monitors refresh rate you will generate more than one frame per monitor vertical sync, so instead of drawing a single full frame you get a mix of two (or more) frames. The tear is the interface between these two frames.

It's easily fixed: Enable vsync. Generating more frames than the monitors refresh rate is wasted anyway.

Share this post


Link to post
Share on other sites
I haven't used DX10 myself, but a quick look through the SDK docs indicates that you can set the refresh rate in the DXGI_MODE_DESC part of swap chain description when calling CreateDeviceAndSwapChain. Set the refresh rate to match the monitors refresh rate.

To find the monitors refresh rate (or the desktop refresh rate anyway) use IDXGIOutput::FindClosestMatchingMode.

Share this post


Link to post
Share on other sites
Yes, I am already doing that. The refresh rate in the description does match the monitor. So if that truely limits the rate, I'm still wondering then the tearing is occuring.

Share this post


Link to post
Share on other sites
Quote:
Original post by benryves
You could lock to the monitor's refresh rate by calling IDXGIOutput::WaitForVBlank() in your rendering loop. I'm not sure if there's a way to do this automatically (in Direct3D9 you'd set the PresentationInterval).


You do it by passing 1 as the interval to IDXGISwapChain::Present. You could also sync to every other vblank by passing 2, and so on.

Share this post


Link to post
Share on other sites

This topic is 2846 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this