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:


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值