Game Development Reference
In-Depth Information
2.3.4 Backface Culling
A polygon has two sides, and we label one side as the front side and the
other as the back side. In general, the back sides of polygons are never
seen. This is because the majority of objects in a scene are enclosed
volumes, such as boxes, cylinders, tanks, characters, etc., and the cam-
era should never be allowed to enter the solid volume of space inside
the object. Thus, the camera will never see the back sides of the poly-
gons. This is important to know because if we were ever allowed to see
the back side of a polygon, backface culling wouldn't work.
Figure 2.11 shows an object in view space where the front sides
have an arrow sticking out. A polygon whose front side faces the cam-
era is called a front facing polygon, and a polygon whose front side faces
away from the camera is called a back facing polygon.
Figure 2.11: An object with front facing
and back facing polygons
Upon examination of Figure 2.11, we can see that the front facing poly-
gons obscure the back facing polygons that are behind them. Direct3D
takes advantage of this by culling (discarding from further processing)
the back facing polygons; this is called backface culling . Figure 2.12
shows the same object after the back faces have been culled. From the
camera's viewpoint, the same scene will be drawn because the back
faces were obscured anyway and would never have been seen.
Figure 2.12: The scene after back facing
polygons have been culled
Search WWH ::




Custom Search