Tearing on polygon intersection

Started by
2 comments, last by bjarnia 16 years, 2 months ago
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.
____________________________Bjarni Arnasonbjarni.us
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]
____________________________Bjarni Arnasonbjarni.us
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.
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 :)
____________________________Bjarni Arnasonbjarni.us

This topic is closed to new replies.

Advertisement