= Shader Types =
There are two types of shaders in GLSL: "vertex shaders" and "fragment shaders".
These are executed by vertex and fragment processors in the graphics hardware.
Typically, vertex shader files use the file extension ".vert", while fragment shader files use the ".frag" extension. In FlightGear, these files can be found in the "Shaders" subdirectory of the base package, i.e. $FG_ROOT/Shaders
For a list of currently available shaders, you may want to take a look at: http://cvs.flightgear.org/viewvc/data/Shaders/
A vertex shader is run once per vertex, while a fragment shader is run once per pixel.
Many such executions can happen in parallel. There is no communication or ordering between
* Vertex color computation
* Geometry skinning
The vertex shader runs from start to end for each and every vertex that's passed into the graphics card - the fragment process does the same thing at the pixel level. In most scenes there are a heck of a lot more pixel fragments than there are vertices - so the performance of the fragment shader is vastly more important and any work we can do in the vertex shader, we probably should.
Common tasks of fragment shaders include:
* Texturing (even procedural)
* Per pixel lighting
* Fragment color computation