Class FloatVector4Uniform

A float 4D vector global variable in a WebGL shader program.




activeInfo: WebGLActiveInfo

The active information of this uniform.

gl: WebGL2RenderingContext

The rendering context of this variable.

location: WebGLUniformLocation

The location of this uniform.

program: Program

The shader program that this variable belongs to.

sourceLength?: number

The length of the given value. Calculated automatically if not set.

sourceOffset?: number

The offset from the start of the given value to pass to WebGL.

The value of this uniform.


  • get name(): string
  • The name of this variable.

    Returns string

  • get size(): number
  • The size of this variable in memory in bytes.

    Returns number


  • Creates a uniform for the given variable type.


    • program: Program

      The shader program that this uniform belongs to.

    • index: number

      The index of this uniform.

    • textureUnit: number

      The texture unit to assign to this uniform if it ends up being a sampler.

    Returns Uniform

Generated using TypeDoc