Ugly lines on screen.

Started by
8 comments, last by Damian. 11 years ago

So I started playing with Direct3D11, and everything works fine except bad lines on my screen, its hard to see it on image, but in realtime, when something is rotating, its easy to spot.

534p3u.jpg

Thanks for any help.

Direct image link: http://screenshu.com/static/uploads/temporary/wi/03/sw/534p3u.jpg

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.

Make sure that the size of your back buffer/swap chain is the same as the size of your window's client area.

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.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

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

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!

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.

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!

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.

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

This topic is closed to new replies.

Advertisement