SetGlobalInt
Adds a command to set the value of a given property for all Shaders, where the property has a type of Int in ShaderLab code.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
SetGlobalInt(int, int)
Adds a command to set the value of a given property for all Shaders, where the property has a type of in ShaderLab code.
Intpublic void SetGlobalInt(int nameID, int value)
Parameters
Remarks
When Unity executes the CommandBuffer, it sets the value of the given property for all Shaders. Internally, the shader property types and are treated exactly the same; therefore, this function is an alias to CommandBuffer.SetGlobalFloat.
FloatIntFor properties that use the ShaderLab type , which are internally represented as integers, use CommandBuffer.SetGlobalInteger.
IntegerSetGlobalInt(string, int)
Adds a command to set the value of a given property for all Shaders, where the property has a type of in ShaderLab code.
Intpublic void SetGlobalInt(string name, int value)
Parameters
Remarks
When Unity executes the CommandBuffer, it sets the value of the given property for all Shaders. Internally, the shader property types and are treated exactly the same; therefore, this function is an alias to CommandBuffer.SetGlobalFloat.
FloatIntFor properties that use the ShaderLab type , which are internally represented as integers, use CommandBuffer.SetGlobalInteger.
Integer