Shaders and Data

Initializing Shaders and Passing Data

Before WebGL draws, its two shaders must be compiled, linked into a program and made current: ten calls, which GLH.program() from Hello Triangle has wrapped so far:

The ten steps from shader source to a program in use
The ten steps from shader source to a program in use

Data then reaches the shaders as attributes (per-vertex values from buffers), uniforms (one value for a whole draw call) and varyings (vertex outputs the rasterizer interpolates for each fragment).

Subsections