Shader:hasUniform
Returns whether a Shader has a particular uniform variable.
present = Shader:hasUniform(uniform)
Arguments
Name | Type | Description |
uniform | string | The name of the uniform variable. |
Returns
Name | Type | Description |
present | boolean | Whether the shader has the specified uniform. |
Notes
If a uniform variable is defined but unused in the shader, the shader compiler will optimize it out and the uniform will not report itself as present.
See also
Shader:send
Shader