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 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.