Jump to content
  • Advertisement
Sign in to follow this  
bjarnia

OpenGL Tearing on polygon intersection

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

This picture should pretty much explain itself: http://www.steik.org/dump/tearing.jpg I basicly have a heightmap for the terrain, and just a flat mesh that acts like an ocean. It used to move through shaders but I removed the shader completly so it's compeltly static now. I'm using OpenGL and SDL for windowmanager. I have Vsynch forced on in the drivers and i'm capped at 60 fps as far as I can tell. (odd thing.. even though I force vsynch OFF, i'm still capped at 60 fps? Not sure when this started happening but I know I wasn't at one point of time) Happens both in fullscreen and windowed mode. It gets worse as the camera goes further. The more distance from camera to the "object" the more tearing. It must be some sort of depth buffer inprecision, but I have no idea how to fix that. I have also expirienced the exact same problem it in Panda3d (annothe rendering engine), which is completly unrelated. Had the EXACT same problem there, had a heightmap and an ocean and the intersection was all teared up.. and there is NO connection at all between the 2 projects. Ps.. using nVidia 8800 GTS with latest drivers.

Share this post


Link to post
Share on other sites
Advertisement
Ok... I did more searching and I found this:
http://www.gamedev.net/community/forums/showfaq.asp?forum_id=25#q6

and this:

http://www.gamedev.net/community/forums/topic.asp?topic_id=457423

And now there is actually no tearing at all when the camera is static... But when I move the camera around (yaw/rotate/whatever) the sea level goes up/down... it's really odd :o

[Edited by - bjarnia on February 19, 2008 9:47:05 PM]

Share this post


Link to post
Share on other sites
Yes it's called Z-fighting.

If you're already using a 24-bit Z-buffer then try moving your near-clip plane further away, or your far-clip plane closer to the camera.

Share this post


Link to post
Share on other sites
I fixed the last problem (camera movement) simply by turning on the shader again.
So everything fixed. Should've searched a bit mroe before posting because I managed to find it eventually :)

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!