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

[Unity 组件参考手册]着色器参考之高级ShaderLab主题:着色器的细节层次技术

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

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

跳转到指定楼层
楼主
发表于 2013-2-26 17:36:05 |只看该作者 |倒序浏览
Shader Level of Detail (LOD) works by only using shaders or subshaders that have their LOD value less than a given number.着色器的细节层次效果只有在着色器或子着色器含有小于一定阈值的LOD值时才起作用。By default, allowed LOD level is infinite, that is, all shaders that are supported by the user's hardware can be used. However, in some cases you might want to drop shader details, even if the hardware can support them. For example, some cheap graphics cards might support all the features, but are too slow to use them. So you may want to not use parallax normal mapping on them.默认情况下,允许的 LOD 级别可以是无限的。也就是说,可以使用硬件所支持的所有的着色器。然而,在某些情况下即使硬件可以支持它们,你可能也要放弃着色器的详细信息。例如,一些廉价的图形卡可能支持所有功能,但使用这些功能的速度太慢了。所以,你可能就不想在这些卡上使用视差法线映射了。Shader LOD can be either set per individual shader (using Shader.maximumLOD), or globally for all shaders (using Shader.globalMaximumLOD).着色器的细节层次既可以针对单个着色器进行设定(使用Shader.maximumLOD),也可以针对所有着色器进行全局设定(使用Shader.globalMaximumLOD)。In your custom shaders, use LOD command to set up LOD value for any subshader.在你的自定义着色器中,使用LOD命令来为每个子着色器来设定LOD值。Built-in shaders in Unity have their LODs set up this way:Unity中内建的着色器的LOD设置参数如下:    VertexLit kind of shaders = 100
    Decal, Reflective VertexLit = 150
    Diffuse = 200
    Diffuse Detail, Reflective Bumped Unlit, Reflective Bumped VertexLit = 250
    Bumped, Specular = 300
    Bumped Specular = 400
    Parallax = 500
    Parallax Specular = 600
【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

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

手机版|纳金网 ( 闽ICP备08008928号

GMT+8, 2024-6-14 05:42 , Processed in 0.081790 second(s), 32 queries .

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

© 2008-2019 Narkii Inc.

回顶部