Jump to content
  • Advertisement
Sign in to follow this  
mososky

Tearing with high frame rate

This topic is 3063 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!