Search notes:

Graphic Library Shader Language

Built in types

For example:

Built in functions

For example

Variable types

Four types of variables:

Vectors

Referring to the elements of a vec4 VEC:
First element: VEC.x VEC.s VEC.r VEC[0]
Second element: VEC.y VEC.t VEC.g VEC[1]
Third element: VEC.z VEC.p VEC.b VEC[2]
Fourth element: VEC.w VEC.q VEC.a VEC[3]
The components can be concatenated to create a new vector. The following creates a four element vector whose first three elements are equal:
new_vec = VEC.rrra;

See also

WebGL
Accessing the source code from javascript

Links

shadertoy

Index