keywords:Comparison flat, Gouraud, Phong shading


现今多边形的著色方法基本的有这三种:flatGouraudPhong Shading,它们之间有何差别呢?喜欢玩游戏的人一定要知道Gouraud Shading,这是PC最常使用的著色法,因为效能好、效果还不错。而近年来,随着GPU快速的发展,Phong Shading逐渐应用在更真实的著色上。

从一张图可以看出他们的各自的特色:(a: Flat→b: Gouraud→c: Phong)

从古早到现代:Flat→Gouraud→Phong Shading。

从简单到复杂:Flat→Gouraud→Phong Shading。


  • 平面着色:恒定的表面着色
  • Gouraud着色:颜色插值着色
  • Phong着色:顶点法线插值着色


  • flat shading:三角形的顶点没有法向量,三角形整个面才有法向量,打光时整个三角形只呈现一种颜色。
  • Gouraud shading:三角形的顶点都有各自的法向量,打光时三个顶点有各自的颜色,接着做双线性内插(bilinear interpolation)来求得颜色,使整个三角形有渐层的颜色变化。
  • Phong shading:三角形的顶点都有各自的法向量,先对三角形整个面作法向量的双线性内插,接着打光来求整个三角形的颜色。


假设三角形面积为 A 。三角形个数为 N 。而且我们知道打一次光需要6次乘法和2次加法和1次查表的运算,此设定为 L 。双线性内插设定为 B

  • flat shading的复杂度:N * L
  • Gouraud shading 的复杂度:N * (3 * L + b * A)
  • Phong shading的复杂度:(B + L) * N * A

数学好的人很容易计算出复杂度:Flat < Gouraud < Phong Shading。这里也因此说明了为何早期电脑都只支援Gouraud shading,就算已经知道Phong shading的效果比Gouraud shading好,但还是选择效能好而效果不错的Gouraud shading!如今GPU发展迅速,Phong Shading的效能已得到提升。

stack overflow答案

Flat shading is the simplest shading model. Each rendered polygon has a single normal vector; shading for the entire polygon is constant across the surface of the polygon. With a small polygon count, this gives curved surfaces a faceted look.

Phong shading is the most sophisticated of the three methods you list. Each rendered polygon has one normal vector per vertex; shading is performed by interpolating the vectors across the surface and computing the color for each point of interest. Interpolating the normal vectors gives a reasonable approximation to a smoothly-curved surface while using a limited number of polygons.

Gourard shading is in between the two: like Phong shading, each polygon has one normal vector per vertex, but instead of interpolating the vectors, the color of each vertex is computed and then interpolated across the surface of the polygon.

On modern hardware, you should either use flat shading (if speed is everything) or Phong shading (if quality is important). Or you can use a programmable-pipeline shader and avoid the whole question.