Represents a uniform variable in a shader program used by a custom screen-space effect, providing methods for setting the current value of the uniform.
see UniformParams.bind to provide the value of the variable.
see ScreenSpaceEffectBuilder.addUniform to add a uniform variable to an effect shader.
extensions
Methods
Name |
Description |
|
setUniform1f(value: number): void |
Sets the value to a float - equivalent to WebGLRenderingContext.uniform1f . |
|
setUniform1fv(value: number[] | Float32Array): void |
Sets the value to an array of floats - equivalent to WebGLRenderingContext.uniform1fv . |
|
setUniform1i(value: number): void |
Sets the value to an integer - equivalent to WebGLRenderingContext.uniform1i . |
|
setUniform1iv(value: number[] | Int32Array): void |
Sets the value to an array of integers - equivalent to WebGLRenderingContext.uniform1iv . |
|
setUniform2fv(value: number[] | Float32Array): void |
Sets the value as a vec2, equivalent to WebGLRenderingContext.uniform2fv . |
|
setUniform3fv(value: number[] | Float32Array): void |
Sets the value as a vec3 - equivalent to WebGLRenderingContext.uniform3fv . |
|
setUniform4fv(value: number[] | Float32Array): void |
Sets the value as a vec4 - equivalent to WebGLRenderingContext.uniform4fv . |
|
Defined in
Last Updated:
20 June, 2023