Time for Action: Working on the Wall

Let's cover an example showcasing the preceding concepts in action:

  1. Open the ch03_05_wall.html file in your browser. You will see something similar to the following screenshot:
  1. Open the ch03_05_wall.html file in a code editor.
  2. Go to the vertex shader. Make sure that you identify the attributes, uniforms, and varyings that are declared there.
  3. Go to the fragment shader. Notice that there are no attributes here, because attributes are exclusive to the vertex shader.
Vertex and Fragment Shaders You can find these shaders inside the script tags with the appropriate ID names. For example, the vertex shader ...

Get Real-Time 3D Graphics with WebGL 2 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.