Howto:Shader programming in FlightGear
871 bytes added
23:48, 12 October 2014
Effects - shader section additions
In the case of ALS Lights, so far we only have to deal with the fragment shader.
The program section of the effect file is a nifty method used to allow users to add shaders to [[Flightgear]] without having to add code at C level language base. The C level base is programed to recognize the XML tag pair of <program></program> and thus incorporate the GLSL program files pointed to between the tags. Otherwise you would have to add the GLSL program calls in the base C requiring a completely different set of programming skills and also the necessity of compiling [[Flightgear]] everytime you want to add new shaders.
We'll describe the contents of the shader programs below. For now, suffice it to say tree-ALS.frag contains the main program and secondary_lights.frag has functions that are passed uniform data that is manipulated and returned to main for processing.
==== Uniforms ====
=== Shader Program ===
← Older edit
Newer edit →
Retrieved from "
About FlightGear wiki