Shader:hasUniform

Returns whether a Shader has a particular uniform variable.

present = Shader:hasUniform(uniform)

Arguments

NameTypeDescription
uniformstringThe name of the uniform variable.

Returns

NameTypeDescription
presentbooleanWhether 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