O'Reilly logo

WebGL Programming Guide: Interactive 3D Graphics Programming with WebGL by Rodger Lea, Kouichi Matsuda

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

Chapter 5. Using Colors and Texture Images

The previous chapters explained the key concepts underlying the foundations of WebGL through the use of examples based on 2D shapes. This approach has given you a good understanding of how to deal with single color geometric shapes in WebGL. Building on these basics, you now delve a little further into WebGL by exploring the following three subjects:

• Passing other data such as color information to the vertex shader

• The conversion from a shape to fragments that takes place between the vertex shader and the fragment shader, which is known as the rasterization process

• Mapping images (or textures) onto the surfaces of a shape or object

This is the final chapter that focuses on the key functionalities ...

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