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

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

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