贴花着色器 Decal

Date:2012-01-09 02:14

Decal 贴花

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 比较相似,它在第二个贴花纹理上耗费了一定的渲染资源,但是并不会有明显的影响。

页面最后更新:2007-09-15

分类:Components| 翻译: 无为