EnableShaderKeyword(string)
Adds a command to enable a global keyword with a given name.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
public void EnableShaderKeyword(string keyword)
Parameters
Name of a global shader keyword to enable.
Remarks
If a global keyword with the name you pass in does not exist, Unity creates one with that name when you call this function. To get all the global keywords that already exist, use Shader.globalKeywords. Note: it is more efficient to use CommandBuffer.EnableKeyword.
Additional Resources: CommandBuffer.DisableShaderKeyword, Shader.EnableKeyword.