Back-face culling

Back-face culling is typically quite a cheap test, only requiring a dot product to be calculated, and so it is often used as a step in the graphical pipeline that reduces the number of surfaces that need to be considered.

In general, back-face culling can be assumed to produce no visible artifact in a rendered scene if it contains only closed and opaque geometry.

For example, in wire-frame rendering, back-face culling can be used to partially address the problem of hidden-line removal, but only for closed convex geometry.

[4] One method of implementing back-face culling is by discarding all polygons where the dot product of their outward pointing surface normal,

, is greater than or equal to zero: In the case of rendering a polygon specified by a list of vertices, this might be calculated by where P is the view point, V0 is the first vertex of a triangle and N could be calculated as a cross product of two vectors representing sides of the triangle adjacent to V0 Since cross product is anticommutative, defining the normal in terms of cross product means that the normal direction is dependent on the vertex order (winding): Consequently, the vertex ordering is usually chosen such that front-facing triangles have clockwise winding, N defined as above is the normal directed outward from the object.

In this setup, back-face may be regarded as a test of whether the points in the polygon appear in clockwise or counter-clockwise order when projected onto the screen.

On the left a model without back-face culling; on the right the same model with back-faces removed. Because the polygons do not form a closed solid, differences can be seen.