Howto:Shader programming in FlightGear: Difference between revisions

Switch to {{fg root file}} to fix the broken Gitorious link.
No edit summary
(Switch to {{fg root file}} to fix the broken Gitorious link.)
Line 80: Line 80:
In FlightGear, these files can be found in the <code>Shaders</code> subdirectory of the base package, in essence <code>$FG_ROOT/Shaders</code>.
In FlightGear, these files can be found in the <code>Shaders</code> subdirectory of the base package, in essence <code>$FG_ROOT/Shaders</code>.


For a list of currently available shaders, you may want to take a look at: http://gitorious.org/fg/fgdata/trees/master/Shaders
For a list of currently available shaders, you may want to take a look at: {{fg root file|Shaders}}.


So, shaders generally go around in pairs - one shader (the ''vertex shader'') is a short program that takes in one vertex from the main CPU and produces one vertex that is passed on to the GPU rasterizer which uses the vertices to create triangles - which it then chops up into individual pixel-sized fragments.  
So, shaders generally go around in pairs - one shader (the ''vertex shader'') is a short program that takes in one vertex from the main CPU and produces one vertex that is passed on to the GPU rasterizer which uses the vertices to create triangles - which it then chops up into individual pixel-sized fragments.