WebGL Textures & Vertices
4 x 4 Matrices
The vertex shader uses two 4 x 4 matrices.
mat4 um4_matrix rotates and moves
mat4 um4_pmatrix provides
depth or perspective.
This section introduces 4 x 4 matrices for rotation
and translation or movement.
The OpenGL ES shader language represents a 4 x 4 matrix
one dimensional arrays with
The section titled
builds on the foundation provided here.
Think of matrices as tables with rows and columns. A 4 x 4 matrix has four rows and four columns with a total of 16 entries.
Default Identity Matrix
An identity matrix
An identity matrix neither rotates a mesh,
nor provides perspective projection.
However the identity matrix proves useful
to reset transformations.
Transformations include moving, scaling,
rotating, and shearing a mesh.
To implement an identity
0 to every entry in
the matrix, except
those which appear along the diagonal.
1 to entries
along the diagonal.