EnableShaderKeyword(string)
Adds a command to enable a global keyword with a given name.
Read time 1 minuteLast updated 6 days ago
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.