Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Shading
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Smooth shading==== In contrast to flat shading where the colors change discontinuously at polygon borders, with smooth shading the color changes from pixel to pixel, resulting in a smooth color transition between two adjacent polygons. Usually, values are first calculated in the vertices and [[bilinear interpolation]] is used to calculate the values of pixels between the vertices of the polygons. Types of smooth shading include [[Gouraud shading]]<ref>{{cite journal|last=Gouraud|first=Henri|title=Continuous shading of curved surfaces|journal=IEEE Transactions on Computers|year=1971|volume=C-20|issue=6|pages=623β629|doi=10.1109/T-C.1971.223313|s2cid=123827991 }}</ref> and [[Phong shading]].<ref>B. T. Phong, [https://users.cs.northwestern.edu/~ago820/cs395/Papers/Phong_1975.pdf Illumination for computer generated pictures], ''Communications of ACM'' 18 (1975), no. 6, 311β317. ([[PDF]])</ref> =====Gouraud shading===== # Determine the normal at each polygon vertex. # Apply an [[illumination model]] to each vertex to calculate the light intensity from the vertex normal. # Interpolate the vertex intensities using [[bilinear interpolation]] over the surface polygon. Problems: * Due to lighting being computed only at vertices, the inaccuracies (especially of specular highlights on large triangles) can become too apparent. * T-junctions with adjoining polygons can sometimes result in visual anomalies. In general, T-junctions should be avoided. =====Phong shading===== Phong shading is similar to Gouraud shading, except that instead of interpolating the light intensities the normals are interpolated between the vertices and the lighting is evaluated per-pixel. Thus, the specular highlights are computed much more precisely than in the Gouraud shading model. # Compute a normal N for each vertex of the polygon. # Using [[bilinear interpolation]] compute a normal, N<sub>i</sub> for each pixel. (Normal has to be renormalized each time.) # Apply an [[illumination model]] to each pixel to calculate the light intensity from N<sub>i</sub>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)