Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Ugly lines on screen.

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
9 replies to this topic

#1 Damian.   Members   

272
Like
1Likes
Like

Posted 24 April 2013 - 10:16 AM

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


Edited by Damian., 24 April 2013 - 10:18 AM.


#2 cephalo   Members   

739
Like
1Likes
Like

Posted 24 April 2013 - 01:52 PM

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.



#3 MJP   Moderators   

19455
Like
2Likes
Like

Posted 24 April 2013 - 03:27 PM

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



#4 kunos   Members   

2254
Like
0Likes
Like

Posted 25 April 2013 - 04:42 AM

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, 25 April 2013 - 04:43 AM.


#5 x6itru   Members   

149
Like
0Likes
Like

Posted 25 April 2013 - 09:25 AM

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



#6 kauna   Members   

2922
Like
1Likes
Like

Posted 25 April 2013 - 09:28 AM

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!



#7 Damian.   Members   

272
Like
0Likes
Like

Posted 25 April 2013 - 11:31 AM

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.



#8 kauna   Members   

2922
Like
3Likes
Like

Posted 25 April 2013 - 12:23 PM

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!



#9 MJP   Moderators   

19455
Like
3Likes
Like

Posted 25 April 2013 - 12:27 PM

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.



#10 Damian.   Members   

272
Like
0Likes
Like

Posted 25 April 2013 - 02:56 PM

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






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.