Polygon Depth Offset

From TouchDesigner Documentation
Revision as of 16:48, 15 June 2020 by Malcolm (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

A polygon is a type of Primitive that is formed from a set of Vertices in 3D that are implicitly connected together to form a multi-edge shape.

A polygon is a type of Primitive that is formed from a set of Vertices in 3D that are implicitly connected together to form a multi-edge shape.