标题: [Unity 组件参考手册]着色器参考之着色器语法:Fallback [打印本页] 作者: . 时间: 2013-2-25 17:21 标题: [Unity 组件参考手册]着色器参考之着色器语法:Fallback After all Subshaders a Fallback can be defined. It basically says "if none of subshaders can ***n on this hardware, try using the ones from another shader".Fallback定义在所有子着色器后。简单来说,它表示"如果没有任何子着色器能被运行在当前硬件上,请尝试使用降级着色器"。
[Syntax 语法]Fallback "name"
Fallback to shader with a given name.
退回到给定名称的着色器
Fallback Off
Explicitly state that there is no fallback and no warning should be printed, even if no subshaders can ***n on this hardware.
显式声明没有fallback并且不会打印任何警告,甚至没有子着色器会被运行 [Details 细节]A fallback statement has the same effect as if all subshaders from the other shader would be inserted into its place.Fallback标志的功能和将另一个着色器的所有子着色器拷贝到标志所在位置所起的功能相同
[Example 示例]Shader "example" {
// properties and subshaders here...
// 属性和子着色器在此
Fallback "otherexample"
}
【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/