Game Development Reference
In-Depth Information
The more vertices drawn, the more work the GPU has to do, and the larger impact
on performance a model takes. There is also no point drawing vertices that are com-
pletely hidden by other triangles on the same model.
This is where backface culling comes into play. Backface culling allows the GPU to
only draw triangles facing the camera, saving time on triangles that are on the other
side of the object and usually invisible. Now how would you determine if a triangle is
on the back of an object, when the object could have any orientation, and the cam-
era could be in any position?
This is done by ensuring that all triangles facing the camera have their vertices speci-
fied in a clockwise-winding order, which is demonstrated in the diagram that follows.
When sent to the GPU, the order is evaluated and if the vertices are submitted in a
counter-clockwise fashion, they are discarded as they should be facing away from
the camera, and are most likely hidden.
Search WWH ::




Custom Search