包含此页的版本:
不含此页的版本:
这LightMode标签是一个预定义的 Pass 标签,Unity 使用它来确定是否在给定帧内执行 Pass、在帧期间 Unity 执行 Pass 的时间以及 Unity 对输出执行的作。
注意:这LightMode标签与 LightMode 枚举无关,后者与光照相关。
每渲染管线 获取场景内容并将其显示在屏幕上的一系列作。Unity 允许您从预构建的渲染管道中进行选择,或编写自己的渲染管道。更多信息
请参阅术语表使用LightMode标记,但预定义的值及其含义各不相同。有关详细信息,请参阅语法和有效值。
在内置渲染管线中,如果未将LightMode标记,Unity 渲染通道时没有任何光照或阴影;这本质上与拥有LightMode值Always.在可编写脚本的渲染管线中,你可以使用SRPDefaultUnlit值来引用没有LightMode标签的通道。
Shader "Examples/ExampleLightMode"
{
SubShader
{
Pass
{
Tags { "LightMode" = "Always" }
// The rest of the code that defines the Pass goes here.
}
}
}
Shader "Examples/ExampleLightMode"
{
SubShader
{
Pass
{
Tags { "LightMode" = "Always" }
// The rest of the code that defines the Pass goes here.
}
}
}