Polygon Depth Offset

From TouchDesigner Documentation
Jump to: navigation, search

Polygon Depth Offset is a way of dealing with Z-Fighting. Polygon Depth Offset will push the depth values of a polygon away from the camera some number of units. This occurs in a camera-independent way, so its much easier to do than to offset your polygons by hand simply by using translations (Since a translation in one direction will work from one camera view, but not from a different one).

The value of the offset is polygonoffsetfactor * DZ + r * polygonoffsetunits, where DZ is a measurement of the change in depth relative to the screen area of the polygon, and r is the smallest value that is guaranteed to produce a resolvable offset for a given implementation. Essentially, the polygonoffsetunits are a constant change to the offset, and the polygonoffsetfactor is a change depending on how sloped the surface is to the viewer.