GLSL
has five basic data types:
- float
- int
- uint
- bool
- sampler
(used
for sampling textures)
Vector
types for float,
int, uint, and bool:
- vec2, vec3,
vec4:
2D, 3D and 4D floating point vector
- ivec2, ivec3,
ivec4:
2D, 3D and 4D integer vector
-
bvec2, bvec3,
bvec4:
2D, 3D and 4D boolean
vector
Matrix
types for float:
- mat2, mat3,
mat4: 2x2, 3x3, 4x4 floating point matrix
Sampler
types:
- sampler1D, sampler2D,
sampler3D: for 1D, 2D, 3D textures
- samplerCube: for cube map textures
- others…
Operator
overloading for matrices, vectors as expected.
Vector
and matrix types compatible with GLM!