Chapter 6. The OpenGL ES Shading Language (GLSL ES)

This chapter takes a break from examining WebGL sample programs and explains the essential features of the OpenGL ES Shading Language (GLSL ES) in detail.

As you have seen, shaders are the core mechanism within WebGL for constructing 3DCG programs, and GLSL ES is the dedicated programming language for writing those shader programs. This chapter covers:

• Data, variables, and variable types

• Vector, matrix, structure, array, and sampler types

• Operators, control flow, and functions

• Attributes, uniform, and varying variables

• Precision qualifiers

• Preprocessor and directives

By the end of this chapter, you will have a good understanding of GLSL ES and how to use it to write a variety of ...

Get WebGL Programming Guide: Interactive 3D Graphics Programming with WebGL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.