纳金网

标题: 内置着色器指南之标准着色器家族:贴花着色器 [打印本页]

作者: .    时间: 2013-2-20 17:13
标题: 内置着色器指南之标准着色器家族:贴花着色器
Decal Properties 贴花属性This shader is a variation of the VertexLit shader. All lights that shine on it will be rendered as vertex lights by this shader. In addition to the main texture, this shader makes use of a second texture for additional details. The second "Decal" texture uses an alpha channel to determine visible areas of the main texture. The decal texture should be supplemental to the main texture. For example, if you have a brick wall, you can tile the brick texture as the main texture, and use the decal texture with alpha channel to draw graffiti at different places on the wall.此Shader是从Vertex-Lit Shader转变来的,这个Shader以点光源方式计算在它上面的所有光照信息。除了主纹理外,它应用了第二个纹理,"Decal"贴花纹理应用了Alpha通道定义了在主纹理的可见区域。它可以用来对主纹理追加显示纹理效果。比如,有一个砖墙,可以在主纹理上平铺砖块纹理,然后用带有Alpha通道的贴花纹理在墙的不同区域来画涂鸦。
Performance 性能This shader is approximately equivalent to the VertexLit shader. It is marginally more expensive due to the second decal texture, but will not have a noticeable impact.
这个Shader 和 VertexLit Shader 比较相似,它在第二个贴花纹理上耗费了一定的渲染资源,但是并不会有明显的影响。
【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/




欢迎光临 纳金网 (http://wwww.narkii.com/club/) Powered by Discuz! X2.5