Represents a uniform which is a global shader variable. They are passed to shader programs.
When declaring a uniform of a ShaderMaterial, it is declared by value or by object.
Since this class can only be used in context of ShaderMaterial, it is only supported in WebGLRenderer.
uniforms: {
time: { value: 1.0 },
resolution: new Uniform( new Vector2() )
};
Constructs a new uniform.
value
The uniform value.
Used to build the uniform buffer according to the STD140 layout. Derived uniforms will set this property to a data type specific value.
This property is set by UniformsGroup and marks the index position in the uniform array.
The item size. Derived uniforms will set this property to a data type specific value.
The uniform's name.
This property is set by UniformsGroup and marks the start position in the uniform buffer.
The uniform value.
The uniform's value.
Returns a new uniform with copied values from this instance. If the value has a clone() method, the value is cloned as well.
Returns: A clone of this instance.
Returns the uniform's value.
Returns: The value.
Sets the uniform's value.
value
The value to set.