纳金网

标题: [Unity 组件参考手册]着色器参考之着色器语法:Fog [打印本页]

作者: .    时间: 2013-2-25 17:11
标题: [Unity 组件参考手册]着色器参考之着色器语法:Fog
Fog parameters are controlled with Fog command.雾参数用于雾命令控制。Fogging blends the color of the generated pixels down towards a constant color based on distance from camera. Fogging does not modify a blended pixel's alpha value, only its RGB components.雾化是通过混合已生成的像素的颜色和基于到镜头的距离来确定的一个不变色来完成。雾化不会改变已经混合的像素的透明度值,只是改变RGB值。
[Syntax 语法]Fog { Fog Commands }
    Specify fog commands inside curly braces.
    在大括号中设定雾命令的内容
Mode Off | Global | Linear | Exp | Exp2
    Defines fog mode. Default is global, which translates to Off or Exp2 depending whether fog is turned on in Render Settings.
    定义雾模式。缺省是全局的,依据雾在渲染设定中是否打开确定可从无变化到平方值
Color ColorValue
    Sets fog color.
    设定雾的颜色
Density FloatValue
    Sets density for exponential fog.
    以指数的方式 设定 雾的密度
Range FloatValue , FloatValue
    Sets near & far range for linear fog.
    为linear的雾设定远近距离  [Details 细节]Default fog settings are based on Render Settings: fog mode is either Exp2 or Off; density & color taken from settings as well.缺省雾设定基于渲染设置:雾模式既可以是Exp2也可以是关闭;密度和颜色完全取自设定。Note that if you use fragment programs, Fog settings of the shader will still be applied. On platforms where there is no fixed function Fog functionality, Unity will patch shaders at&nbsp***ntime to support the requested Fog mode.注意如果你使用片段程序,着色器雾设定仍然会被应用。如果平台没有对固定管线的雾功能支持,Unity会实时补上着色器以支持需要的雾模式。  【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/




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