O'Reilly logo

WebGL Beginner's Guide by Brandon Jones, Diego Cantor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

WebGL implementation

Now let's take a look at how we can implement vertex and normal transformations in WebGL. The following diagram shows the theory that we have learned so far and it shows the relationships between the steps in the theory and the implementation in WebGL.

WebGL implementation

In WebGL, the five transformations that we apply to object coordinates to obtain viewport coordinates are grouped in three matrices and one WebGL method:

  1. The Model-View matrix that groups the model and view transform in one single matrix. When we multiply our vertices by this matrix, we end up in view coordinates.
  2. The Normal matrix is obtained by inverting and transposing the Model-View ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required