查看: 2285|回复: 0
打印 上一主题 下一主题

[Unity 组件参考手册]着色器参考之着色器语法:Fog

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

活跃会员 优秀版主 荣誉管理 论坛元老

跳转到指定楼层
楼主
发表于 2013-2-25 17:11:18 |只看该作者 |倒序浏览
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/
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2024-9-20 10:57 , Processed in 0.080662 second(s), 32 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部