Shading is a technique that adds more realism to the appearance of your objects. Generally speaking this is done by calculating lighting for each triangle in one of the following ways:
A single color per triangle using flat shading
A gradient fill per triangle when using Gouraud shading
Per pixel on a triangle's surface giving the object a cartoonish look with cell shading
Approximately per pixel on a triangle's surface as the most realistic shading with Phong shading
![](https://static.packt-cdn.com/products/9781847195722/graphics/5722_07_18.jpg)
While discussing the more advanced shading types, we've seen how we can add bump maps to a Phong shader and how we can add the illusion of reflection using environment mapping.
Phong shading and a bump map have been used to extend the existing galaxy example and shade the Earth.
This chapter was accompanied by a demo, showing each shading type and its parameters. The famous Utah teapot was used to apply shaded materials to. In the next chapter, we'll see how we can export 3D models—such as the Utah teapot—from several 3D modeling...