目录
菲涅尔
需要注意的是金属不会出现菲涅尔现象
![](https://img-blog.csdnimg.cn/img_convert/aa2ddc371bb3f599e790eb4c40b84edb.webp?x-oss-process=image/format,png)
连连看实现
这里我们不需要对负值进行Max处理,因为点积为负值的部分都在物体的背面,并不会被渲染出来,所以不会有影响
![](https://img-blog.csdnimg.cn/img_convert/3e720a41ce66a70be4f60b9f767083b8.webp?x-oss-process=image/format,png)
Matcap
Matcap是对BRDF渲染结果的映射,并不使用光照等条件,所以一般用于静态模拟,动态模拟效果不是很理想
连连看实现
代码实现
![](https://img-blog.csdnimg.cn/img_convert/1cd4b61498febed07a6c7ffeca85f434.webp?x-oss-process=image/format,png)
![](https://img-blog.csdnimg.cn/img_convert/eba911ab4b9040909e81c1aeb70d47a1.webp?x-oss-process=image/format,png)
可以看到高光、SSS、暗部的模拟效果都很好
![](https://img-blog.csdnimg.cn/img_convert/28d44d76912eba981f8e6486aebede1e.webp?x-oss-process=image/format,png)
shader一般无法通过断点进行DeBug,可以在屏幕上输出不同阶段的结果来找问题
Cubemap
Cubemap我们可以简单理解为一个全景图,其上映射的场景信息相当于从球的中心点观察到的
连连看实现
代码实现
![](https://img-blog.csdnimg.cn/img_convert/d2161fb856bacaeb68bfb719582b8193.webp?x-oss-process=image/format,png)