GLSL Vector Container A vector in GLSL is a 1,2,3 or 4 component container for any of the basic types just mentioned. They can take the following form (n represents the number of components) — vecn: the default vector of n floats. bvecn: a vector of n booleans. ivecn: a vector of n integers. uvecn: a vector of n unsigned integers. dvecn: a vector of n double components
Explore more quotes
Components of a vector can be accessed via vec.xwhere x is the first component of the vector. You can use .x, .y, .z and .w to access their first, second, third and fourth component respectively. GLSL also allows you to use rgba for colors or stpq for texture coordinates, accessing the same components.