...与多program对象》我们将会讲解逐片元光照(Per-fragment Lighting),比起我们之前一直使用的逐顶点光照(Per-vertex Lighting),前者对于显卡是来说是一项更困难的工作,但是也会生成更真实的效果。
基于16个网页-相关网页
注意不同的光照组间有重叠,如,最后一个逐像素光源也以逐顶点光照模式的方式渲染,这样能减少当物体和灯光移动时可能出现的“光照跳跃”现象。
Note that light groups overlap; for example last per-pixel light blends into per-vertex lit mode so there are less "light popping" as objects and lights move around.
这篇文章中描述的任何命令都不会用来操作逐像素光照,你可以通过自己定义的顶点和片段编程来实现这个效果。
For these you don't use any of the commands described here, instead you define your own vertex and fragment programs where you do all lighting, texturing and anything else yourself.
禁用正向渲染添加通道。这会使这个着色器支持一个完整的方向光和所有逐顶点/SH计算的光照,使着色器变小。
Forward rendering additive pass. This makes the shader support one full directional light, with all other lights computed per-vertex/SH. Makes shaders smaller as well.
应用推荐