Appendix B. Built-In Functions of GLSL ES 1.0

This appendix details all embedded functions supported by GLSL ES 1.0, including many that are not explained in this book but which are often used in programming shaders.

Note that, in all but texture lookup functions, the operations on vector or matrix arguments are carried out component-wise. For example,

vec2 deg = vec2(60, 80);vec2 rad = radians(deg);

In these examples, the components of the variable rad are assigned values converted from 60 and 80 degrees, respectively.

Angle and Trigonometry Functions

Image

Exponential Functions

Common Functions

The following functions determine which components ...

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.