Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Z-fighting, bleeding, and stitching...need help!


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
3 replies to this topic

#1 Viscous-Flow   Members   -  Reputation: 122

Like
Likes
Like

Posted 31 August 2001 - 03:31 PM

Z-fighting, bleeding, and stitching all stand for the same thing. When two polygons are draw on the same plane with different vertices, floating point round off errors occur. Thus, the two polygons tend to mix and create undesirable effects. That was what I read on the OpenGL website. Does anyone know of a way to combat these problems WITHOUT disabling GL_DEPTH_TEST? I tried what they showed on the website, but it doesn't work right/I couldn't get it to work. Any help would be greatly appreciated! Edited by - Viscous-Flow on August 31, 2001 10:32:30 PM

Sponsor:

#2 nosfy   Members   -  Reputation: 194

Like
Likes
Like

Posted 31 August 2001 - 04:00 PM

You can move the far plane. All objects you will draw afterwards will have a lower z value... Pretty neat.

Patrick Lafleur

System Engineer
Creation Objet Inc.

#3 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 31 August 2001 - 04:46 PM

fighting should only occur if u use 2 diferent methods for drawing eg one with clipping and one without. but if youre only changing textures on the 2nd pass then no fighting should occur.
if fighting occurs u can use glPolygonOffset(..) to combat it

#4 Dodger   Members   -  Reputation: 122

Like
Likes
Like

Posted 31 August 2001 - 07:12 PM

Yes, z-fighting can always occur when drawing polys with very little angle in between them
Especially at extreme z-coordinates of the vertices of those polys, due to non-linearity of the z-buffer (move the polys a little closer to the near plane and the fighting will most likely disappear). The easiest way to get rid of z-fighting without disableing depth test is moving the far plane closer to the view point or the near plane further away - in other words, decrease the distance between them. That increases your z-buffer resolution (in z-depth/world unit) and the fighting should disappear.
If that''s not an option, try glPolygonOffset to offset the z-values of one of the polys.




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.



PARTNERS