Uniforms are global GLSL variables. They are passed to shader programs.
When declaring a uniform of a THREE.ShaderMaterial | ShaderMaterial, it is declared by value or by object.
uniforms: { time: { value: 1.0 }, resolution: new Uniform(new Vector2())}; Copy
uniforms: { time: { value: 1.0 }, resolution: new Uniform(new Vector2())};
Create a new instance of THREE.Uniform | Uniform
An object containing the value to set up the uniform. It's type must be one of the Uniform Types described above.
Current value of the uniform.
Returns a clone of this uniform.
If the uniform's value property is an Object | Object with a clone() method, this is used, otherwise the value is copied by assignment Array values are shared between cloned THREE.UniformUniform | Uniforms.
clone()
Uniforms are global GLSL variables. They are passed to shader programs.
Example
When declaring a uniform of a THREE.ShaderMaterial | ShaderMaterial, it is declared by value or by object.
See