Difference between Gourand Shading and Phong Shading (Gourand shading 和 Phong shading 的不同)

    Gouraud shading (AKA Smooth Shading) is a per-vertex color computation. What this means is that the vertex shader must determine a color for each vertex and pass the color as an out variable to the fragment shader. Since this color is passed to the fragment shader as an in varying variable, it is interpolated across the fragments thus giving the smooth shading.


        Gouraud shading(又称平滑着色) 是一种对每个顶点进行颜色计算的着色方式。这意味着顶点着色器必须为每个顶点确定一个颜色,并将颜色作为一个输出变量传递给片段着色器。由于这个颜色是作为一个可变的输入变量传递给片段着色器的,所以它在每个片段上进行插值,从而得到了平滑的着色。

In contrast, Phong shading is a per-fragment color computation. The vertex shader provides the normal and position data as out variables to the fragment shader. The fragment shader then interpolates these variables and computes the color.

        相比之下,Phong shading 是一种对每个片段进行的颜色计算。顶点着色器为片段着色器提供了每个点的向量和位置的数据作为输出变量,之后片段着色器对这些变量进行插值并计算颜色。

Here is an illustration of the Phong Shading:

文章标签: OpenGL
个人分类: OpenGL
上一篇note.js之 Nodejs+Express4在windows下的配置
想对作者说点什么? 我来说一句