OpenGL Programming/Shaders reference

= Vertex shader1 =

Output variables

 * : vertex homogeneous coordinates in projection space
 * : using rendering points, size of the point

= Fragment shader =

Input variables

 * : pixel coordinates (x,y) + fragment depth (z)
 * : is pixel facing the camera or the opposite direction? (used in two-sided lighting)
 * : when using Point Sprites, position within the point

Output variables

 * : RGBA color to use
 * : alternative to gl_FragColor when drawing to multiple buffers

= References =