October 2018
Intermediate to advanced
500 pages
12h 40m
English
Recall that once we've applied the Model-View transformation to the vertices, the next step is to transform the view coordinates to NDC coordinates:

We do this by simple multiplication by using ESSL in the vertex shader:
gl_Position = uProjectionMatrix * uModelViewMatrix * vec4(aVertexPosition,1.0);
The predefined variable, gl_Position, stores the NDC coordinates for each vertex of every object defined in the scene.
In the previous multiplication, we augment the shader attribute, aVertexPosition, to a 4-component vertex because our matrices are 4x4. Unlike normals, vertices ...