Difference between revisions of "Shader:hasUniform"

(Created page)
 
m (0.11.0 -> 11.0)
 
Line 1: Line 1:
{{newin|[[0.11.0]]|110|type=function|text=It has replaced [[Shader:getExternVariable]]}}
+
{{newin|[[11.0]]|110|type=function|text=It has replaced [[Shader:getExternVariable]]}}
 
Gets whether a uniform / extern variable exists in the Shader.
 
Gets whether a uniform / extern variable exists in the Shader.
  

Latest revision as of 18:18, 7 May 2019

Available since LÖVE 11.0
It has replaced Shader:getExternVariable.

Gets whether a uniform / extern variable exists in the Shader.

If a graphics driver's shader compiler determines that a uniform / extern variable doesn't affect the final output of the shader, it may optimize the variable out. This function will return false in that case.

Function

Synopsis

hasuniform = Shader:hasUniform( name )

Arguments

string name
The name of the uniform variable.

Returns

boolean hasuniform
Whether the uniform exists in the shader and affects its final output.

See Also

Other Languages