• Advertisement
Sign in to follow this  

Ugly lines on screen.

This topic is 1734 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

Advertisement

It looks like discontinuous normals. I can't tell how they are calculated from the picture. Is this object made of multiple patches stitched together? If so, continuous normals are not easy to achieve. Perhaps the content maker decided they were good enough.

Share this post


Link to post
Share on other sites

I think it's just vsync off. You are rendering at an higher rate than your monitor can display, so what you get on the screen is actually a frame on the very top and the old frame (or more) at the bottom. This is also why you see this when things are rotating, because it is maximizing the differences between frames.

This is perfectly normal, to "fix" it pass 1 instead of 0 as first parameter in your "Present" call at the end of the frame. This will sync your rendering with the monitor refresh rate and the lines will disappear.

Edited by kunos

Share this post


Link to post
Share on other sites

its not normal screen tearing, i've got it with enable vsync too.

Share this post


Link to post
Share on other sites

I think it's just vsync off. You are rendering at an higher rate than your monitor can display, so what you get on the screen is actually a frame on the very top and the old frame (or more) at the bottom. This is also why you see this when things are rotating, because it is maximizing the differences between frames.
This is perfectly normal, to "fix" it pass 1 instead of 0 as first parameter in your "Present" call at the end of the frame. This will sync your rendering with the monitor refresh rate and the lines will disappear.

 

But the screen capture comes from the graphics card memory which contains the full image (unless the OP has taken a photo of his monitor). I mean that you can't take a screenshot of tearing. Besides, tearing artifact is typically horizontal. 

 

I think that MJP is correct about the problem.

 

Cheers!

Share this post


Link to post
Share on other sites

Size of backbuffer is the same as window, and model was created in blender (smooth normals), and this model looked great in OpenGL :) I also tried VSync (off/on), didnt help.

Share this post


Link to post
Share on other sites

Is the size of the backbuffer same as the client area of the window? When windowed the back buffer must be smaller than the window size.

 

Cheers!

Share this post


Link to post
Share on other sites

Size of backbuffer is the same as window, and model was created in blender (smooth normals), and this model looked great in OpenGL smile.png I also tried VSync (off/on), didnt help.

 

Is it the same size as the window, or the same size as the client area of the window?

It's not a model issue, it's an artifact resulting from upscaling or downscaling an image with point filtering. This is what happens when you create your backbuffer with a different size than the window's client area, which is why I asked about it.

Share this post


Link to post
Share on other sites

Thanks, guys that helped. I used AdjustWindowRect, and now these lines are gone, and result looks much much better. Thanks again.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement