Vec2
View sourceTwo-component floating-point vector (0x8B50, FLOAT_VEC2).
Enum
Identifies the GLSL type reported for an active uniform.
Compare the type returned by
WebGLRenderingContext#getActiveUniform with a
member when inspecting uniform metadata. The entries cover vector,
boolean, matrix, sampler, and non-square matrix types.
import { GlUniformType } from '@wimaengine/render-webgl'
const uniform = gl.getActiveUniform(program, 0)
if (uniform?.type === GlUniformType.Matrix4) {
console.log('upload a 4x4 matrix')
}Two-component floating-point vector (0x8B50, FLOAT_VEC2).
Three-component floating-point vector (0x8B51, FLOAT_VEC3).
Four-component floating-point vector (0x8B52, FLOAT_VEC4).
Two-component signed-integer vector (0x8B53, INT_VEC2).
Three-component signed-integer vector (0x8B54, INT_VEC3).
Four-component signed-integer vector (0x8B55, INT_VEC4).
Scalar boolean uniform (0x8B56, BOOL).
Two-component boolean vector (0x8B57, BOOL_VEC2).
Three-component boolean vector (0x8B58, BOOL_VEC3).
Four-component boolean vector (0x8B59, BOOL_VEC4).
Two-by-two floating-point matrix (0x8B5A, FLOAT_MAT2).
Three-by-three floating-point matrix (0x8B5B, FLOAT_MAT3).
Four-by-four floating-point matrix (0x8B5C, FLOAT_MAT4).
Two-dimensional sampler uniform (0x8B5E, SAMPLER_2D).
Cube-map sampler uniform (0x8B60, SAMPLER_CUBE).
Two-column by three-row floating-point matrix (0x8B65, FLOAT_MAT2x3).
Two-column by four-row floating-point matrix (0x8B66, FLOAT_MAT2x4).
Three-column by two-row floating-point matrix (0x8B67, FLOAT_MAT3x2).
Three-column by four-row floating-point matrix (0x8B68, FLOAT_MAT3x4).
Four-column by two-row floating-point matrix (0x8B69, FLOAT_MAT4x2).
Four-column by three-row floating-point matrix (0x8B6A, FLOAT_MAT4x3).