what is shading?
• The appearance of lights and darks found in a
work of art.
• In computer graphics, shading is a method used
to create or enhance the illusion of depth in an
image by varying the amount of darkness in the
image. As you can see, three levels of shading
are used in the example of a rectangular object,
thus making it appear to be three dimensional.
Shading can also be used to make some objects
appear to be in front of or behind
other objects in the image
Type of shading
• Flat shading
• Smooth (Gouraud) shading
• The simplest shading algorithm, called flat shading,
consists of using an illumination model to determine the
corresponding intensity value for the incident light, then
shade the entire polygon according to this value. Flat
shading is also known as constant shading or constant
intensity shading. Its main advantage is that it is easy it
• In the case of curved objects, when the surface
changes gradually and the light source and viewer are far
from the surface.
• In general, when there are large numbers of plane
• when problem is not light, some thing else
• This shading algorithm was first described by H.
Gouraud in 1971. It is also called bilinear intensity
interpolation. Gouraud shading is easier to understand in
the context of the scan-line algorithm used in hidden
surface removal, For now, assume that each pixel is
examined according to its horizontal (scan-line)
• here edges are visible
• In modern graphics hardware, gourand shading is
probably at least as fast as flat shading,and faster than
• Gouraud is enabled by default