A Brief Primer on GLSL - The GL Shader Language

Vertex and Fragment shaders are written in GLSL, a domain-specific mini-language for writing shaders. The syntax is C/C++-like, and basic shaders tend to look like very simple C programs, such as:

Shader Responsibilities

The vertex shader's job is to:

The fragment shader's job is to:

GLSL Features

Here are some things about GLSL that are not C-like:

Examples of working with vector and matrix types