built-in SpecularType of Unity

1、声明变量。

  built-in SpecularType of Unity

  built-in SpecularType of Unity

  注意并没有在Shader中声明_SpecColor,因为Lighting.cginc中已经帮我们声明。

2、声明使用BlinnPhong光照模型。

  built-in SpecularType of Unity

3、最后将_SpecPower和Gloss给赋值。

  built-in SpecularType of Unity

  SpecPower是指光泽度,小的值带来平滑的光斑,大的值带来小而亮的光斑。Gloss是亮度(光强),值越大,光斑越亮。

4、镜面反射效果如下。

  built-in SpecularType of Unity

相关文章:

  • 2021-06-01
  • 2021-04-09
  • 2022-12-23
  • 2022-12-23
  • 2022-02-28
  • 2022-02-01
  • 2021-07-05
  • 2021-12-26
猜你喜欢
  • 2021-12-18
  • 2022-01-11
  • 2021-09-13
  • 2022-12-23
  • 2021-12-08
  • 2021-12-15
相关资源
相似解决方案