Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Sep 2004
Offline Last Active Today, 04:44 PM

#5085010 How to avoid depth fighting

Posted by desdemian on 11 August 2013 - 02:03 PM

There is a property you can set before drawing a polygon: glPolygonOffset.


Quoting: "glPolygonOffset is useful for rendering hidden-line images, for applying decals to surfaces (this is your case), and for rendering solids with highlighted edges."

What it does it "pulls" or "pushes" the polygon before doing the z test. Thus avoiding the z-fighting.



Good luck.