<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Necolatis</id>
	<title>FlightGear wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Necolatis"/>
	<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/Special:Contributions/Necolatis"/>
	<updated>2026-04-09T13:52:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Add_blackout_and_redout_settings&amp;diff=139851</id>
		<title>Howto:Add blackout and redout settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Add_blackout_and_redout_settings&amp;diff=139851"/>
		<updated>2024-05-18T11:37:26Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Source code */ added heading&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is '''how to add blackout and redout settings''' to an aircraft.  These settings will determine when the view will start to turn black or red and when it will be fully black or red due to {{wikipedia|G-force#Human tolerance of g-force|g-force}}.&lt;br /&gt;
&lt;br /&gt;
{{note|While the pilot will be temporarily blind due to g-force he will not be incapacitated (G-LOC) and will still be able to control the aircraft.}}&lt;br /&gt;
&lt;br /&gt;
The G effect system is time based, so for example the longer time you spend at a high G the darker the screen gets.&lt;br /&gt;
&lt;br /&gt;
The algorithm was used by a US military simulator and has been adapted to Flightgear.&lt;br /&gt;
&lt;br /&gt;
It features gradual vision loss according to G and time in a logarithmic manner. Furthermore, once the pilot has experienced vision loss, the pilot must return G force to below a certain threshold before it starts to clear.&lt;br /&gt;
&lt;br /&gt;
It also features G priming (PPE), so that if you for example pull some high Gs for a while and then go negative, the redout will take longer to come into effect, and vice versa, as the blood flows to or from the pilots brain.&lt;br /&gt;
&lt;br /&gt;
== Tunnel vision, redout and greyout in ALS ==&lt;br /&gt;
If running in [[ALS]] with ALS filters enabled, there will be greyout with tunnel-vision. Only the filters checkbox is needed, no need for infrared or night-vision to be enabled.&lt;br /&gt;
&lt;br /&gt;
Greyout is a transient loss of vision from positive G's, it has these effects:&lt;br /&gt;
&lt;br /&gt;
* Loss of peripheral vision (aka. tunnel vision)&lt;br /&gt;
* Dimming of bright light&lt;br /&gt;
* Desaturation&lt;br /&gt;
* Brown hue (not implemented yet)&lt;br /&gt;
* When the effect is heavy, there is some noise blurring too&lt;br /&gt;
&lt;br /&gt;
Redout has these effects (and no tunnel vision):&lt;br /&gt;
&lt;br /&gt;
* Red hue&lt;br /&gt;
* Loss of vision&lt;br /&gt;
&lt;br /&gt;
Both redout and greyout will end with 100% vision loss.&lt;br /&gt;
&lt;br /&gt;
[[File:Blackout shaders.png|640px|Blackout shaders in effect]]&lt;br /&gt;
&lt;br /&gt;
== G effects in Rembrandt ==&lt;br /&gt;
G effects is not implemented in [[Rembrandt]].&lt;br /&gt;
&lt;br /&gt;
== G effects in HDR ==&lt;br /&gt;
A G effect has been added to [[HDR]].&lt;br /&gt;
&lt;br /&gt;
= Install in aircraft =&lt;br /&gt;
You can customize some parameters according to the quality of the G-suit the pilot is wearing and training in anti-G breathing.&lt;br /&gt;
&lt;br /&gt;
Blackout and redout are controlled through these properties in &amp;lt;code&amp;gt;/sim/rendering/redout/&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;enabled&amp;lt;/code&amp;gt; (bool)&lt;br /&gt;
If the system is on or off.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-onset-g&amp;lt;/code&amp;gt; (double) [Default = 2.5 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/onset-blackout-sec&amp;lt;/code&amp;gt; (double) [Default = 300 seconds]&lt;br /&gt;
Onset-g must be positive and above 1. This is the G-force when the blackout effect will start to come into effect. This is also the G-force that the pilot will have to get below to clear the blackout of the screen. The time property is to set how many seconds it takes to get complete blackout at this G value.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-complete-g&amp;lt;/code&amp;gt; (double) [Default = 4.5 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/fast-blackout-sec&amp;lt;/code&amp;gt; (double) [Default = 10 seconds]&lt;br /&gt;
Complete-g must be higher than blackout-onset-g. This should be at or near to the maximum the pilot should be expected to tolerate depending on his G-suit and anti-G breathing techniques or lack of those. The fast-blackout-sec, is how long it will take to blackout completely at this G value. This should normally be considerably shorter than onset-blackout-sec.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-onset-g&amp;lt;/code&amp;gt; (double) [Default = -2 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-complete-g&amp;lt;/code&amp;gt; (double) [Default = -4 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/onset-redout-sec&amp;lt;/code&amp;gt; (double) [Default = 45 seconds]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/fast-redout-sec&amp;lt;/code&amp;gt; (double) [Default = 7.5 seconds]&lt;br /&gt;
These four works like the first four, just for negative Gs. Onset-g must be below 1 and complete-g must be below onset.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/recover-fast-sec&amp;lt;/code&amp;gt; (double) [Default = 7 seconds]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/recover-slow-sec&amp;lt;/code&amp;gt; (double) [Default = 15 seconds]&lt;br /&gt;
The recover-slow is how long it takes to recover from complete redout/blackout just below the onset, and recover-fast is how long it takes to clear at 1 G.&lt;br /&gt;
&lt;br /&gt;
The default values, is estimated to be for a pilot without G-suit and untrained in anti-G breathing techniques. So defaults is well suited for GA aircraft.&lt;br /&gt;
&lt;br /&gt;
The properties can be controlled at runtime or be added to any [[PropertyList XML files|PropertyList XML file]], for example an [[aircraft-set.xml]] or your own [[FlightGear configuration via XML|configuration file]].&lt;br /&gt;
&lt;br /&gt;
In addition to these properties there is another property, &amp;lt;code&amp;gt;/sim/rendering/headshake/enabled&amp;lt;/code&amp;gt; (bool), that will make the pilots viewpoint move up and down due to the g-force, for example due to maneuvers or turbulence.&lt;br /&gt;
&lt;br /&gt;
== Minimal install ==&lt;br /&gt;
Notice that the new system from FG 2017.1.1 is somewhat backwards compatible with the older system. The old system used only these 5 properties, if you do not want to adjust it too detailed you can just set these 5, they are also the 5 that the pilot can control in the GUI:&lt;br /&gt;
* &amp;lt;code&amp;gt;enabled&amp;lt;/code&amp;gt; (bool)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-onset-g&amp;lt;/code&amp;gt; (double)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-complete-g&amp;lt;/code&amp;gt; (double)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-onset-g&amp;lt;/code&amp;gt; (double)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-complete-g&amp;lt;/code&amp;gt; (double) &lt;br /&gt;
&lt;br /&gt;
== Hearing loss ==&lt;br /&gt;
To add hearing loss, add this extra volume section to each sound effect section in the sound xml, and put this Nasal code in a 10 to 20hz loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Nasal&amp;quot;&amp;gt;&lt;br /&gt;
var bf = getprop(&amp;quot;sim/rendering/als-filters/black-factor&amp;quot;);&lt;br /&gt;
setprop(&amp;quot;mySounds/g-force-effect-volume&amp;quot;, 1-bf);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;volume&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;mySounds/g-force-effect-volume&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;1&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;offset&amp;gt;0&amp;lt;/offset&amp;gt;&lt;br /&gt;
    &amp;lt;min&amp;gt;0&amp;lt;/min&amp;gt;&lt;br /&gt;
    &amp;lt;max&amp;gt;1&amp;lt;/max&amp;gt;&lt;br /&gt;
&amp;lt;/volume&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example (Fighter-jet 1979) ==&lt;br /&gt;
This example show how these setting can be added to a propertylist xml file:&lt;br /&gt;
These blackout settings is the values used in a 1979 Langley simulator for F-16.&lt;br /&gt;
Notice that the redout is also same as the default values, they are low because G-suits mainly protects against high G, not much against negative Gs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
    &amp;lt;sim&amp;gt;&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
        &amp;lt;rendering&amp;gt;&lt;br /&gt;
            &amp;lt;redout&amp;gt;&lt;br /&gt;
                &amp;lt;enabled type=&amp;quot;bool&amp;quot; userarchive=&amp;quot;y&amp;quot;&amp;gt;true&amp;lt;/enabled&amp;gt;&lt;br /&gt;
                &amp;lt;parameters&amp;gt;&lt;br /&gt;
                    &amp;lt;blackout-onset-g type=&amp;quot;double&amp;quot;&amp;gt;5&amp;lt;/blackout-onset-g&amp;gt;&lt;br /&gt;
                    &amp;lt;blackout-complete-g type=&amp;quot;double&amp;quot;&amp;gt;9&amp;lt;/blackout-complete-g&amp;gt;&lt;br /&gt;
                    &amp;lt;onset-blackout-sec type=&amp;quot;double&amp;quot;&amp;gt;300&amp;lt;/onset-blackout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;fast-blackout-sec type=&amp;quot;double&amp;quot;&amp;gt;10&amp;lt;/fast-blackout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;redout-onset-g type=&amp;quot;double&amp;quot;&amp;gt;-2&amp;lt;/redout-onset-g&amp;gt;&lt;br /&gt;
                    &amp;lt;redout-complete-g type=&amp;quot;double&amp;quot;&amp;gt;-4&amp;lt;/redout-complete-g&amp;gt;&lt;br /&gt;
                    &amp;lt;onset-redout-sec type=&amp;quot;double&amp;quot;&amp;gt;45&amp;lt;/onset-redout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;fast-redout-sec type=&amp;quot;double&amp;quot;&amp;gt;7.5&amp;lt;/fast-redout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;recover-fast-sec type=&amp;quot;double&amp;quot;&amp;gt;7&amp;lt;/recover-fast-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;recover-slow-sec type=&amp;quot;double&amp;quot;&amp;gt;15&amp;lt;/recover-slow-sec&amp;gt;&lt;br /&gt;
                &amp;lt;/parameters&amp;gt;&lt;br /&gt;
            &amp;lt;/redout&amp;gt;&lt;br /&gt;
            &amp;lt;headshake&amp;gt;&lt;br /&gt;
                &amp;lt;enabled type=&amp;quot;bool&amp;quot; userarchive=&amp;quot;y&amp;quot;&amp;gt;true&amp;lt;/enabled&amp;gt;&lt;br /&gt;
            &amp;lt;/headshake&amp;gt;&lt;br /&gt;
        &amp;lt;/rendering&amp;gt;&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
    &amp;lt;/sim&amp;gt;&lt;br /&gt;
    &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example (Fighter-jet 1995) ==&lt;br /&gt;
&lt;br /&gt;
For more modern fighters 1995+ you could set the positive G effect settings to something like this (Don't be misled by 8 vs. 9 G, its time curve is much more gentle):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
blackout-onset-g    =    5;&lt;br /&gt;
blackout-complete-g =    8;&lt;br /&gt;
onset-blackout-sec  =  300;&lt;br /&gt;
fast-blackout-sec   =   30;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Forum topics =&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=26380&amp;amp;p=244613 Adding redout and blackout]&lt;br /&gt;
* [https://forum.flightgear.org/viewtopic.php?f=4&amp;amp;t=30985 More realistic Blackout/Redout]&lt;br /&gt;
&lt;br /&gt;
= Mailing list threads =&lt;br /&gt;
* [http://sourceforge.net/p/flightgear/mailman/message/18602699/ &amp;lt;nowiki&amp;gt;[Flightgear-devel] Generic Blackout/Redout&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
= Source code =&lt;br /&gt;
Main system:&lt;br /&gt;
* {{fgdata file|Aircraft/Generic/g-forces.xml}}&lt;br /&gt;
Helper loops:&lt;br /&gt;
* {{fgdata file|Nasal/redout.nas}}&lt;br /&gt;
The basic effect is just to turn screen black/red:&lt;br /&gt;
* {{flightgear file|src/Scenery/redout.hxx}}&lt;br /&gt;
* {{flightgear file|src/Scenery/redout.cxx}}&lt;br /&gt;
The ALS filter redout system works by combining a shader effect with the effect of turning screen back/red:&lt;br /&gt;
* {{fgdata file|Shaders/filters-ALS.frag}}&lt;br /&gt;
The HDR effect is also shader based:&lt;br /&gt;
* {{fgdata file|Shaders/HDR/redout.glsl}}&lt;br /&gt;
&lt;br /&gt;
= Citations =&lt;br /&gt;
* {{cite web&lt;br /&gt;
 | url             = http://www.dtic.mil/dtic/tr/fulltext/u2/a109127.pdf&lt;br /&gt;
 | title           = AFHRL-TP-80-41 - Study and Design of High G Augmentation Devices for Flight Simulators&lt;br /&gt;
 | author          = Kron, Gerald J.; Cardullo, Frank M.; Young, Laurence R.&lt;br /&gt;
 | date            = December 1981&lt;br /&gt;
 | publisher       = US Air Force Human Resources Laboratory&lt;br /&gt;
 | format          = pdf&lt;br /&gt;
 }}&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;br /&gt;
[[Category:Howto]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Add_blackout_and_redout_settings&amp;diff=139850</id>
		<title>Howto:Add blackout and redout settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Add_blackout_and_redout_settings&amp;diff=139850"/>
		<updated>2024-05-18T11:36:46Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Source code */ added citation from deleted page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is '''how to add blackout and redout settings''' to an aircraft.  These settings will determine when the view will start to turn black or red and when it will be fully black or red due to {{wikipedia|G-force#Human tolerance of g-force|g-force}}.&lt;br /&gt;
&lt;br /&gt;
{{note|While the pilot will be temporarily blind due to g-force he will not be incapacitated (G-LOC) and will still be able to control the aircraft.}}&lt;br /&gt;
&lt;br /&gt;
The G effect system is time based, so for example the longer time you spend at a high G the darker the screen gets.&lt;br /&gt;
&lt;br /&gt;
The algorithm was used by a US military simulator and has been adapted to Flightgear.&lt;br /&gt;
&lt;br /&gt;
It features gradual vision loss according to G and time in a logarithmic manner. Furthermore, once the pilot has experienced vision loss, the pilot must return G force to below a certain threshold before it starts to clear.&lt;br /&gt;
&lt;br /&gt;
It also features G priming (PPE), so that if you for example pull some high Gs for a while and then go negative, the redout will take longer to come into effect, and vice versa, as the blood flows to or from the pilots brain.&lt;br /&gt;
&lt;br /&gt;
== Tunnel vision, redout and greyout in ALS ==&lt;br /&gt;
If running in [[ALS]] with ALS filters enabled, there will be greyout with tunnel-vision. Only the filters checkbox is needed, no need for infrared or night-vision to be enabled.&lt;br /&gt;
&lt;br /&gt;
Greyout is a transient loss of vision from positive G's, it has these effects:&lt;br /&gt;
&lt;br /&gt;
* Loss of peripheral vision (aka. tunnel vision)&lt;br /&gt;
* Dimming of bright light&lt;br /&gt;
* Desaturation&lt;br /&gt;
* Brown hue (not implemented yet)&lt;br /&gt;
* When the effect is heavy, there is some noise blurring too&lt;br /&gt;
&lt;br /&gt;
Redout has these effects (and no tunnel vision):&lt;br /&gt;
&lt;br /&gt;
* Red hue&lt;br /&gt;
* Loss of vision&lt;br /&gt;
&lt;br /&gt;
Both redout and greyout will end with 100% vision loss.&lt;br /&gt;
&lt;br /&gt;
[[File:Blackout shaders.png|640px|Blackout shaders in effect]]&lt;br /&gt;
&lt;br /&gt;
== G effects in Rembrandt ==&lt;br /&gt;
G effects is not implemented in [[Rembrandt]].&lt;br /&gt;
&lt;br /&gt;
== G effects in HDR ==&lt;br /&gt;
A G effect has been added to [[HDR]].&lt;br /&gt;
&lt;br /&gt;
= Install in aircraft =&lt;br /&gt;
You can customize some parameters according to the quality of the G-suit the pilot is wearing and training in anti-G breathing.&lt;br /&gt;
&lt;br /&gt;
Blackout and redout are controlled through these properties in &amp;lt;code&amp;gt;/sim/rendering/redout/&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;enabled&amp;lt;/code&amp;gt; (bool)&lt;br /&gt;
If the system is on or off.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-onset-g&amp;lt;/code&amp;gt; (double) [Default = 2.5 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/onset-blackout-sec&amp;lt;/code&amp;gt; (double) [Default = 300 seconds]&lt;br /&gt;
Onset-g must be positive and above 1. This is the G-force when the blackout effect will start to come into effect. This is also the G-force that the pilot will have to get below to clear the blackout of the screen. The time property is to set how many seconds it takes to get complete blackout at this G value.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-complete-g&amp;lt;/code&amp;gt; (double) [Default = 4.5 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/fast-blackout-sec&amp;lt;/code&amp;gt; (double) [Default = 10 seconds]&lt;br /&gt;
Complete-g must be higher than blackout-onset-g. This should be at or near to the maximum the pilot should be expected to tolerate depending on his G-suit and anti-G breathing techniques or lack of those. The fast-blackout-sec, is how long it will take to blackout completely at this G value. This should normally be considerably shorter than onset-blackout-sec.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-onset-g&amp;lt;/code&amp;gt; (double) [Default = -2 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-complete-g&amp;lt;/code&amp;gt; (double) [Default = -4 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/onset-redout-sec&amp;lt;/code&amp;gt; (double) [Default = 45 seconds]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/fast-redout-sec&amp;lt;/code&amp;gt; (double) [Default = 7.5 seconds]&lt;br /&gt;
These four works like the first four, just for negative Gs. Onset-g must be below 1 and complete-g must be below onset.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/recover-fast-sec&amp;lt;/code&amp;gt; (double) [Default = 7 seconds]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/recover-slow-sec&amp;lt;/code&amp;gt; (double) [Default = 15 seconds]&lt;br /&gt;
The recover-slow is how long it takes to recover from complete redout/blackout just below the onset, and recover-fast is how long it takes to clear at 1 G.&lt;br /&gt;
&lt;br /&gt;
The default values, is estimated to be for a pilot without G-suit and untrained in anti-G breathing techniques. So defaults is well suited for GA aircraft.&lt;br /&gt;
&lt;br /&gt;
The properties can be controlled at runtime or be added to any [[PropertyList XML files|PropertyList XML file]], for example an [[aircraft-set.xml]] or your own [[FlightGear configuration via XML|configuration file]].&lt;br /&gt;
&lt;br /&gt;
In addition to these properties there is another property, &amp;lt;code&amp;gt;/sim/rendering/headshake/enabled&amp;lt;/code&amp;gt; (bool), that will make the pilots viewpoint move up and down due to the g-force, for example due to maneuvers or turbulence.&lt;br /&gt;
&lt;br /&gt;
== Minimal install ==&lt;br /&gt;
Notice that the new system from FG 2017.1.1 is somewhat backwards compatible with the older system. The old system used only these 5 properties, if you do not want to adjust it too detailed you can just set these 5, they are also the 5 that the pilot can control in the GUI:&lt;br /&gt;
* &amp;lt;code&amp;gt;enabled&amp;lt;/code&amp;gt; (bool)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-onset-g&amp;lt;/code&amp;gt; (double)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-complete-g&amp;lt;/code&amp;gt; (double)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-onset-g&amp;lt;/code&amp;gt; (double)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-complete-g&amp;lt;/code&amp;gt; (double) &lt;br /&gt;
&lt;br /&gt;
== Hearing loss ==&lt;br /&gt;
To add hearing loss, add this extra volume section to each sound effect section in the sound xml, and put this Nasal code in a 10 to 20hz loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Nasal&amp;quot;&amp;gt;&lt;br /&gt;
var bf = getprop(&amp;quot;sim/rendering/als-filters/black-factor&amp;quot;);&lt;br /&gt;
setprop(&amp;quot;mySounds/g-force-effect-volume&amp;quot;, 1-bf);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;volume&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;mySounds/g-force-effect-volume&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;1&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;offset&amp;gt;0&amp;lt;/offset&amp;gt;&lt;br /&gt;
    &amp;lt;min&amp;gt;0&amp;lt;/min&amp;gt;&lt;br /&gt;
    &amp;lt;max&amp;gt;1&amp;lt;/max&amp;gt;&lt;br /&gt;
&amp;lt;/volume&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example (Fighter-jet 1979) ==&lt;br /&gt;
This example show how these setting can be added to a propertylist xml file:&lt;br /&gt;
These blackout settings is the values used in a 1979 Langley simulator for F-16.&lt;br /&gt;
Notice that the redout is also same as the default values, they are low because G-suits mainly protects against high G, not much against negative Gs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
    &amp;lt;sim&amp;gt;&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
        &amp;lt;rendering&amp;gt;&lt;br /&gt;
            &amp;lt;redout&amp;gt;&lt;br /&gt;
                &amp;lt;enabled type=&amp;quot;bool&amp;quot; userarchive=&amp;quot;y&amp;quot;&amp;gt;true&amp;lt;/enabled&amp;gt;&lt;br /&gt;
                &amp;lt;parameters&amp;gt;&lt;br /&gt;
                    &amp;lt;blackout-onset-g type=&amp;quot;double&amp;quot;&amp;gt;5&amp;lt;/blackout-onset-g&amp;gt;&lt;br /&gt;
                    &amp;lt;blackout-complete-g type=&amp;quot;double&amp;quot;&amp;gt;9&amp;lt;/blackout-complete-g&amp;gt;&lt;br /&gt;
                    &amp;lt;onset-blackout-sec type=&amp;quot;double&amp;quot;&amp;gt;300&amp;lt;/onset-blackout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;fast-blackout-sec type=&amp;quot;double&amp;quot;&amp;gt;10&amp;lt;/fast-blackout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;redout-onset-g type=&amp;quot;double&amp;quot;&amp;gt;-2&amp;lt;/redout-onset-g&amp;gt;&lt;br /&gt;
                    &amp;lt;redout-complete-g type=&amp;quot;double&amp;quot;&amp;gt;-4&amp;lt;/redout-complete-g&amp;gt;&lt;br /&gt;
                    &amp;lt;onset-redout-sec type=&amp;quot;double&amp;quot;&amp;gt;45&amp;lt;/onset-redout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;fast-redout-sec type=&amp;quot;double&amp;quot;&amp;gt;7.5&amp;lt;/fast-redout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;recover-fast-sec type=&amp;quot;double&amp;quot;&amp;gt;7&amp;lt;/recover-fast-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;recover-slow-sec type=&amp;quot;double&amp;quot;&amp;gt;15&amp;lt;/recover-slow-sec&amp;gt;&lt;br /&gt;
                &amp;lt;/parameters&amp;gt;&lt;br /&gt;
            &amp;lt;/redout&amp;gt;&lt;br /&gt;
            &amp;lt;headshake&amp;gt;&lt;br /&gt;
                &amp;lt;enabled type=&amp;quot;bool&amp;quot; userarchive=&amp;quot;y&amp;quot;&amp;gt;true&amp;lt;/enabled&amp;gt;&lt;br /&gt;
            &amp;lt;/headshake&amp;gt;&lt;br /&gt;
        &amp;lt;/rendering&amp;gt;&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
    &amp;lt;/sim&amp;gt;&lt;br /&gt;
    &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example (Fighter-jet 1995) ==&lt;br /&gt;
&lt;br /&gt;
For more modern fighters 1995+ you could set the positive G effect settings to something like this (Don't be misled by 8 vs. 9 G, its time curve is much more gentle):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
blackout-onset-g    =    5;&lt;br /&gt;
blackout-complete-g =    8;&lt;br /&gt;
onset-blackout-sec  =  300;&lt;br /&gt;
fast-blackout-sec   =   30;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Forum topics =&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=26380&amp;amp;p=244613 Adding redout and blackout]&lt;br /&gt;
* [https://forum.flightgear.org/viewtopic.php?f=4&amp;amp;t=30985 More realistic Blackout/Redout]&lt;br /&gt;
&lt;br /&gt;
= Mailing list threads =&lt;br /&gt;
* [http://sourceforge.net/p/flightgear/mailman/message/18602699/ &amp;lt;nowiki&amp;gt;[Flightgear-devel] Generic Blackout/Redout&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
= Source code =&lt;br /&gt;
Main system:&lt;br /&gt;
* {{fgdata file|Aircraft/Generic/g-forces.xml}}&lt;br /&gt;
Helper loops:&lt;br /&gt;
* {{fgdata file|Nasal/redout.nas}}&lt;br /&gt;
The basic effect is just to turn screen black/red:&lt;br /&gt;
* {{flightgear file|src/Scenery/redout.hxx}}&lt;br /&gt;
* {{flightgear file|src/Scenery/redout.cxx}}&lt;br /&gt;
The ALS filter redout system works by combining a shader effect with the effect of turning screen back/red:&lt;br /&gt;
* {{fgdata file|Shaders/filters-ALS.frag}}&lt;br /&gt;
The HDR effect is also shader based:&lt;br /&gt;
* {{fgdata file|Shaders/HDR/redout.glsl}}&lt;br /&gt;
&lt;br /&gt;
* {{cite web&lt;br /&gt;
 | url             = http://www.dtic.mil/dtic/tr/fulltext/u2/a109127.pdf&lt;br /&gt;
 | title           = AFHRL-TP-80-41 - Study and Design of High G Augmentation Devices for Flight Simulators&lt;br /&gt;
 | author          = Kron, Gerald J.; Cardullo, Frank M.; Young, Laurence R.&lt;br /&gt;
 | date            = December 1981&lt;br /&gt;
 | publisher       = US Air Force Human Resources Laboratory&lt;br /&gt;
 | format          = pdf&lt;br /&gt;
 }}&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;br /&gt;
[[Category:Howto]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Add_blackout_and_redout_settings&amp;diff=139847</id>
		<title>Howto:Add blackout and redout settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Add_blackout_and_redout_settings&amp;diff=139847"/>
		<updated>2024-05-18T11:32:41Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: Removed old outdated info for FG 2017 and restructured article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is '''how to add blackout and redout settings''' to an aircraft.  These settings will determine when the view will start to turn black or red and when it will be fully black or red due to {{wikipedia|G-force#Human tolerance of g-force|g-force}}.&lt;br /&gt;
&lt;br /&gt;
{{note|While the pilot will be temporarily blind due to g-force he will not be incapacitated (G-LOC) and will still be able to control the aircraft.}}&lt;br /&gt;
&lt;br /&gt;
The G effect system is time based, so for example the longer time you spend at a high G the darker the screen gets.&lt;br /&gt;
&lt;br /&gt;
The algorithm was used by a US military simulator and has been adapted to Flightgear.&lt;br /&gt;
&lt;br /&gt;
It features gradual vision loss according to G and time in a logarithmic manner. Furthermore, once the pilot has experienced vision loss, the pilot must return G force to below a certain threshold before it starts to clear.&lt;br /&gt;
&lt;br /&gt;
It also features G priming (PPE), so that if you for example pull some high Gs for a while and then go negative, the redout will take longer to come into effect, and vice versa, as the blood flows to or from the pilots brain.&lt;br /&gt;
&lt;br /&gt;
== Tunnel vision, redout and greyout in ALS ==&lt;br /&gt;
If running in [[ALS]] with ALS filters enabled, there will be greyout with tunnel-vision. Only the filters checkbox is needed, no need for infrared or night-vision to be enabled.&lt;br /&gt;
&lt;br /&gt;
Greyout is a transient loss of vision from positive G's, it has these effects:&lt;br /&gt;
&lt;br /&gt;
* Loss of peripheral vision (aka. tunnel vision)&lt;br /&gt;
* Dimming of bright light&lt;br /&gt;
* Desaturation&lt;br /&gt;
* Brown hue (not implemented yet)&lt;br /&gt;
* When the effect is heavy, there is some noise blurring too&lt;br /&gt;
&lt;br /&gt;
Redout has these effects (and no tunnel vision):&lt;br /&gt;
&lt;br /&gt;
* Red hue&lt;br /&gt;
* Loss of vision&lt;br /&gt;
&lt;br /&gt;
Both redout and greyout will end with 100% vision loss.&lt;br /&gt;
&lt;br /&gt;
[[File:Blackout shaders.png|640px|Blackout shaders in effect]]&lt;br /&gt;
&lt;br /&gt;
== G effects in Rembrandt ==&lt;br /&gt;
G effects is not implemented in [[Rembrandt]].&lt;br /&gt;
&lt;br /&gt;
== G effects in HDR ==&lt;br /&gt;
A G effect has been added to [[HDR]].&lt;br /&gt;
&lt;br /&gt;
= Install in aircraft =&lt;br /&gt;
You can customize some parameters according to the quality of the G-suit the pilot is wearing and training in anti-G breathing.&lt;br /&gt;
&lt;br /&gt;
Blackout and redout are controlled through these properties in &amp;lt;code&amp;gt;/sim/rendering/redout/&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;enabled&amp;lt;/code&amp;gt; (bool)&lt;br /&gt;
If the system is on or off.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-onset-g&amp;lt;/code&amp;gt; (double) [Default = 2.5 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/onset-blackout-sec&amp;lt;/code&amp;gt; (double) [Default = 300 seconds]&lt;br /&gt;
Onset-g must be positive and above 1. This is the G-force when the blackout effect will start to come into effect. This is also the G-force that the pilot will have to get below to clear the blackout of the screen. The time property is to set how many seconds it takes to get complete blackout at this G value.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-complete-g&amp;lt;/code&amp;gt; (double) [Default = 4.5 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/fast-blackout-sec&amp;lt;/code&amp;gt; (double) [Default = 10 seconds]&lt;br /&gt;
Complete-g must be higher than blackout-onset-g. This should be at or near to the maximum the pilot should be expected to tolerate depending on his G-suit and anti-G breathing techniques or lack of those. The fast-blackout-sec, is how long it will take to blackout completely at this G value. This should normally be considerably shorter than onset-blackout-sec.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-onset-g&amp;lt;/code&amp;gt; (double) [Default = -2 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-complete-g&amp;lt;/code&amp;gt; (double) [Default = -4 G]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/onset-redout-sec&amp;lt;/code&amp;gt; (double) [Default = 45 seconds]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/fast-redout-sec&amp;lt;/code&amp;gt; (double) [Default = 7.5 seconds]&lt;br /&gt;
These four works like the first four, just for negative Gs. Onset-g must be below 1 and complete-g must be below onset.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/recover-fast-sec&amp;lt;/code&amp;gt; (double) [Default = 7 seconds]&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/recover-slow-sec&amp;lt;/code&amp;gt; (double) [Default = 15 seconds]&lt;br /&gt;
The recover-slow is how long it takes to recover from complete redout/blackout just below the onset, and recover-fast is how long it takes to clear at 1 G.&lt;br /&gt;
&lt;br /&gt;
The default values, is estimated to be for a pilot without G-suit and untrained in anti-G breathing techniques. So defaults is well suited for GA aircraft.&lt;br /&gt;
&lt;br /&gt;
The properties can be controlled at runtime or be added to any [[PropertyList XML files|PropertyList XML file]], for example an [[aircraft-set.xml]] or your own [[FlightGear configuration via XML|configuration file]].&lt;br /&gt;
&lt;br /&gt;
In addition to these properties there is another property, &amp;lt;code&amp;gt;/sim/rendering/headshake/enabled&amp;lt;/code&amp;gt; (bool), that will make the pilots viewpoint move up and down due to the g-force, for example due to maneuvers or turbulence.&lt;br /&gt;
&lt;br /&gt;
== Minimal install ==&lt;br /&gt;
Notice that the new system from FG 2017.1.1 is somewhat backwards compatible with the older system. The old system used only these 5 properties, if you do not want to adjust it too detailed you can just set these 5, they are also the 5 that the pilot can control in the GUI:&lt;br /&gt;
* &amp;lt;code&amp;gt;enabled&amp;lt;/code&amp;gt; (bool)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-onset-g&amp;lt;/code&amp;gt; (double)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/blackout-complete-g&amp;lt;/code&amp;gt; (double)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-onset-g&amp;lt;/code&amp;gt; (double)&lt;br /&gt;
* &amp;lt;code&amp;gt;parameters/redout-complete-g&amp;lt;/code&amp;gt; (double) &lt;br /&gt;
&lt;br /&gt;
== Hearing loss ==&lt;br /&gt;
To add hearing loss, add this extra volume section to each sound effect section in the sound xml, and put this Nasal code in a 10 to 20hz loop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Nasal&amp;quot;&amp;gt;&lt;br /&gt;
var bf = getprop(&amp;quot;sim/rendering/als-filters/black-factor&amp;quot;);&lt;br /&gt;
setprop(&amp;quot;mySounds/g-force-effect-volume&amp;quot;, 1-bf);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;volume&amp;gt;&lt;br /&gt;
    &amp;lt;property&amp;gt;mySounds/g-force-effect-volume&amp;lt;/property&amp;gt;&lt;br /&gt;
    &amp;lt;factor&amp;gt;1&amp;lt;/factor&amp;gt;&lt;br /&gt;
    &amp;lt;offset&amp;gt;0&amp;lt;/offset&amp;gt;&lt;br /&gt;
    &amp;lt;min&amp;gt;0&amp;lt;/min&amp;gt;&lt;br /&gt;
    &amp;lt;max&amp;gt;1&amp;lt;/max&amp;gt;&lt;br /&gt;
&amp;lt;/volume&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example (Fighter-jet 1979) ==&lt;br /&gt;
This example show how these setting can be added to a propertylist xml file:&lt;br /&gt;
These blackout settings is the values used in a 1979 Langley simulator for F-16.&lt;br /&gt;
Notice that the redout is also same as the default values, they are low because G-suits mainly protects against high G, not much against negative Gs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
    &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
    &amp;lt;sim&amp;gt;&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
        &amp;lt;rendering&amp;gt;&lt;br /&gt;
            &amp;lt;redout&amp;gt;&lt;br /&gt;
                &amp;lt;enabled type=&amp;quot;bool&amp;quot; userarchive=&amp;quot;y&amp;quot;&amp;gt;true&amp;lt;/enabled&amp;gt;&lt;br /&gt;
                &amp;lt;parameters&amp;gt;&lt;br /&gt;
                    &amp;lt;blackout-onset-g type=&amp;quot;double&amp;quot;&amp;gt;5&amp;lt;/blackout-onset-g&amp;gt;&lt;br /&gt;
                    &amp;lt;blackout-complete-g type=&amp;quot;double&amp;quot;&amp;gt;9&amp;lt;/blackout-complete-g&amp;gt;&lt;br /&gt;
                    &amp;lt;onset-blackout-sec type=&amp;quot;double&amp;quot;&amp;gt;300&amp;lt;/onset-blackout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;fast-blackout-sec type=&amp;quot;double&amp;quot;&amp;gt;10&amp;lt;/fast-blackout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;redout-onset-g type=&amp;quot;double&amp;quot;&amp;gt;-2&amp;lt;/redout-onset-g&amp;gt;&lt;br /&gt;
                    &amp;lt;redout-complete-g type=&amp;quot;double&amp;quot;&amp;gt;-4&amp;lt;/redout-complete-g&amp;gt;&lt;br /&gt;
                    &amp;lt;onset-redout-sec type=&amp;quot;double&amp;quot;&amp;gt;45&amp;lt;/onset-redout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;fast-redout-sec type=&amp;quot;double&amp;quot;&amp;gt;7.5&amp;lt;/fast-redout-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;recover-fast-sec type=&amp;quot;double&amp;quot;&amp;gt;7&amp;lt;/recover-fast-sec&amp;gt;&lt;br /&gt;
                    &amp;lt;recover-slow-sec type=&amp;quot;double&amp;quot;&amp;gt;15&amp;lt;/recover-slow-sec&amp;gt;&lt;br /&gt;
                &amp;lt;/parameters&amp;gt;&lt;br /&gt;
            &amp;lt;/redout&amp;gt;&lt;br /&gt;
            &amp;lt;headshake&amp;gt;&lt;br /&gt;
                &amp;lt;enabled type=&amp;quot;bool&amp;quot; userarchive=&amp;quot;y&amp;quot;&amp;gt;true&amp;lt;/enabled&amp;gt;&lt;br /&gt;
            &amp;lt;/headshake&amp;gt;&lt;br /&gt;
        &amp;lt;/rendering&amp;gt;&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
    &amp;lt;/sim&amp;gt;&lt;br /&gt;
    &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example (Fighter-jet 1995) ==&lt;br /&gt;
&lt;br /&gt;
For more modern fighters 1995+ you could set the positive G effect settings to something like this (Don't be misled by 8 vs. 9 G, its time curve is much more gentle):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
blackout-onset-g    =    5;&lt;br /&gt;
blackout-complete-g =    8;&lt;br /&gt;
onset-blackout-sec  =  300;&lt;br /&gt;
fast-blackout-sec   =   30;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Forum topics =&lt;br /&gt;
* [http://forum.flightgear.org/viewtopic.php?f=47&amp;amp;t=26380&amp;amp;p=244613 Adding redout and blackout]&lt;br /&gt;
* [https://forum.flightgear.org/viewtopic.php?f=4&amp;amp;t=30985 More realistic Blackout/Redout]&lt;br /&gt;
&lt;br /&gt;
= Mailing list threads =&lt;br /&gt;
* [http://sourceforge.net/p/flightgear/mailman/message/18602699/ &amp;lt;nowiki&amp;gt;[Flightgear-devel] Generic Blackout/Redout&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
= Source code =&lt;br /&gt;
Main system:&lt;br /&gt;
* {{fgdata file|Aircraft/Generic/g-forces.xml}}&lt;br /&gt;
Helper loops:&lt;br /&gt;
* {{fgdata file|Nasal/redout.nas}}&lt;br /&gt;
The basic effect is just to turn screen black/red:&lt;br /&gt;
* {{flightgear file|src/Scenery/redout.hxx}}&lt;br /&gt;
* {{flightgear file|src/Scenery/redout.cxx}}&lt;br /&gt;
The ALS filter redout system works by combining a shader effect with the effect of turning screen back/red:&lt;br /&gt;
* {{fgdata file|Shaders/filters-ALS.frag}}&lt;br /&gt;
The HDR effect is also shader based:&lt;br /&gt;
* {{fgdata file|Shaders/HDR/redout.glsl}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft enhancement]]&lt;br /&gt;
[[Category:Howto]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=AI_Scenarios&amp;diff=138655</id>
		<title>AI Scenarios</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=AI_Scenarios&amp;diff=138655"/>
		<updated>2023-11-10T09:35:30Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: Add info on how to load scenarios&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are multiple way to to load a scenario in FG:&lt;br /&gt;
&lt;br /&gt;
* Put the scenarios in $FG_HOME/Scenarios&lt;br /&gt;
* Put the scenarios in {aircraft-dir}/Scenarios&lt;br /&gt;
* Put them in {add-on}/Scenarios&lt;br /&gt;
* Put them in $FGDATA/Scenarios&lt;br /&gt;
* Passing the path to a scenario file to —ai-scenario, eg —ai-scenario=/home/jmt/FGFS/my-test-scenario.xml&lt;br /&gt;
&lt;br /&gt;
When it has been loaded, it also need to be enabled. That can be done from command-line or from the menu.&lt;br /&gt;
&lt;br /&gt;
= Demo scenarios =&lt;br /&gt;
This is a list of the demo scenarios, distributed with Flightgear 2019.1&lt;br /&gt;
&lt;br /&gt;
To find additional scenarios, take a look at [[Hangars#Unofficial_sites|unofficial hangars]].&lt;br /&gt;
&lt;br /&gt;
===aircraft_demo===&lt;br /&gt;
737 takeoff from runway 28L at KSFO and fly the Porte Departure to the south&lt;br /&gt;
&lt;br /&gt;
===ballon_demo===&lt;br /&gt;
Spawns some hotair ballons close to where you start.&lt;br /&gt;
&lt;br /&gt;
===clemenceau_demo===&lt;br /&gt;
Puts french carrier Clemenceau at:&lt;br /&gt;
&amp;lt;latitude&amp;gt;42.800&amp;lt;/latitude&amp;gt;&lt;br /&gt;
&amp;lt;longitude&amp;gt;6.325&amp;lt;/longitude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===droptank_demo===&lt;br /&gt;
Ties droptanks to the aircraft. This is a ballistic AI object, once released it will follow a ballistic curve.&lt;br /&gt;
&lt;br /&gt;
===droptank_hunter_demo===&lt;br /&gt;
Ties droptanks to the aircraft. This is a ballistic AI object, once released it will follow a ballistic curve.&lt;br /&gt;
&lt;br /&gt;
===eisenhower_demo===&lt;br /&gt;
Sets up USS Eisenhower in operating an operating box off Norfolk VA.&lt;br /&gt;
&lt;br /&gt;
===foch_demo===&lt;br /&gt;
Puts french carrier Foch at:&lt;br /&gt;
&amp;lt;latitude&amp;gt;42.830&amp;lt;/latitude&amp;gt;&lt;br /&gt;
&amp;lt;longitude&amp;gt;6.325&amp;lt;/longitude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hint: If the Foch model is missing in your Flightgear installation, just copy Clemenceau.xml to Foch.xml and exchange all strings &amp;quot;Clemenceau&amp;quot; to &amp;quot;Foch&amp;quot; in the xml file. These two carriers are the same type of ship in the real world.&lt;br /&gt;
&lt;br /&gt;
===ICE3_demo===&lt;br /&gt;
A german train from Frankfurt to Essen.&lt;br /&gt;
Select Frankfurt (EDDF) airport, hang about a bit, The ICE3 runs close to the main terminal, and is relatively easy to spot.&lt;br /&gt;
&lt;br /&gt;
===KRHV_towing_demo===&lt;br /&gt;
J3 takeoff from runway 31L at KRHV for aerotowing.&lt;br /&gt;
&lt;br /&gt;
===KSFO_AirTrain===&lt;br /&gt;
Trains drive around on elevated rails in KSFO.&lt;br /&gt;
&lt;br /&gt;
===lead_aircraft===&lt;br /&gt;
A 737 tanker at 3000 circling above KSFO.&lt;br /&gt;
&lt;br /&gt;
===load_demo===&lt;br /&gt;
This was a first try to create an external cargo, which could be carried/ towed by a helicopter or any other aircraft. &lt;br /&gt;
The goal was to simulate realistic slung loads and winching operation.&lt;br /&gt;
The file places an AI ballistic object at 28R KSFO. The object can be easily controlled by applying forces, which are defined in terms of &lt;br /&gt;
Magnitude (lbf), Azimuth (deg, North = O) and Elevation (deg, up = 90). When released it behaves like any other ballistic AI-Object.&lt;br /&gt;
Like any AI-object it can be hooked. To make it workable, the forces on the hook must be applied and transformed to the AI Object. &lt;br /&gt;
Weight, slug mass and aerodynamic drag of the object can be defined in the file. &lt;br /&gt;
This project has been stopped due problems which couldn't be solved at this time. &lt;br /&gt;
&lt;br /&gt;
Nethertheless with little effort, the problems could be solved today and would have many advantages over the current approach described in &lt;br /&gt;
http://forum.flightgear.org/viewtopic.php?f=23&amp;amp;t=23996. &lt;br /&gt;
As an example you could also create more easily AI missiles or rockets, or carrying a Space Shuttle which could be released and controlled to get landed on an airport, everything without much lines of nasal scripts.&lt;br /&gt;
For more infos and the developing background: http://sourceforge.net/p/flightgear/mailman/message/15801723/&lt;br /&gt;
The file load_demo.xml itself gives information in how to use. &lt;br /&gt;
&lt;br /&gt;
===nimitz_demo===&lt;br /&gt;
Places 2 Nimitz-class Carriers in the environment:&lt;br /&gt;
&lt;br /&gt;
USS Nimitz - in the Pacific Ocean off San Fransisco&lt;br /&gt;
&lt;br /&gt;
USS Eisenhower in the Mediterranean off Toulon&lt;br /&gt;
&lt;br /&gt;
===PAVictoria===&lt;br /&gt;
Ferry will depart from port near KNOW.&lt;br /&gt;
&lt;br /&gt;
===railway_demo===&lt;br /&gt;
This scenario runs a variety of trains and buses along tracks or roads near Wakefield, Yorkshire, UK&lt;br /&gt;
&lt;br /&gt;
Select Leeds-Bradford (EGNM) airport, fly 165 deg until you get to Wakefield. Look around: there is a railway line to the south of the city, and one to the east. The bus runs out to the west. Look carefully - the trains and bus are very hard to pick out.&lt;br /&gt;
&lt;br /&gt;
===sanantonio_demo===&lt;br /&gt;
Puts carrier USS San Antonio at:&lt;br /&gt;
&amp;lt;latitude&amp;gt;32.75&amp;lt;/latitude&amp;gt;&lt;br /&gt;
&amp;lt;longitude&amp;gt;-117.34&amp;lt;/longitude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===seahawk_wingman_demo===&lt;br /&gt;
A Seahawk wingman.&lt;br /&gt;
&lt;br /&gt;
PS. The plane must be installed in data/aircraft folder.&lt;br /&gt;
&lt;br /&gt;
===ship_demo===&lt;br /&gt;
Puts a sailboat in the bay just east of KSFO&lt;br /&gt;
&lt;br /&gt;
===steam_train_demo===&lt;br /&gt;
A steamtrain operating in North Yorkshire Moors, UK.&lt;br /&gt;
&lt;br /&gt;
To find it start at EGXZ - TOPCLIFFE and fly 084 degrees magnetic&lt;br /&gt;
&lt;br /&gt;
===tankers===&lt;br /&gt;
Several tanker aircraft &lt;br /&gt;
&lt;br /&gt;
===truman_demo===&lt;br /&gt;
Puts carrier USS Harry S.Truman at:&lt;br /&gt;
&amp;lt;latitude&amp;gt;21.3&amp;lt;/latitude&amp;gt;&lt;br /&gt;
&amp;lt;longitude&amp;gt;-157.3&amp;lt;/longitude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
35nm east of Honolulu near PHNL&lt;br /&gt;
&lt;br /&gt;
===vinson_demo===&lt;br /&gt;
Puts carrier USS Vinson at:&lt;br /&gt;
&amp;lt;latitude&amp;gt;37.8&amp;lt;/latitude&amp;gt;&lt;br /&gt;
&amp;lt;longitude&amp;gt;-123.6&amp;lt;/longitude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
60nm west of San Fransisco&lt;br /&gt;
&lt;br /&gt;
===wingman_b29_2_demo===&lt;br /&gt;
B29 Section 2 adds 4 B29 aircraft as wingmen.&lt;br /&gt;
&lt;br /&gt;
===wingman_b29_3_demo===&lt;br /&gt;
B29 Section 3 adds 4 B29 aircraft as wingmen.&lt;br /&gt;
&lt;br /&gt;
PS. It assumes the b29 is put in default FG aircraft folder.&lt;br /&gt;
&lt;br /&gt;
===wingman_b29_demo===&lt;br /&gt;
B29 Section with 3 B29 aircraft as wingmen.&lt;br /&gt;
&lt;br /&gt;
===wingman_demo===&lt;br /&gt;
One british twin engine Bucaneer acts as wingman. This only works if its installed into data/Aircraft folder.&lt;br /&gt;
&lt;br /&gt;
===wingman2_demo===&lt;br /&gt;
Two british twin engine Bucaneer act as wingmen. This only works if they are installed into data/Aircraft folder.&lt;br /&gt;
&lt;br /&gt;
= Deprecated scenarios =&lt;br /&gt;
The following scenarios are no longer available in FG 2019.1&lt;br /&gt;
&lt;br /&gt;
===bigstorm_demo===&lt;br /&gt;
Big thunderstrom over San Fransisco.&lt;br /&gt;
Remark: no longer available in FG 2019.1&lt;br /&gt;
&lt;br /&gt;
===refueling_demo===&lt;br /&gt;
Puts an 737 aerial tanker in orbit over KSFO at 3000 ft AGL.&lt;br /&gt;
Remark: no longer available in FG 2019.1&lt;br /&gt;
&lt;br /&gt;
===refueling_demo_1===&lt;br /&gt;
Puts an KC-135 aerial tanker in a N/S towline starting over KSFO at 8000 ft AGL.&lt;br /&gt;
Remark: no longer available in FG 2019.1&lt;br /&gt;
&lt;br /&gt;
===refueling_demo_2===&lt;br /&gt;
Puts an KC-135 aerial tanker in a N/S towline starting over KSFO at 8000 ft AGL.&lt;br /&gt;
Remark: no longer available in FG 2019.1&lt;br /&gt;
&lt;br /&gt;
===Thermal_demo===&lt;br /&gt;
Thermal winds over KSFO.&lt;br /&gt;
Remark: no longer available in FG 2019.1&lt;br /&gt;
&lt;br /&gt;
= Flightplan scenario=&lt;br /&gt;
AI flightplan scenarios are very simple.  Simply tie a flightplan to a model, and you have a scenario.  Below, I'm going to go explain exactly how this is done.&lt;br /&gt;
&lt;br /&gt;
== Flightplans and Their Waypoints ==&lt;br /&gt;
Flightplans have a basic structure that you must adhere to in order to create one successfully.  They are in XML, and consist of several waypoints.  So, you have the XML header at the top followed by a PropertyList tag and a flightplan tag, followed by a series of waypoints, a final waypoint with no coordinates, called EOF (end of flight), and the end tags for PropertyList and flightplan.&lt;br /&gt;
&lt;br /&gt;
Each waypoint has eight parameters.  They tend to be written in the following order: name, lat, lon, alt, ktas, on-ground, gear-down, flaps-down.  All waypoints, except EOF, must have these, or the scenario may behave unpredictably.  Furthermore, all waypoints are tagged with a wpt tag.  Now, to go through the different parameters.&lt;br /&gt;
&lt;br /&gt;
* name: can consist of anything.  If you want to use a word or a number, it doesn't matter so long as the characters in it are allowed in XML.&lt;br /&gt;
* lat: the model's latitude at the waypoint.&lt;br /&gt;
* lon: the model's longitude at the waypoint.&lt;br /&gt;
* alt: the model's altitude.&lt;br /&gt;
* ktas: Knots True AirSpeed of the model.&lt;br /&gt;
* on-ground: a boolean value expressed as an integer value of either 1 or 0.&lt;br /&gt;
* gear-down: a boolean value expressed as an integer value of either 1 or 0.&lt;br /&gt;
* flaps-down: a float value expressed a value between 0 and 1.&lt;br /&gt;
* on-ground need not necessarily be placed correctly.  In the example, you will see that, for all waypoints, this value is set to zero.  You may want to play around with this one.  If you set it to 1 too early (for a landing), the aircraft will be thrust onto the ground sharply.  If you set it late, then things should be okay.  Or, it may appear to hover if you’ve set the altitude a bit high.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SFOBridges1.png]][[File:SFOBridges2.png]]&lt;br /&gt;
&lt;br /&gt;
Once completed, be sure to save as an XML file in the AI/flightplans directory.&lt;br /&gt;
&lt;br /&gt;
== Tying Things Together ==&lt;br /&gt;
Next, you need to create the scenario XML file.  For the example, I will simply borrow an existing one, and make modifications to it.  I’ll choose aircraft_demo.xml.  As you will see, you need PropertyList and scenario tags.  A description is optional, but recommended.  Then, there’s an entry for a model.  It starts with an entry tag.  Then, it’s given a callsign.  The type is aircraft.  There are different types you can specify for different kinds of scenarios; however, we’re just going to focus on the aircraft type.  There are various classes as well.  This one is set to jet transport.  I think there’s a light class as well, but they all seem to behave the same to me.  If someone else, more knowledgeable in this area could clarify things that would be helpful.  Next is the model.  Just set the path to the aircraft of your choice.  It’s recommended that you use a low-poly aircraft from the AI directory, but a regular aircraft works fine as well.  After that is the flightplan parameter.  Simply set the path to your flightplan.  Finally, there is an option to set your scenario to either simply terminate or repeat once completed.  Enter a 1 for repeat, a 0 for no repeat.  Remember to add all your end-tags when you have finished, and save it with a name other than the one you modified (if you chose to modify an existing scenario).&lt;br /&gt;
==Special Tools ==&lt;br /&gt;
There are two great tools for making flight plans.  You can use Oscar’s Flightplan Generator or redneck’s Flightplan Generator.  They work very differently, but can be used together to further enhance your AI scenarios.  Oscar’s Flightplan Generator uses a Google Maps interface in which you simply click on the location you want to place a waypoint at, and enter the rest of the data (speed, altitude, on-ground, etc.).  redneck’s Flightplan Generator is a custom FlightGear logger.  Simply start FG with the logger, using the --generic=file,out,0.1,path/to/flightplan/file,dgrecord2 command.  If you have named the logger something other than dgrecord2, then subsitute the actual name for dgrecord2.  This won’t work in FGRun’s interface, so just tack it on to the executable line, being sure to add a space between the executable and the command.  Then, just fly the flight you want the AI aircraft to fly.  Once finished, close FG, and check the flightplan file.  You will find your once blank file is suddenly filled with all the necessary data, plus some useless data points.  You will need to trim off the waypoints with KTAS &amp;lt; 10 so that your AI model can get off the ground in some reasonable amount of time. Both tools can be found at the Official FlightGear Forum.&lt;br /&gt;
&lt;br /&gt;
http://forum.flightgear.org/viewtopic.php?f=23&amp;amp;t=9151&amp;amp;hilit=Oscar%E2%80%99s+Flightplan+Generator&lt;br /&gt;
&lt;br /&gt;
http://oscar.bouwmans.name/FlightGear/aiscenario/&lt;br /&gt;
&lt;br /&gt;
==Common Issues ==&lt;br /&gt;
I believe I have created the flightplan correctly, yet, when I run the scenario, the plane doesn’t follow the route as expected.&lt;br /&gt;
There are a few possible reasons for this.&lt;br /&gt;
&lt;br /&gt;
1.	AI scenarios are flown with turn anticipation.  Therefore, the aircraft will rarely fly all the way to the waypoint, especially if it’s at a turning point.  You may want to adjust for this by setting the entry point of the turn a little late.  You can do this by changing the coordinates of the problem waypoint.&lt;br /&gt;
&lt;br /&gt;
2.	Is your plane doing flat loops?  Perhaps you have set your waypoints too close together.  The AI aircraft in the scenario always goes from the first waypoint to the next nearest waypoint, regardless of what order you put your waypoints in.  Therefore, it’s important that you avoid making circles or any kind of flight that starts and ends at roughly the same location.&lt;br /&gt;
&lt;br /&gt;
3.	Another possibility is that you are expecting the aircraft to turn tighter than the AI scenario will allow it to turn.  Write your flightplans to use gentle turns to correct this, or a slower speed.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[Status of AI in FlightGear]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Artificial intelligence]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Canvas_Nasal_API&amp;diff=138437</id>
		<title>Canvas Nasal API</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Canvas_Nasal_API&amp;diff=138437"/>
		<updated>2023-09-28T13:45:05Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: Add del() function to element&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Canvas Navigation}}&lt;br /&gt;
&lt;br /&gt;
Canvas consist of a class with various nestable classes (elements).&lt;br /&gt;
&lt;br /&gt;
See inside the current (Git) API {{fgdata source|Nasal/canvas/api.nas|text=here}} and {{simgear source|simgear/canvas/|text=here}}.&lt;br /&gt;
&lt;br /&gt;
'''For the Canvas GUI API see [[Canvas GUI API]]'''&lt;br /&gt;
&lt;br /&gt;
== Canvas ==&lt;br /&gt;
For constructor see: [[Howto:Add_a_2D_canvas_instrument_to_your_aircraft#Initialize_a_Canvas|Initialize a Canvas]]&lt;br /&gt;
=== addPlacement ===&lt;br /&gt;
{{Note|It is possible to place a canvas on models in the scene. Tom has not tested if it also works for MP/AI aircraft but it should. The placement in scenery objects needs a different placement type to select also the model it should be placed on. For scenery objects a special placement exists: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var placement = { &amp;quot;module-id&amp;quot;: _module_id, type: &amp;quot;scenery-object&amp;quot;, &amp;lt;normal placement parameters like eg. node&amp;gt; }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'_module_id' is a special variable which is only set in scenery object &amp;lt;load&amp;gt; handlers.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35093833/ &lt;br /&gt;
  |title  =  &amp;lt;nowiki&amp;gt; Re: [Flightgear-devel] Canvas in dynamically loaded scene models &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |author =  &amp;lt;nowiki&amp;gt; Thomas Geymayer &amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  |date   =  May 17th, 2016 &lt;br /&gt;
  |added  =  May 17th, 2016 &lt;br /&gt;
  |script_version = 0.40 &lt;br /&gt;
  }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
See: [[Howto:Add_a_2D_canvas_instrument_to_your_aircraft#Place_it_somewhere_on_your_aircraft|Place a Canvas]]&lt;br /&gt;
&lt;br /&gt;
=== setColorBackground ===&lt;br /&gt;
'''Parameters:''' (r, g, b, a)&lt;br /&gt;
&lt;br /&gt;
Fills the background of the entire canvas with the supplied color.&lt;br /&gt;
=== createGroup ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (name)&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' Group&lt;br /&gt;
&lt;br /&gt;
Create a new group under this Canvas. Supplying name is optional.&lt;br /&gt;
=== getPath ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
=== del ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Deletes this Canvas.&lt;br /&gt;
=== wrapCanvas ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
=== get ===&lt;br /&gt;
'''Parameters:''' (name)&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' Canvas&lt;br /&gt;
&lt;br /&gt;
Returns the canvas with the specified name.&lt;br /&gt;
&lt;br /&gt;
Possible settings&lt;br /&gt;
&lt;br /&gt;
* character-size - font size&lt;br /&gt;
* character-aspect-ratio - font aspect ratio&lt;br /&gt;
* ... please contribute and expand this list!&lt;br /&gt;
&lt;br /&gt;
=== set ===&lt;br /&gt;
'''Parameters:''' (setting, value)&lt;br /&gt;
&lt;br /&gt;
Not sure all the below settings can be used after initialization.&lt;br /&gt;
&lt;br /&gt;
Settings can be: &lt;br /&gt;
&lt;br /&gt;
&amp;quot;name&amp;quot; string&lt;br /&gt;
&lt;br /&gt;
&amp;quot;size&amp;quot; vector of size 2 with ints&lt;br /&gt;
&lt;br /&gt;
&amp;quot;view&amp;quot; vector of size 2 with ints&lt;br /&gt;
&lt;br /&gt;
&amp;quot;mipmapping&amp;quot; bool&lt;br /&gt;
&lt;br /&gt;
&amp;quot;additive-blend&amp;quot; bool&lt;br /&gt;
&lt;br /&gt;
&amp;quot;coverage-samples&amp;quot; int&lt;br /&gt;
&lt;br /&gt;
&amp;quot;color-samples&amp;quot; int&lt;br /&gt;
&lt;br /&gt;
&amp;quot;freeze&amp;quot; bool&lt;br /&gt;
&lt;br /&gt;
&amp;quot;render-always&amp;quot; bool&lt;br /&gt;
&lt;br /&gt;
&amp;quot;update&amp;quot; bool&lt;br /&gt;
&lt;br /&gt;
=== parsesvg ===&lt;br /&gt;
'''Parameters:''' (group, file)&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (group, file, font-mapper)&lt;br /&gt;
&lt;br /&gt;
See: [[Howto:Use_SVG_inside_a_Canvas|SVG inside a Canvas]]&lt;br /&gt;
== Element == &lt;br /&gt;
Note that in each element there are 2 transformation matrices. The first will be applied first, then the second.&lt;br /&gt;
&lt;br /&gt;
=== set ===&lt;br /&gt;
'''Parameters:''' (key, value)&lt;br /&gt;
&lt;br /&gt;
''Key = &amp;quot;z-index&amp;quot;:''&lt;br /&gt;
&lt;br /&gt;
Default value = 0&lt;br /&gt;
&lt;br /&gt;
Minimum value = 0&lt;br /&gt;
&lt;br /&gt;
Integer value indicates the explicit Z sort order, highest on top. If this is not set, elements that are added later gets drawn on top.&lt;br /&gt;
Notice that if you have for example two paths inside their own groups, and you want to order those paths in relation to each other, its on their groups you should call this method, not on the paths themselves.&lt;br /&gt;
&lt;br /&gt;
FG 2.10.0.3: Elements added after z-index has been set will overrule it. (fix is in GIT)&lt;br /&gt;
&lt;br /&gt;
''Key = &amp;quot;blend-source&amp;quot;:''&lt;br /&gt;
&lt;br /&gt;
''Key = &amp;quot;blend-destination&amp;quot;:''&lt;br /&gt;
&lt;br /&gt;
''Key = &amp;quot;blend-source-rgb&amp;quot;:''&lt;br /&gt;
&lt;br /&gt;
''Key = &amp;quot;blend-destination-rgb&amp;quot;:''&lt;br /&gt;
&lt;br /&gt;
''Key = &amp;quot;blend-source-alpha&amp;quot;:''&lt;br /&gt;
&lt;br /&gt;
''Key = &amp;quot;blend-destination-alpha&amp;quot;:''&lt;br /&gt;
&lt;br /&gt;
These are blending operations, they determine how a texel is drawn based on what your current element want to draw (source) and what is already drawn at this texel (destination).&lt;br /&gt;
&lt;br /&gt;
For example for the 2 first listed keys, the formula is ''output_color = (blend_source * src_color) + (blend_destination * dst_color).''&lt;br /&gt;
&lt;br /&gt;
The value for the keys can be one of: (string)&lt;br /&gt;
&lt;br /&gt;
''zero, one, dst-color, src-color, one-minus-dst-color, one-minus-src-color, src-alpha, dst-alpha, one-minus-dst-alpha, one-minus-src-alpha, src-alpha-saturate''&lt;br /&gt;
&lt;br /&gt;
You can see the formulas [[https://web.cs.ship.edu/~djmoon/cg/cg-notes/cg-ogl-blending.pdf here]]&lt;br /&gt;
&lt;br /&gt;
With a little creativity these can be used for many things, like creating custom clipping geometry and other stuff.&lt;br /&gt;
&lt;br /&gt;
NOTICE: Blending does NOT work for paths. They are confirmed to work with text and images though.&lt;br /&gt;
&lt;br /&gt;
=== update ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Normally an element gets updated in the next frame. Calling this will make it update in the current frame.&lt;br /&gt;
Note that visibility methods do get updated in the current frame.&lt;br /&gt;
=== getVisible ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' visible&lt;br /&gt;
&lt;br /&gt;
Returns 0 if not visible, 1 if visible.&lt;br /&gt;
=== setVisible ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (visible)&lt;br /&gt;
&lt;br /&gt;
Sets if this element should be visible. 0 sets it not visible, 1 visible. No parameters sets it visible.&lt;br /&gt;
=== show ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Sets the element visible.&lt;br /&gt;
=== hide ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Sets the element not visible.&lt;br /&gt;
=== toggleVisibility ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Toggles if element should be visible.&lt;br /&gt;
=== setGeoPosition ===&lt;br /&gt;
'''Parameters:''' (lat, lon)&lt;br /&gt;
&lt;br /&gt;
Sets the geographic coordinates for a map element. Parent element must be of type &amp;quot;map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Example:''' setGeoPosition(37.615223, -122.389978)&lt;br /&gt;
&lt;br /&gt;
Places element at [[San Francisco International Airport]].&lt;br /&gt;
&lt;br /&gt;
=== createTransform ===&lt;br /&gt;
createTransform creates a new matrix on top of the existing matrix stack. A while ago I've added an example for a HUD built using the Canvas to the wiki: [[Canvas HUD]]&lt;br /&gt;
It doesn't use SVG but manually creates everything instead. As loading an SVG should basically do the same than handcrafting icons there shouldn't be much of a difference.&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' ([a, b, c, d, e, f])&lt;br /&gt;
&lt;br /&gt;
'''Return:''' The new (second) transform &lt;br /&gt;
&lt;br /&gt;
Creates a new (second) transformation matrix for this element. No parameters will create a default identity matrix transform. Otherwise supply a 6 element vector for the matrix:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| a || b || c&lt;br /&gt;
|-&lt;br /&gt;
| d || e || f &lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 1 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You should probably change the order of creating the transforms for pitch and roll as normally one would rotate first and then move according to roll and then move according to pitch up and down. Keep in mind that rotations always happens around the origin of the local coordinate frame of the object being rotated. For a rotation around another point you would need to move the object first until the center coincides with the local origin then rotate and afterwards move back. Instead of applying three transformations there exists a shortcut to pass the center of rotation as second argument to setRotation.&lt;br /&gt;
&lt;br /&gt;
To further shorten the code an especially to allow rotating objects imported from SVG there exists setRotation also for canvas Elements (not only Transformation) and additionally setCenter which instead of passing the center as an argument sets the center which is being used while calling setRotation on this element. setCenter only affects setRotation of this not object but not for any matrix added with createTransform. If you set the center of rotation in Inkscape (switch to rotate mode and drag the cross to the center of rotation) it is automatically loaded with setCenter so you just need to call setRotation and automatically get a rotation around the correct center.&lt;br /&gt;
&lt;br /&gt;
You don't need to care about tf[0] being reserved as it only reserves the index 0 and doesn't affect anything if not used. createTransform creates a new matrix with the next unused index starting at 1 (0 is reserved). If you later call setRotation directly on an element a new Transform will be created but this time using tf[0] to ensure it is applied before all other matrices and therefore rotating the object around its own center before being moved around.&lt;br /&gt;
&lt;br /&gt;
For the HUD I'd set the rotation center correctly inside Inkscape and later on just call ladder.setRotation to rotate for changes in the roll angle. Afterwards create a Transform and use setTranslate for changes in pitch angle.&lt;br /&gt;
&lt;br /&gt;
=== setTranslation ===&lt;br /&gt;
'''Parameters:''' (x, y)&lt;br /&gt;
&lt;br /&gt;
Translates the element. The translation is set on the second transform.&lt;br /&gt;
=== setRotation ===&lt;br /&gt;
'''Parameters:''' (x, y)&lt;br /&gt;
&lt;br /&gt;
Rotates the element around the center. The rotation is set on the first transform.&lt;br /&gt;
&lt;br /&gt;
setRotation really just combines a rotation with two translations -&amp;gt; translate(-center[0], -center[1]) * rotate * translate(center[0], center[1])&lt;br /&gt;
&lt;br /&gt;
You can also have a look in the property browser and check the bounding box (/canvas/by-index/texture[i]/[group[j]+]/path[j]/bounding-box) and use its coordinates to determine the correct center of rotation.&lt;br /&gt;
&lt;br /&gt;
=== setScale ===&lt;br /&gt;
'''Parameters:''' (x, y)&lt;br /&gt;
&lt;br /&gt;
Scales the element. The scale is set on the second transform.&lt;br /&gt;
=== getScale ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
'''Return:''' 2 element vector [x,y]&lt;br /&gt;
&lt;br /&gt;
Returns the scale of this element.&lt;br /&gt;
=== setColorFill ===&lt;br /&gt;
'''Parameters:''' (r, g, b)&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (r, g, b, a)&lt;br /&gt;
&lt;br /&gt;
Sets the color/alpha to be used as fill value. If you do not want the element to be filled, do not call this method.&lt;br /&gt;
=== getBoundingBox ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' [minX, minY, maxX, maxY]&lt;br /&gt;
&lt;br /&gt;
Returns the bounds of the element.&lt;br /&gt;
=== updateCenter ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Sets the center to be the center of the boundingbox in relation to the elements position in its parent.&lt;br /&gt;
=== setCenter ===&lt;br /&gt;
'''Parameters:''' (x, y)&lt;br /&gt;
&lt;br /&gt;
Sets the center of the element that is used for rotation.&lt;br /&gt;
=== getCenter ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Gets the center of the element.&lt;br /&gt;
=== del ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Deletes this element.&lt;br /&gt;
&lt;br /&gt;
== Group ==&lt;br /&gt;
Inherits from Element.&lt;br /&gt;
=== set ===&lt;br /&gt;
'''Parameters:''' (key, value)&lt;br /&gt;
&lt;br /&gt;
''key = &amp;quot;clip&amp;quot;''&lt;br /&gt;
{{Note|&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= Scaling or any other type of transformation or changing the coordinates of individual points is definitely more efficient than clipping (which requires to change the OpenGL clip planes for every rendered object with a different clipping rectangle).&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://forum.flightgear.org/viewtopic.php?p=277062#p277062&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: Space Shuttle&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;TheTom&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 21st, 2016&lt;br /&gt;
  | added   = Feb 21st, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Makes a clipping bounds for the group, only what is inside the clipping bounds will be shown.&lt;br /&gt;
&lt;br /&gt;
It uses same coordinate format as [http://www.w3.org/TR/CSS21/visufx.html#clipping Clipping]&lt;br /&gt;
&lt;br /&gt;
'''Example:''' my_grp.set(&amp;quot;clip&amp;quot;, &amp;quot;rect(62px, 587px, 262px, 437px)&amp;quot;); # top,right,bottom,left&lt;br /&gt;
&lt;br /&gt;
''key = &amp;quot;clip-frame&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
Sets the coordinate system to be used for clip coordinates.&lt;br /&gt;
&lt;br /&gt;
Can be canvas.Element.GLOBAL (the default value), canvas.Element.PARENT or canvas.Element.LOCAL&lt;br /&gt;
&lt;br /&gt;
Notice that if set to local or parent and there is a rotation is play, the clipping wont rotate properly, it will move around and scale instead.&lt;br /&gt;
&lt;br /&gt;
''key = &amp;quot;font&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
Sets the default font.&lt;br /&gt;
&lt;br /&gt;
'''Example:''' my_group.set(&amp;quot;font&amp;quot;, &amp;quot;LiberationFonts/LiberationMono-Regular.ttf&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
''key = &amp;quot;stroke&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
''key = &amp;quot;fill&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
=== setDouble ===&lt;br /&gt;
'''Parameters:''' (key, value)&lt;br /&gt;
&lt;br /&gt;
''key = &amp;quot;character-aspect-ration&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
''key = &amp;quot;character-size&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
?&lt;br /&gt;
&lt;br /&gt;
=== createChild ===&lt;br /&gt;
'''Parameters:''' (type)&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (type, name)&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' Element&lt;br /&gt;
&lt;br /&gt;
Creates a child element under this Group. Name can be supplied. Type can be &amp;quot;text&amp;quot;, &amp;quot;group&amp;quot;, &amp;quot;path&amp;quot;, &amp;quot;image&amp;quot;, &amp;quot;map&amp;quot;.&lt;br /&gt;
Return an Element of the particular type specified.&lt;br /&gt;
=== createChildren ===&lt;br /&gt;
'''Parameters:''' (type, count)&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' [Element]&lt;br /&gt;
&lt;br /&gt;
Creates a number of child elements under this Group. Return a vector of Elements of the particular type specified.&lt;br /&gt;
=== getChildren ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' [Element]&lt;br /&gt;
&lt;br /&gt;
Returns all the child elements of this group.&lt;br /&gt;
=== getElementById ===&lt;br /&gt;
'''Parameters:''' (name)&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' Element&lt;br /&gt;
&lt;br /&gt;
Returns the first found child element with the specified name.&lt;br /&gt;
=== removeAllChildren ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Removes all the child elements from this group.&lt;br /&gt;
&lt;br /&gt;
== Text ==&lt;br /&gt;
Inherits from Element.&lt;br /&gt;
&lt;br /&gt;
=== enableUpdate ===&lt;br /&gt;
&lt;br /&gt;
Enables the updateText() method for a text element.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== setText ===&lt;br /&gt;
'''Parameters:''' (text)&lt;br /&gt;
&lt;br /&gt;
Sets the text to be displayed.&lt;br /&gt;
&lt;br /&gt;
=== updateText ===&lt;br /&gt;
'''Parameters:''' (text)&lt;br /&gt;
&lt;br /&gt;
The setText method internally writes the text string into a property node. If the method is run inside an update loop (as usually done for displays), setText writes the property regardless of whether the text has actually changed in the last update cycle. For complicated displays, this may cause a lot of unnecessary property I/O slowing down the simulation.&lt;br /&gt;
&lt;br /&gt;
To improve this, updateText() keeps a Nasal variable record of the last text that has been written and writes the property only if the text has changed. Since this record needs to be allocated, the method requires to call enableUpdate() once before using it.&lt;br /&gt;
&lt;br /&gt;
Note also that updateText() and setText() should not be both used on the same text element (updateText() will not register any changes made to the property string by any other means).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== setAlignment ===&lt;br /&gt;
'''Parameters:''' (alignment)&lt;br /&gt;
&lt;br /&gt;
Sets how the text should be aligned with its position.&lt;br /&gt;
&lt;br /&gt;
Full list:&lt;br /&gt;
* left-top&lt;br /&gt;
* left-center&lt;br /&gt;
* left-bottom&lt;br /&gt;
* center-top&lt;br /&gt;
* center-center&lt;br /&gt;
* center-bottom&lt;br /&gt;
* right-top&lt;br /&gt;
* right-center&lt;br /&gt;
* right-bottom&lt;br /&gt;
* left-baseline&lt;br /&gt;
* center-baseline&lt;br /&gt;
* right-baseline&lt;br /&gt;
* left-bottom-baseline&lt;br /&gt;
* center-bottom-baseline&lt;br /&gt;
* right-bottom-baseline&lt;br /&gt;
&lt;br /&gt;
=== setFontSize ===&lt;br /&gt;
'''Parameters:''' (size, aspectRatio)&lt;br /&gt;
&lt;br /&gt;
Sets the size and aspectRatio of the font. AspectRatio is the Ratio between character height and width. Default aspectRatio is 1.&lt;br /&gt;
=== setFont ===&lt;br /&gt;
'''Parameters:''' (fontName)&lt;br /&gt;
&lt;br /&gt;
Sets the font to be used. See [[$FG_ROOT]]/Fonts for list of fonts.&lt;br /&gt;
&lt;br /&gt;
=== setDrawMode ===&lt;br /&gt;
'''Parameters:''' (mode)&lt;br /&gt;
&lt;br /&gt;
Sets the drawing mode. You can use the values below and add those you need.&lt;br /&gt;
&lt;br /&gt;
'''Text.TEXT:''' Draws the text&lt;br /&gt;
&lt;br /&gt;
'''Text.BOUNDINGBOX:''' Draws the boundingbox&lt;br /&gt;
&lt;br /&gt;
'''Text.FILLEDBOUNDINGBOX:''' Draws the filled boundingbox&lt;br /&gt;
&lt;br /&gt;
'''Text.ALIGNMENT:''' Draws a cross where the element position is&lt;br /&gt;
&lt;br /&gt;
'''Example:''' my_text.setDrawMode(Text.TEXT + Text.BOUNDINGBOX);&lt;br /&gt;
=== setPadding ===&lt;br /&gt;
Sets bounding box padding&lt;br /&gt;
&lt;br /&gt;
=== setMaxWidth ===&lt;br /&gt;
?&lt;br /&gt;
=== setColor ===&lt;br /&gt;
'''Parameters:''' (r, g, b)&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (r, g, b, a)&lt;br /&gt;
&lt;br /&gt;
Sets the color the text should be drawn in.&lt;br /&gt;
=== setColorFill ===&lt;br /&gt;
'''Parameters:''' (r, g, b)&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (r, g, b, a)&lt;br /&gt;
&lt;br /&gt;
Sets the color the text background should be drawn in.&lt;br /&gt;
&lt;br /&gt;
== Path ==&lt;br /&gt;
Inherits from Element.&lt;br /&gt;
&lt;br /&gt;
A path is similar to drawing with a pen on paper. The move and moveTo methods represent lifting the pen from the paper and moving to a new position. The drawing methods like lineTo would then be seen as starting from the current position of the pen. Therefore offcouse the order the methods is called in, is important.&lt;br /&gt;
=== pop_front ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Remove first segment&lt;br /&gt;
=== pop_back ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Remove last segment&lt;br /&gt;
=== getNumSegments ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Get the number of segments&lt;br /&gt;
=== reset ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Remove all existing path data&lt;br /&gt;
=== moveTo ===&lt;br /&gt;
'''Parameters:''' (x, y)&lt;br /&gt;
&lt;br /&gt;
Moves the position to an new absolute position.&lt;br /&gt;
=== move ===&lt;br /&gt;
'''Parameters:''' (x, y)&lt;br /&gt;
&lt;br /&gt;
Moves the position to a new relative position from the current.&lt;br /&gt;
=== lineTo ===&lt;br /&gt;
'''Parameters:''' (x, y)&lt;br /&gt;
&lt;br /&gt;
Draws a line to specified position.&lt;br /&gt;
=== line ===&lt;br /&gt;
'''Parameters:''' (x, y)&lt;br /&gt;
&lt;br /&gt;
Draws a line to specified relative position.&lt;br /&gt;
=== horizTo ===&lt;br /&gt;
'''Parameters:''' (x)&lt;br /&gt;
&lt;br /&gt;
Draws a horizontal line to specified position.&lt;br /&gt;
=== horiz ===&lt;br /&gt;
'''Parameters:''' (x)&lt;br /&gt;
&lt;br /&gt;
Draws a horizontal line to specified relative position.&lt;br /&gt;
=== vertTo ===&lt;br /&gt;
'''Parameters:''' (y)&lt;br /&gt;
&lt;br /&gt;
Draws a vertical line to specified position.&lt;br /&gt;
=== vert ===&lt;br /&gt;
'''Parameters:''' (y)&lt;br /&gt;
&lt;br /&gt;
Draws a vertical line to specified relative position.&lt;br /&gt;
=== quadTo ===&lt;br /&gt;
'''Parameters:''' (x0, y0, x1, y1)&lt;br /&gt;
&lt;br /&gt;
Draws quadratic Bézier curve.&lt;br /&gt;
=== quad ===&lt;br /&gt;
'''Parameters:''' (x0, y0, x1, y1)&lt;br /&gt;
&lt;br /&gt;
Draws quadratic Bézier curve. Relative coordinates.&lt;br /&gt;
=== squadTo ===&lt;br /&gt;
'''Parameters:''' (x, y)&lt;br /&gt;
&lt;br /&gt;
Draws smooth quadratic Bézier curve.&lt;br /&gt;
=== squad ===&lt;br /&gt;
'''Parameters:''' (x, y)&lt;br /&gt;
&lt;br /&gt;
Draws smooth quadratic Bézier curve. Relative coordinates.&lt;br /&gt;
=== cubicTo ===&lt;br /&gt;
'''Parameters:''' (x0, y0, x1, y1, x2, y2)&lt;br /&gt;
&lt;br /&gt;
Draws cubic Bézier curve.&lt;br /&gt;
=== cubic ===&lt;br /&gt;
'''Parameters:''' (x0, y0, x1, y1, x2, y2)&lt;br /&gt;
&lt;br /&gt;
Draws cubic Bézier curve. Relative coordinates.&lt;br /&gt;
=== scubicTo ===&lt;br /&gt;
'''Parameters:''' (x, y, x2, y2)&lt;br /&gt;
&lt;br /&gt;
Add a smooth cubic Bézier curve&lt;br /&gt;
=== scubic ===&lt;br /&gt;
'''Parameters:''' (x, y)&lt;br /&gt;
&lt;br /&gt;
Add a smooth cubic Bézier curve. Relative coordinates.&lt;br /&gt;
=== rect ===&lt;br /&gt;
'''Parameters:''' (x, y, w, h, cfg = nil)&lt;br /&gt;
&lt;br /&gt;
cfg:  Optional settings (eg. {&amp;quot;border-top-radius&amp;quot;: 5}, {&amp;quot;border-bottom-radius&amp;quot;: 5}, {&amp;quot;border-radius&amp;quot;: 5}, {&amp;quot;border-bottom-right-radius&amp;quot;: 5} or {&amp;quot;border-left-radius&amp;quot;: 5})&lt;br /&gt;
&lt;br /&gt;
Add a (rounded) rectangle to the path&lt;br /&gt;
&lt;br /&gt;
=== square ===&lt;br /&gt;
''' available on next, expected release 2019.1 '''&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (x, y, length, cfg = nil)&lt;br /&gt;
&lt;br /&gt;
alias for rect(x, y, length, length, cfg)&lt;br /&gt;
&lt;br /&gt;
Add a (rounded) square to the path&lt;br /&gt;
&lt;br /&gt;
=== arcSmallCCWTo ===&lt;br /&gt;
=== arcSmallCCW ===&lt;br /&gt;
=== arcSmallCWTo ===&lt;br /&gt;
=== arcSmallCW ===&lt;br /&gt;
'''Parameters:''' (xRadius, yRadius,0,xEnd,yEnd)&lt;br /&gt;
&lt;br /&gt;
Draws an arc with the specified radii, up to the specified end point. The end point is relative to the starting point.&lt;br /&gt;
&lt;br /&gt;
To draw half a circle with radius 20 around the origin:&lt;br /&gt;
 .moveTo(-20,0)&lt;br /&gt;
 .arcSmallCW(20,20,0,40,0);&lt;br /&gt;
&lt;br /&gt;
To draw a circle with radius 20 around the origin:&lt;br /&gt;
 .moveTo(-20,0)&lt;br /&gt;
 .arcSmallCW(20,20,0,40,0)&lt;br /&gt;
 .arcSmallCW(20,20,0,-40,0);&lt;br /&gt;
&lt;br /&gt;
=== arcLargeCCWTo ===&lt;br /&gt;
=== arcLargeCCW ===&lt;br /&gt;
=== arcLargeCWTo ===&lt;br /&gt;
=== arcLargeCW ===&lt;br /&gt;
&lt;br /&gt;
Drawing arcs examples : &lt;br /&gt;
[[File:Canvas arc.png|thumb|Canvas arc draw examples]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
	var fpv = group.createChild(&amp;quot;group&amp;quot;, &amp;quot;FPV&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,255,1)&amp;quot;)&lt;br /&gt;
        .moveTo(100, 100).arcSmallCCW(50, 50, 0,  50, 50);&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4) .set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,255,1)&amp;quot;)&lt;br /&gt;
        .moveTo(300, 100).arcSmallCCW(50, 50, 0,  100, 0);&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,255,1)&amp;quot;)&lt;br /&gt;
        .moveTo(500, 100).arcSmallCCW(50, 50, 0,  50, -50);&lt;br /&gt;
&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(55,0,255,1)&amp;quot;)&lt;br /&gt;
        .moveTo(100, 300).arcSmallCW(50, 50, 0,  50, 50);&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(55,0,255,1)&amp;quot;)&lt;br /&gt;
        .moveTo(300, 300).arcSmallCW(50, 50, 0,  100, 0);&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(55,0,255,1)&amp;quot;)&lt;br /&gt;
        .moveTo(500, 300).arcSmallCW(50, 50, 0,  50, -50);&lt;br /&gt;
&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,55,1)&amp;quot;)&lt;br /&gt;
        .moveTo(100, 500).arcLargeCCW(50, 50, 0,  50, 50);&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,55,1)&amp;quot;)&lt;br /&gt;
        .moveTo(300, 500).arcLargeCCW(50, 50, 0,  100, 0);&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,55,1)&amp;quot;)&lt;br /&gt;
        .moveTo(500, 500).arcLargeCCW(50, 50, 0,  50, -50);&lt;br /&gt;
&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,55,1)&amp;quot;)&lt;br /&gt;
        .moveTo(100, 500).arcLargeCCW(50, 50, 0,  50, 50);&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,55,1)&amp;quot;)&lt;br /&gt;
        .moveTo(300, 500).arcLargeCCW(50, 50, 0,  100, 0);&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,55,1)&amp;quot;)&lt;br /&gt;
        .moveTo(500, 500).arcLargeCCW(50, 50, 0,  50, -50);&lt;br /&gt;
&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,55,1)&amp;quot;)&lt;br /&gt;
        .moveTo(100, 700).arcLargeCW(50, 50, 0,  50, 50);&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,55,1)&amp;quot;)&lt;br /&gt;
        .moveTo(300, 700).arcLargeCW(50, 50, 0,  100, 0);&lt;br /&gt;
        fpv.createChild(&amp;quot;path&amp;quot;).setStrokeLineWidth(4).set(&amp;quot;stroke&amp;quot;, &amp;quot;rgba(255,0,5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ellipse ===&lt;br /&gt;
''' available on next, expected release 2019.1 '''&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (rx, ry, cx = nil, cy = nil)&lt;br /&gt;
&lt;br /&gt;
rx, ry are the radii of the ellipse&lt;br /&gt;
cx, cy is optional for the center coordinates&lt;br /&gt;
&lt;br /&gt;
Add an ellipse to the path&lt;br /&gt;
&lt;br /&gt;
=== circle ===&lt;br /&gt;
''' available on next, expected release 2019.1 '''&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (r, cx, cy)&lt;br /&gt;
&lt;br /&gt;
alias for ellipse(r, r, cx, cy), cx, cy optional for center coordinates&lt;br /&gt;
&lt;br /&gt;
Add a circle to the path.&lt;br /&gt;
&lt;br /&gt;
=== close ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Close the path (implicit lineTo to first point of path)&lt;br /&gt;
=== setColor ===&lt;br /&gt;
'''Parameters:''' (r, g, b)&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (r, g, b, a)&lt;br /&gt;
&lt;br /&gt;
Sets the color of the drawn path&lt;br /&gt;
=== setColorFill ===&lt;br /&gt;
'''Parameters:''' (r, g, b)&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (r, g, b, a)&lt;br /&gt;
&lt;br /&gt;
Calling this will make the path get filled in the specified color. For example if you draw a 'V' and fill it, the fill area will be a triangle inside the 'V'.&lt;br /&gt;
=== setStrokeLineWidth ===&lt;br /&gt;
'''Parameters:''' (width)&lt;br /&gt;
&lt;br /&gt;
The width of the path.&lt;br /&gt;
=== setStrokeLineJoin ===&lt;br /&gt;
'''Parameters:''' (type)&lt;br /&gt;
&lt;br /&gt;
Set stroke linejoin. Type can be &amp;quot;miter&amp;quot;, &amp;quot;round&amp;quot; or &amp;quot;bevel&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Stroke join.png|Canvas stroke join]]&lt;br /&gt;
&lt;br /&gt;
=== setStrokeLineCap ===&lt;br /&gt;
'''Parameters:''' (type)&lt;br /&gt;
&lt;br /&gt;
Caps the path. Type can be &amp;quot;butt&amp;quot;, &amp;quot;round&amp;quot; or &amp;quot;square&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Stroke cap.png|Canvas stroke cap]]&lt;br /&gt;
&lt;br /&gt;
=== setStrokeDashArray ===&lt;br /&gt;
'''Parameters:''' (pattern)&lt;br /&gt;
&lt;br /&gt;
Make dashed path. Pattern is a vector of alternating dash and gap lengths. Lines drawn will follow this pattern.&lt;br /&gt;
&lt;br /&gt;
'''Example:''' my_path.setStrokeDashArray([10, 20, 10, 20, 10]);&lt;br /&gt;
&lt;br /&gt;
=== setData ===&lt;br /&gt;
&lt;br /&gt;
'''Parameters:''' (cmds, points)&lt;br /&gt;
&lt;br /&gt;
Re-sets the data structure for a plot. cmds is an array containing the draw commands (integers, but they can be referenced via canvas.Path.VG_LINE_TO or canvas.Path.VG_MOVE_TO etc.) and points an array containing the associated points to which the curve is to be drawn in the form [x1, y1, x2, y2,...].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example:''' my_path.setData([2, 4], [10, 20, 10, 40]);&lt;br /&gt;
&lt;br /&gt;
See addSegment for list of commands.&lt;br /&gt;
&lt;br /&gt;
=== setDataGeo ===&lt;br /&gt;
'''Parameters:''' (cmds, points)&lt;br /&gt;
&lt;br /&gt;
Same as setData(), just for GPS coords. See addSegmentGeo() for details.&lt;br /&gt;
&lt;br /&gt;
Parent element must be of type &amp;quot;map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== addSegment ===&lt;br /&gt;
'''Parameters:''' (cmd, coords)&lt;br /&gt;
&lt;br /&gt;
Add a path segment.&lt;br /&gt;
&lt;br /&gt;
Cmd can for example be canvas.Path.VG_MOVE_TO&lt;br /&gt;
&lt;br /&gt;
Coords is a vector with the numbers/coordinates that the command needs.&lt;br /&gt;
&lt;br /&gt;
See this list of all commands and how many coords they require.&lt;br /&gt;
&lt;br /&gt;
  VG_CLOSE_PATH:     0,&lt;br /&gt;
  VG_MOVE_TO:        2,&lt;br /&gt;
  VG_MOVE_TO_ABS:    2,&lt;br /&gt;
  VG_MOVE_TO_REL:    2,&lt;br /&gt;
  VG_LINE_TO:        2,&lt;br /&gt;
  VG_LINE_TO_ABS:    2,&lt;br /&gt;
  VG_LINE_TO_REL:    2,&lt;br /&gt;
  VG_HLINE_TO:       1,&lt;br /&gt;
  VG_HLINE_TO_ABS:   1,&lt;br /&gt;
  VG_HLINE_TO_REL:   1,&lt;br /&gt;
  VG_VLINE_TO:       1,&lt;br /&gt;
  VG_VLINE_TO_ABS:   1,&lt;br /&gt;
  VG_VLINE_TO_REL:   1,&lt;br /&gt;
  VG_QUAD_TO:        4,&lt;br /&gt;
  VG_QUAD_TO_ABS:    4,&lt;br /&gt;
  VG_QUAD_TO_REL:    4,&lt;br /&gt;
  VG_CUBIC_TO:       6,&lt;br /&gt;
  VG_CUBIC_TO_ABS:   6,&lt;br /&gt;
  VG_CUBIC_TO_REL:   6,&lt;br /&gt;
  VG_SQUAD_TO:       2,&lt;br /&gt;
  VG_SQUAD_TO_ABS:   2,&lt;br /&gt;
  VG_SQUAD_TO_REL:   2,&lt;br /&gt;
  VG_SCUBIC_TO:      4,&lt;br /&gt;
  VG_SCUBIC_TO_ABS:  4,&lt;br /&gt;
  VG_SCUBIC_TO_REL:  4,&lt;br /&gt;
  VG_SCCWARC_TO:     5,&lt;br /&gt;
  VG_SCCWARC_TO_ABS: 5,&lt;br /&gt;
  VG_SCCWARC_TO_REL: 5,&lt;br /&gt;
  VG_SCWARC_TO:      5,&lt;br /&gt;
  VG_SCWARC_TO_ABS:  5,&lt;br /&gt;
  VG_SCWARC_TO_REL:  5,&lt;br /&gt;
  VG_LCCWARC_TO:     5,&lt;br /&gt;
  VG_LCCWARC_TO_ABS: 5,&lt;br /&gt;
  VG_LCCWARC_TO_REL: 5,&lt;br /&gt;
  VG_LCWARC_TO:      5,&lt;br /&gt;
  VG_LCWARC_TO_ABS:  5,&lt;br /&gt;
  VG_LCWARC_TO_REL:  5,&lt;br /&gt;
&lt;br /&gt;
=== addSegmentGeo ===&lt;br /&gt;
'''Parameters:''' (cmd, coords)&lt;br /&gt;
&lt;br /&gt;
Add a path segment.&lt;br /&gt;
&lt;br /&gt;
Cmd can for example be canvas.Path.VG_MOVE_TO&lt;br /&gt;
&lt;br /&gt;
Coords is a vector with the numbers/coordinates that the command needs in GPS format.&lt;br /&gt;
&lt;br /&gt;
The coords can for example be &amp;quot;E32.45&amp;quot; for latitude and &amp;quot;N45.34&amp;quot; for longitude. If an 'S' or 'W' is seen instead of E or N, the sign is flipped.&lt;br /&gt;
&lt;br /&gt;
See addSegment for list of commands.&lt;br /&gt;
&lt;br /&gt;
Parent element must be of type &amp;quot;map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Map ==&lt;br /&gt;
Inherits from Element.&lt;br /&gt;
&lt;br /&gt;
Class for a group element on a canvas with possibly geographic positions which automatically get projected according to the specified projection.&lt;br /&gt;
Each map consists of an arbitrary number of layers (canvas groups)&lt;br /&gt;
=== del ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Deletes the Map instance.&lt;br /&gt;
=== setController ===&lt;br /&gt;
'''Parameters:''' (controller)&lt;br /&gt;
&lt;br /&gt;
A controller needs to inherit from Map.Controller&lt;br /&gt;
=== addLayer ===&lt;br /&gt;
'''Parameters:''' (factory, type_arg=nil, priority=nil, style=nil, opts=nil, visible=1)&lt;br /&gt;
&lt;br /&gt;
Each layer is some kind of data to be rendered - there’s all the built in layers but WXR, TERRain or anything else specific to the acft would be another layer.&lt;br /&gt;
=== getLayer ===&lt;br /&gt;
'''Parameters:''' (type_arg)&lt;br /&gt;
&lt;br /&gt;
Returns the layer corresponding to the argument type.&lt;br /&gt;
=== setRange ===&lt;br /&gt;
'''Parameters:''' (range)&lt;br /&gt;
&lt;br /&gt;
This sets the display range of the map in NM.&lt;br /&gt;
=== getRange ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Get current range setting&lt;br /&gt;
=== setPos ===&lt;br /&gt;
'''Parameters:''' (lat, lon, hdg=nil, range=nil, alt=nil)&lt;br /&gt;
&lt;br /&gt;
This is the center of the map (very often the aircraft position, except in something special such as PLAN mode). Hdg sets the up direction (could be north, track, heading and true vs magnetic depending on the aircraft)&lt;br /&gt;
&lt;br /&gt;
=== getPos ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Returns vector with lat, lon, heading, range and altitude&lt;br /&gt;
=== getLat ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Returns position latitude.&lt;br /&gt;
=== getLon ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Returns position longitude.&lt;br /&gt;
=== getHdg ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Return current 'up' heading.&lt;br /&gt;
=== getAlt ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Returns current altitude setting in feet.&lt;br /&gt;
=== getRange ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Returns current range setting.&lt;br /&gt;
=== getLatLon ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Returns the center position of the map as a vector with lat and lon&lt;br /&gt;
=== getPosCoord ===&lt;br /&gt;
'''Parameters:''' ()&lt;br /&gt;
&lt;br /&gt;
Returns the center position of the map as a geo.Coord&lt;br /&gt;
&lt;br /&gt;
N.B.: This always returns the same geo.Coord object,&lt;br /&gt;
so its values can and will change at any time (call&lt;br /&gt;
update() on the coord to ensure it is up-to-date,&lt;br /&gt;
which basically calls this method again).&lt;br /&gt;
=== update ===&lt;br /&gt;
'''Parameters:''' (predicate=nil)&lt;br /&gt;
&lt;br /&gt;
Update each layer on this Map. Predicate is a function that takes a layer as argument and returns true if that layer should be updated. If predicate is not supplied, all layers will be updated.&lt;br /&gt;
=== See also ===&lt;br /&gt;
[[Canvas_Maps|Canvas Maps]] and [[Canvas_Map_API|Canvas Map API]]&lt;br /&gt;
&lt;br /&gt;
== Image ==&lt;br /&gt;
Inherits from Element.&lt;br /&gt;
&lt;br /&gt;
See: [[Canvas_Image|Canvas Image]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Activate_multi_core_and_multi_GPU_support&amp;diff=138406</id>
		<title>Howto:Activate multi core and multi GPU support</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Activate_multi_core_and_multi_GPU_support&amp;diff=138406"/>
		<updated>2023-09-21T12:15:41Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Related content */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FlightGear supports a number of different threading modes to make use of multiple CPUs or GPUs, this applies mostly to high-end multi-core or multi-GPU, multi-screen (or multi-window) setups and may improve performance (see [[Howto: Configure camera view windows]]).&lt;br /&gt;
&lt;br /&gt;
{{DeQuote}}&lt;br /&gt;
{{Multicore}}&lt;br /&gt;
&lt;br /&gt;
== Selecting threading modes ==&lt;br /&gt;
{{Note|Beginning with FlightGear 3.0, you should be careful when changing the default OSG threading settings, as enabling multi-threading seems to be an increasingly reliable way to trigger race conditions/segfaults (crashes). Also see {{Issue|1393}} and [http://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/53374444.8040304%40t3r.de/#msg32162794]&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |the aforementioned threading related directives are only relevant at the OSG/rendering level, i.e. will only tell the underlying OpenSceneGraph implementation to try to do certain tasks &amp;quot;concurrently&amp;quot;, for a more detailed explanation, please refer to: [[Howto:Use_the_system_monitor]]&lt;br /&gt;
  |{{cite web |url={{forum url|p=231703}}&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Multiprocessor Support&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sun Feb 08&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  | OSG threading support is largely specific to offloading '''rendering-related''' computations (i.e. culling) to different threads, it will NOT directly help conventional FlightGear subsystems runing in the main loop, not without explicit coding - i.e. multi-threading or multi-processing and IPC.&lt;br /&gt;
  |{{cite web |url={{forum url|p=153269}}&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: [SUGGESTION] Multi-core FlightGear support&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Thu Mar 15&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |OSG threading is neat and dandy, but obviously it is only directly useful for rendering related parallelization and related work. On the other hand, none of this comes for free. OSG's threading support really is impressive, but all those OSG threads must be kept busy. Properly. That's exactly the work that FlightGear is responsible for in its main loop.&lt;br /&gt;
OSG's multithreading support doesn't just come &amp;quot;automagically&amp;quot;, just because FlightGear uses OSG.&lt;br /&gt;
The multithreading support in OSG must be explicitly supported by following certain OSG coding patterns and coding protocols. Otherwise, you won't benefit at all.&amp;lt;br/&amp;gt;&lt;br /&gt;
Obviously, OSG really is extremely powerful and also pretty good at parallelizing things, but you cannot necessarily see that when running FlightGear, but there is other OSG-based software which is making really good use of this.&lt;br /&gt;
  |{{cite web |url={{forum url|p=153295}}&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: [SUGGESTION] Multi-core FlightGear support&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hooray&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Thu Mar 15&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |Even distribution across the cores doesn't in itself indicate that a process is using multiple threads. The operating system will switch tasks between cores for even temperature distribution, even with a single-threaded program.&lt;br /&gt;
The indication that a program is multi-threaded is when the overall usage of the program goes above the capacity of one core. For that to happen it must have different threads running on different cores at the same time.&lt;br /&gt;
  |{{cite web |url={{forum url|p=231646}}&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Multiprocessor Support&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;sanhozay&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sun Feb 08&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
&lt;br /&gt;
}}}}&lt;br /&gt;
&lt;br /&gt;
{{Caution|&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |In my preferences.xml I have:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;multithreading-mode&amp;gt; AutomaticSelection &amp;lt;/multithreading-mode&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With OSG2 this worked and I could see fgfs using CPU cycles on both CPU cores. This did increase frame rates compared to single threading but only by perhaps 25% on average but it also seemed to improve frames rates even more under condidtions that would result in lower frames rates.    With OSG3 this does not happen and it appears to only be single threaded.&lt;br /&gt;
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/27776273/&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;[Flightgear-devel] OSG3 frame rates and multithreading&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Hal V. Engel&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;2011-07-10&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |I [used to be] able to run FlightGear with osg multithreading mode set to AutomaticSelection on my presentation machine with five graphic cards and ten monitors attached and a dozen or so cameras configured. For some reason, that is no longer possible and I get a core dump sooner or later.&lt;br /&gt;
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32162794/&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;[Flightgear-devel] osg multithreading crashes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Torsten Dreyer&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;2014-03-29&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |Only of 1 out of 10 sessions crashed, here is the only dump I was able to produce.&lt;br /&gt;
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32168368/&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] osg multithreading crashes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Torsten Dreyer&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;2014-03-31&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
  |When I run FlightGear with multiple screens and multiple cameras, the highes threading mode for OpenSceneGraph that works reliable is '''CullDrawThreadPerContext''' while the '''CullThreadPerCameraDrawThreadPerContext''' quickly leads to a crash.&lt;br /&gt;
You can set the osg threading model upon startup with '''--prop:/sim/rendering/multithreading-mode{{=}}CullDrawThreadPerContext'''&lt;br /&gt;
If it still does not work, try DrawThreadPerContext or even SingleThreaded and see if this helps.&lt;br /&gt;
  |{{cite web |url={{forum url|p=228282}}&lt;br /&gt;
     |title=&amp;lt;nowiki&amp;gt;Re: Error when trying to run FlightGear with three monitors&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |author=&amp;lt;nowiki&amp;gt;Torsten&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     |date=&amp;lt;nowiki&amp;gt;Sun Dec 28&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
   }}&lt;br /&gt;
}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= My sense is that most of our crashes seem to come from newer code or threading issues.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/34679412/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] Reactivation of the UIUC, LaRCsim,&lt;br /&gt;
 and special purpose FDMs by default.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Curtis Olson&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Dec 8th, 2015&lt;br /&gt;
  | added   = Dec 8th, 2015&lt;br /&gt;
  | script_version = 0.23&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1=&amp;lt;code&amp;gt;--prop:/sim/rendering/multithreading-mode=CullThreadPerCameraDrawThreadPerContext&amp;lt;/code&amp;gt; never worked for me with multiscreen/multicamera setups. It always crashed within a few seconds. It's a known issue, It should not bite you with a single camera, but I would not bet on it.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/34870630/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] 2016.2.0 long-term testing (was: memory&lt;br /&gt;
 leaks - long term testing - pre-2016.2.0)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Torsten Dreyer&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 21st, 2016&lt;br /&gt;
  | added   = Feb 21st, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= if you use the default screen configuration there is just one window and one camera. In that case, CullThreadPerCamera results in one thread (just one camera) and you effectively run as CullDrawThreadPerContext. You can configure more than one camera on a single screen an in that case the above will bite&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/34870695/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;Re: [Flightgear-devel] 2016.2.0 long-term testing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Torsten Dreyer&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Feb 21st, 2016&lt;br /&gt;
  | added   = Feb 21st, 2016&lt;br /&gt;
  | script_version = 0.25&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
There is a property supported named '''/sim/rendering/multithreading-mode''' this can be set either in the preferences.xml file located in the flightgear data folder (base package: [[$FG_ROOT]]) or by using the '''--prop:/sim/rendering/multithreading-mode=...''' parameter from the console (or fgrun) this affects directly the osgviewer threading mode, supported values are:&lt;br /&gt;
&lt;br /&gt;
    * AutomaticSelection&lt;br /&gt;
    * CullDrawThreadPerContext&lt;br /&gt;
    * DrawThreadPerContext&lt;br /&gt;
    * CullThreadPerCameraDrawThreadPerContext&lt;br /&gt;
&lt;br /&gt;
Further information on threading modes can be found here: http://www.mail-archive.com/osg-users@openscenegraph.net/msg09620.html and here: http://www.mail-archive.com/osg-users@openscenegraph.net/msg09611.html&lt;br /&gt;
&lt;br /&gt;
To set this in a separate XML file, just include it from preferences.xml (toplevel PropertyList node):&lt;br /&gt;
&lt;br /&gt;
threadingmode.xml:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;PropertyList&amp;gt;&lt;br /&gt;
 &amp;lt;sim&amp;gt;&lt;br /&gt;
    &amp;lt;rendering&amp;gt;&lt;br /&gt;
      &amp;lt;multithreading-mode&amp;gt;AutomaticSelection&amp;lt;/multithreading-mode&amp;gt;&lt;br /&gt;
    &amp;lt;/rendering&amp;gt;&lt;br /&gt;
 &amp;lt;/sim&amp;gt;&lt;br /&gt;
 &amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This property must be set during initialization, modifying it at runtime has no effect.&lt;br /&gt;
&lt;br /&gt;
Multithreading modes allocate two instances of OpenGL resources to speed up rendering .&lt;br /&gt;
Default implicit buffer attachment policy adds depth buffer to FBOs if only color buffer was attached.&lt;br /&gt;
&lt;br /&gt;
if you have a single graphics card, having a thread per camera (each one with a graphics context) doesn't necessarily improve the performance, what is more, it can degrade it. The reason is that each thread will be competing for the graphics card, which is an exclusive resource, and the driver is forced to perform many context switchs. If you are using multiple graphics contexts then by default the OSG/OpenGL will be creating OpenGL objects (like textures) on a per context basis.  So one osg::Texture in the scene graph even if it's rendered on two contexts you'll have two separate TextureObjects/OpenGL texture objects.&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* [[ThreadCPUAffinities]]&lt;br /&gt;
* {{forum url|p=69706}}&lt;br /&gt;
* http://www.mail-archive.com/osg-users@openscenegraph.net/msg09620.html&lt;br /&gt;
* http://www.opensubscriber.com/message/flightgear-devel@lists.sourceforge.net/14221108.html&lt;br /&gt;
* {{forum url|t=8890}}&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg19265.html&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg18808.html&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg29272.html&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg29519.html&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto|Activate multi core and multi GPU support]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=ExtraViewWindows&amp;diff=138338</id>
		<title>ExtraViewWindows</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=ExtraViewWindows&amp;diff=138338"/>
		<updated>2023-09-05T06:43:46Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* exmaple */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Fg-cv-textures2.jpeg|thumb|Multiple top level windows in CompositeViewer]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
On next, there's support for Extra View windows. These are top-level windows that show views independently from the main window's view. These use a new view system called '''Sview''' (short for &amp;quot;Step View&amp;quot;) along with [[CompositeViewer Support]].&lt;br /&gt;
&lt;br /&gt;
The simplest way to create an extra view window is from menu '''View/Add Clone View''' which, as the name implies, will create a new window that is a clone of the current view. Changing the main window's view will leave the new window's view unchanged.&lt;br /&gt;
&lt;br /&gt;
== Viewing pairs of aircraft ==&lt;br /&gt;
&lt;br /&gt;
There is a slightly crude mechanism for creating views that work on pairs of aircraft: one uses menu '''View/Push Pair View''' to push the current main-window view onto a stack of views.&lt;br /&gt;
&lt;br /&gt;
Once this has been done at two or more times, menu '''View/Add Pair View''' will open a new top-level window showing a view derived from the last two remembered viewpoints. So for example it can show the view of your aircraft from a particular multiplayer aircraft, or a view of the nearest tower from your aircraft.&lt;br /&gt;
&lt;br /&gt;
Menu '''View/Add Pair Foreground View''' is similar but it keeps the first viewpoint at a fixed distance in the foreground and the second viewpoint in the background. This works well when flying in formation.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
As of '''2021-10-25''':&lt;br /&gt;
&lt;br /&gt;
* Extra View windows can be panned like the main window by dragging with the left mouse button.&lt;br /&gt;
* Other UI interations is not supported:&lt;br /&gt;
** Mouse clicks are ignord.&lt;br /&gt;
** Key presses are ignored.&lt;br /&gt;
&lt;br /&gt;
== Specifying views in more detail ==&lt;br /&gt;
&lt;br /&gt;
One can specify views explicitly with the &amp;lt;code&amp;gt;view-new&amp;lt;/code&amp;gt; command, which accepts an Sview specification in the form of an accompanying XML tree.&lt;br /&gt;
&lt;br /&gt;
For details of the XML format, see the comments in: {{flightgear file|src/Viewer/sview.hxx}}&lt;br /&gt;
&lt;br /&gt;
== How Sview works ==&lt;br /&gt;
&lt;br /&gt;
Sview works by constructing camera's eye and target positions/directions using an arbitrary number of individual configurable steps. There are various step types defined which allow for various transformations such as moving to a particular user/multiplayer aircraft or nearest tower, move relative to the current position+direction, modify heading, pitch and roll according to particular property values, rotate view direction to point at a particular target etc.&lt;br /&gt;
&lt;br /&gt;
These basic steps are enough to allow Sview to copy what conventional views do, allowing the '''View/Add clone view''' menu item to work.&lt;br /&gt;
&lt;br /&gt;
It's also easy enough to add (C++) code to implement new steps to achieve more sophisticated behaviour. An example of this is the view step called '''double''' that keeps two aircraft visible at all times, with one in the foreground; this is used for '''View/Add Pair Foreground View'''.&lt;br /&gt;
&lt;br /&gt;
For more details, see the C++ Sview code itself: {{flightgear file|src/Viewer/sview.cxx}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
This example will work with F-16. It will place a small window in lower-right corner of a 1920x1080 FG window.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PropertyList&amp;gt;&lt;br /&gt;
		&amp;lt;window-width&amp;gt;400&amp;lt;/window-width&amp;gt;&lt;br /&gt;
		&amp;lt;window-height&amp;gt;400&amp;lt;/window-height&amp;gt;&lt;br /&gt;
		&amp;lt;window-x&amp;gt;1520&amp;lt;/window-x&amp;gt;&lt;br /&gt;
		&amp;lt;window-y&amp;gt;0&amp;lt;/window-y&amp;gt;&lt;br /&gt;
		&amp;lt;type&amp;gt;sview&amp;lt;/type&amp;gt;&lt;br /&gt;
		&amp;lt;name&amp;gt;step-dancer&amp;lt;/name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;step n=&amp;quot;0&amp;quot;&amp;gt;  &amp;lt;!-- Move to own aircraft. --&amp;gt;&lt;br /&gt;
	        &amp;lt;type&amp;gt;aircraft&amp;lt;/type&amp;gt;&lt;br /&gt;
	        &amp;lt;callsign&amp;gt;&amp;lt;/callsign&amp;gt;&lt;br /&gt;
	    &amp;lt;/step&amp;gt;&lt;br /&gt;
  		&lt;br /&gt;
  		&amp;lt;!-- Move to place inside of aircraft. --&amp;gt;&lt;br /&gt;
	    &amp;lt;step n=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
	        &amp;lt;type&amp;gt;move&amp;lt;/type&amp;gt;&lt;br /&gt;
	        &amp;lt;right&amp;gt;0&amp;lt;/right&amp;gt;&lt;br /&gt;
	        &amp;lt;up&amp;gt;-0.83&amp;lt;/up&amp;gt;&lt;br /&gt;
	        &amp;lt;forward&amp;gt;4.40&amp;lt;/forward&amp;gt;&lt;br /&gt;
	    &amp;lt;/step&amp;gt;&lt;br /&gt;
&amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Configuring View Windows]]&lt;br /&gt;
* [[SView]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=ExtraViewWindows&amp;diff=138337</id>
		<title>ExtraViewWindows</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=ExtraViewWindows&amp;diff=138337"/>
		<updated>2023-09-05T06:34:19Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* How Sview works */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Fg-cv-textures2.jpeg|thumb|Multiple top level windows in CompositeViewer]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
On next, there's support for Extra View windows. These are top-level windows that show views independently from the main window's view. These use a new view system called '''Sview''' (short for &amp;quot;Step View&amp;quot;) along with [[CompositeViewer Support]].&lt;br /&gt;
&lt;br /&gt;
The simplest way to create an extra view window is from menu '''View/Add Clone View''' which, as the name implies, will create a new window that is a clone of the current view. Changing the main window's view will leave the new window's view unchanged.&lt;br /&gt;
&lt;br /&gt;
== Viewing pairs of aircraft ==&lt;br /&gt;
&lt;br /&gt;
There is a slightly crude mechanism for creating views that work on pairs of aircraft: one uses menu '''View/Push Pair View''' to push the current main-window view onto a stack of views.&lt;br /&gt;
&lt;br /&gt;
Once this has been done at two or more times, menu '''View/Add Pair View''' will open a new top-level window showing a view derived from the last two remembered viewpoints. So for example it can show the view of your aircraft from a particular multiplayer aircraft, or a view of the nearest tower from your aircraft.&lt;br /&gt;
&lt;br /&gt;
Menu '''View/Add Pair Foreground View''' is similar but it keeps the first viewpoint at a fixed distance in the foreground and the second viewpoint in the background. This works well when flying in formation.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
As of '''2021-10-25''':&lt;br /&gt;
&lt;br /&gt;
* Extra View windows can be panned like the main window by dragging with the left mouse button.&lt;br /&gt;
* Other UI interations is not supported:&lt;br /&gt;
** Mouse clicks are ignord.&lt;br /&gt;
** Key presses are ignored.&lt;br /&gt;
&lt;br /&gt;
== Specifying views in more detail ==&lt;br /&gt;
&lt;br /&gt;
One can specify views explicitly with the &amp;lt;code&amp;gt;view-new&amp;lt;/code&amp;gt; command, which accepts an Sview specification in the form of an accompanying XML tree.&lt;br /&gt;
&lt;br /&gt;
For details of the XML format, see the comments in: {{flightgear file|src/Viewer/sview.hxx}}&lt;br /&gt;
&lt;br /&gt;
== How Sview works ==&lt;br /&gt;
&lt;br /&gt;
Sview works by constructing camera's eye and target positions/directions using an arbitrary number of individual configurable steps. There are various step types defined which allow for various transformations such as moving to a particular user/multiplayer aircraft or nearest tower, move relative to the current position+direction, modify heading, pitch and roll according to particular property values, rotate view direction to point at a particular target etc.&lt;br /&gt;
&lt;br /&gt;
These basic steps are enough to allow Sview to copy what conventional views do, allowing the '''View/Add clone view''' menu item to work.&lt;br /&gt;
&lt;br /&gt;
It's also easy enough to add (C++) code to implement new steps to achieve more sophisticated behaviour. An example of this is the view step called '''double''' that keeps two aircraft visible at all times, with one in the foreground; this is used for '''View/Add Pair Foreground View'''.&lt;br /&gt;
&lt;br /&gt;
For more details, see the C++ Sview code itself: {{flightgear file|src/Viewer/sview.cxx}}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[Configuring View Windows]]&lt;br /&gt;
* [[SView]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Configure_camera_view_windows&amp;diff=138336</id>
		<title>Howto:Configure camera view windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Configure_camera_view_windows&amp;diff=138336"/>
		<updated>2023-09-05T06:32:37Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: Added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;: ''See also [[CompositeViewer Support]] and [[Canvas_Development#Supporting_Cameras]]&lt;br /&gt;
&lt;br /&gt;
[[File:Fg-multiview-demo.png|thumb|$FG_ROOT/Docs/README.multiscreen [http://forum.flightgear.org/viewtopic.php?f=6&amp;amp;t=6455&amp;amp;p=260733#p260733]]]&lt;br /&gt;
&lt;br /&gt;
This article discusses '''how to configure camera view windows''' for systems with more than one monitor.  FlightGear's multiple view features are very powerful, and it is amazing how fast things run on medium and even lower range hardware.&lt;br /&gt;
&lt;br /&gt;
== Major modes of operation ==&lt;br /&gt;
FlightGear's [[XML]]-configurable camera view system supports two major modes of operation:&lt;br /&gt;
&lt;br /&gt;
# If you have multiple monitors connected to your computer and setup as separate independent displays (i.e. you can't drag a window back and forth between the monitors, and can't create a window that spans multiple monitors) then you can configure FlightGear to open up a separate window on each display and draw a unique view perspective in each window. (And if you want you can configure flightgear to open multiple windows on a single display.)&lt;br /&gt;
# If you have multiple monitors connected as one larger virtual display, you can configure FlightGear to open up one large window that spans all your displays, but then separate that large window into individual cameras and still draw a unique perspective on each display.&lt;br /&gt;
&lt;br /&gt;
In addition, each view is highly configurable, no matter how your displays are configured.&lt;br /&gt;
&lt;br /&gt;
* You can setup a distinct field of view for each display, so you can create a seamless outside world with different size monitors.&lt;br /&gt;
* If you wish, you can define each view in terms of the low level view frustum parameters, so you can carefully measure your monitor/display layout and configure each view to match your physical layout exactly ... including asymmetric view frustums if need be. Otherwise you can still define your views in terms of a simpler (but less flexible) horizontal/vertical field of view scheme.&lt;br /&gt;
* You can specify the horizontal and vertical offset from center for each display. This allows you to spread out your monitors to account for the physical gap between displays ... this allows you to create an even more seamless virtual world where runway lines and horizon lines start in the correct place on the next monitor when they run off the edge of the first. Imagine taking a large poster, cutting it into pieces and then separating the pieces from each other by a little bit ... none of the straight lines in the original image will pass straight through in the separated/stretched version. Now imagine taking that same picture and cutting strips out of it, but leaving the sections where they were originally. Straight lines are preserved between adjacent pieces. This is what this is about.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases ===&lt;br /&gt;
* ATI (the ATI that makes graphics chips and cards) used a simplified (pre-release) version of this feature to demo 8 screens being driven from a single computer at SigGraph this year.&lt;br /&gt;
* Enter the Matrox Triple Head to Go (do a Google search for it if you haven't heard of it.) This is just a little box, but to the computer, it looks like one giant 3x wide monitor. It plugs into your computer on one side, and on the other side you plug in 3 actual monitors. So you get up to 3 monitors without your computer needing to know anything about it, and even on video cards with only one external display connector (like a laptop.) Using the 2nd mode of operation described above, I divided my one big window into 3 camera views and was able to draw about 120 degree wrap around field of view on 3 displays.&lt;br /&gt;
&lt;br /&gt;
== Required changes in preferences.xml ==&lt;br /&gt;
{{note|1=The changes to preferences.xml suggested here are better added to a personal XML file that can be invoked with the command line option &amp;lt;code&amp;gt;--config=path-to-your-config.xml&amp;lt;/code&amp;gt;.  For details on why and how, see [[FlightGear configuration via XML#Adding your own settings]].}}&lt;br /&gt;
&lt;br /&gt;
As of version 1.9, FlightGear uses [[OpenSceneGraph]] (OSG) for rendering the scenery. OSG already has an implementation for setting up different cameras looking at the scene and they are configured in &amp;lt;tt&amp;gt;[[$FG ROOT]]/preferences.xml&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Slave cameras are created using properties in preferences.xml. One slave is always created that is aligned with the viewing parameters of the&lt;br /&gt;
master camera. Others can be opened in different graphics windows, possibly on other displays and screens. A slave camera is presently created in its own window. Closing any of the windows will close FlightGear as a whole.&lt;br /&gt;
&lt;br /&gt;
Parameters for the slave are currently pretty limited; they include:&lt;br /&gt;
&lt;br /&gt;
* The dimensions and position of the window.&lt;br /&gt;
* &amp;quot;shear&amp;quot; values in projection space.&lt;br /&gt;
* &amp;quot;heading-deg&amp;quot; (a heading offset that was added specifically for LinuxTag).&lt;br /&gt;
&lt;br /&gt;
The shear-x and shear-y values are really only useful for setting up a &amp;quot;video wall&amp;quot; type display where monitors arranged around the &amp;quot;master view&amp;quot; show a view in an offset frustum with the same aspect ratio and fov as the master.&lt;br /&gt;
&lt;br /&gt;
Let's first look at an example, setting up two extra windows. Add something like the following code to the &amp;lt;rendering&amp;gt; section of your preferences.xml file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;camera&amp;gt;&lt;br /&gt;
    &amp;lt;host-name type=&amp;quot;string&amp;quot;&amp;gt;&amp;lt;/host-name&amp;gt;&lt;br /&gt;
    &amp;lt;display&amp;gt;0&amp;lt;/display&amp;gt;&lt;br /&gt;
    &amp;lt;screen&amp;gt;0&amp;lt;/screen&amp;gt;&lt;br /&gt;
    &amp;lt;shear-x&amp;gt;2&amp;lt;/shear-x&amp;gt;&lt;br /&gt;
    &amp;lt;shear-y&amp;gt;1&amp;lt;/shear-y&amp;gt;&lt;br /&gt;
    &amp;lt;width&amp;gt;320&amp;lt;/width&amp;gt;&lt;br /&gt;
    &amp;lt;height&amp;gt;240&amp;lt;/height&amp;gt;&lt;br /&gt;
    &amp;lt;fullscreen type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/fullscreen&amp;gt;&lt;br /&gt;
   &amp;lt;/camera&amp;gt;&lt;br /&gt;
   &amp;lt;camera&amp;gt;&lt;br /&gt;
    &amp;lt;host-name type=&amp;quot;string&amp;quot;&amp;gt;&amp;lt;/host-name&amp;gt;&lt;br /&gt;
    &amp;lt;display&amp;gt;0&amp;lt;/display&amp;gt;&lt;br /&gt;
    &amp;lt;screen&amp;gt;0&amp;lt;/screen&amp;gt;&lt;br /&gt;
    &amp;lt;shear-x&amp;gt;-2&amp;lt;/shear-x&amp;gt;&lt;br /&gt;
    &amp;lt;shear-y&amp;gt;1&amp;lt;/shear-y&amp;gt;&lt;br /&gt;
    &amp;lt;width&amp;gt;320&amp;lt;/width&amp;gt;&lt;br /&gt;
    &amp;lt;height&amp;gt;240&amp;lt;/height&amp;gt;&lt;br /&gt;
    &amp;lt;fullscreen type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/fullscreen&amp;gt;&lt;br /&gt;
   &amp;lt;/camera&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To simplify maintenance you can also save these modifications in a separate [[PropertyList XML files|PropertyList XML file]] (in essence the toplevel XML node must be named &amp;quot;PropertyList&amp;quot;) and simply reference it in preferences.xml by making use of the include attribute in the &amp;amp;lt;rendering&amp;amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
Preferences.xml will look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;rendering include=&amp;quot;camera-views.xml&amp;quot;&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;/rendering&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a to be created camera-views.xml file will have the following content:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;PropertyList&amp;gt;&lt;br /&gt;
   &amp;lt;camera&amp;gt;&lt;br /&gt;
    &amp;lt;host-name type=&amp;quot;string&amp;quot;&amp;gt;&amp;lt;/host-name&amp;gt;&lt;br /&gt;
    &amp;lt;display&amp;gt;0&amp;lt;/display&amp;gt;&lt;br /&gt;
    &amp;lt;screen&amp;gt;0&amp;lt;/screen&amp;gt;&lt;br /&gt;
    &amp;lt;shear-x&amp;gt;2&amp;lt;/shear-x&amp;gt;&lt;br /&gt;
    &amp;lt;shear-y&amp;gt;1&amp;lt;/shear-y&amp;gt;&lt;br /&gt;
    &amp;lt;width&amp;gt;320&amp;lt;/width&amp;gt;&lt;br /&gt;
    &amp;lt;height&amp;gt;240&amp;lt;/height&amp;gt;&lt;br /&gt;
    &amp;lt;fullscreen type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/fullscreen&amp;gt;&lt;br /&gt;
   &amp;lt;/camera&amp;gt;&lt;br /&gt;
   &amp;lt;camera&amp;gt;&lt;br /&gt;
    &amp;lt;host-name type=&amp;quot;string&amp;quot;&amp;gt;&amp;lt;/host-name&amp;gt;&lt;br /&gt;
    &amp;lt;display&amp;gt;0&amp;lt;/display&amp;gt;&lt;br /&gt;
    &amp;lt;screen&amp;gt;0&amp;lt;/screen&amp;gt;&lt;br /&gt;
    &amp;lt;shear-x&amp;gt;-2&amp;lt;/shear-x&amp;gt;&lt;br /&gt;
    &amp;lt;shear-y&amp;gt;1&amp;lt;/shear-y&amp;gt;&lt;br /&gt;
    &amp;lt;width&amp;gt;320&amp;lt;/width&amp;gt;&lt;br /&gt;
    &amp;lt;height&amp;gt;240&amp;lt;/height&amp;gt;&lt;br /&gt;
    &amp;lt;fullscreen type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/fullscreen&amp;gt;&lt;br /&gt;
   &amp;lt;/camera&amp;gt;&lt;br /&gt;
 &amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, you may be better off just running a separate FlightGear instance on the  second monitor and slaving it. The whole idea behind having a multiple screen setup like twinview is that it mimics a continuous  area with no boundaries.  Putting those screen boundaries back in when  the video subsystem has worked so hard to eliminate them is a metaphor collision and a design problem, see [[Property Tree/Native Protocol Slaving]].&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Wiki articles ===&lt;br /&gt;
* [[PropertyList XML files]]&lt;br /&gt;
* [[FlightGear configuration via XML]]&lt;br /&gt;
* [[ExtraViewWindows]]&lt;br /&gt;
* [[SView]]&lt;br /&gt;
&lt;br /&gt;
=== Mailing list threads ===&lt;br /&gt;
* [http://sourceforge.net/p/flightgear/mailman/message/19411126/ &amp;lt;nowiki&amp;gt;[Flightgear-devel] building view windows&amp;lt;/nowiki&amp;gt;] (May 2008)&lt;br /&gt;
* [http://sourceforge.net/p/flightgear/mailman/message/19718339/ &amp;lt;nowiki&amp;gt;[Flightgear-devel] RFC: changes to views and cameras&amp;lt;/nowiki&amp;gt;] (June-July 2008)&lt;br /&gt;
* [http://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/4754694F.4040609%40wanadoo.fr/#msg15646938 &amp;lt;nowiki&amp;gt;[Flightgear-devel] dual head problem&amp;lt;/nowiki&amp;gt;] (December 2007)&lt;br /&gt;
* [http://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/ef5fc9920803171336q6e62c038q65c96b822c9f47f1%40mail.gmail.com/#msg18867154 &amp;lt;nowiki&amp;gt;[Flightgear-devel] Matrox TripleHead2Go&amp;lt;/nowiki&amp;gt;] (Marsh 2008-June 2011)&lt;br /&gt;
* [http://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/20081014201611.GC1483%40voyageur.mas.nom.fr/#msg20557100 &amp;lt;nowiki&amp;gt;[Flightgear-devel] Patch for multiscreen mode with multiplayer&amp;lt;/nowiki&amp;gt;] (October 2008)&lt;br /&gt;
&lt;br /&gt;
=== Readme file ===&lt;br /&gt;
* {{readme file|multiscreen}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* David R. Miller, [http://www.inkdrop.net/dave/multimon.pdf ''Multiple Monitors in FlightGear: Quick and Dirty''] (PDF, 0.8 MB), last updated 4 Mar 2006. Setting up multiple monitors on multiple system with different OS:es.  May be outdated.&lt;br /&gt;
* example files from the german c't magazine: ftp://ftp.heise.de/pub/ct/listings/1309-162.zip&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto|Configure camera views in Windows]]&lt;br /&gt;
[[Category:Discusses editing preferences.xml]]&lt;br /&gt;
&lt;br /&gt;
[[es:Cómo configurar ventanas de vistas de cámara]]&lt;br /&gt;
[[fr:Howto:Configurer cameras, vues et fenêtres]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Syntax_highlighting_for_Nasal&amp;diff=137859</id>
		<title>Howto:Syntax highlighting for Nasal</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Syntax_highlighting_for_Nasal&amp;diff=137859"/>
		<updated>2023-06-29T13:19:59Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Sublime Text 4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There's '''[[Nasal]] syntax-highlighting''' support available for some editors, which is a big advantage, as it makes Nasal coding much easier.&lt;br /&gt;
&lt;br /&gt;
Syntax highlighting can often point to syntax errors and so reduce the number of tedious time-consuming and unproductive [[FlightGear]] runs. It can also be a sort of &amp;quot;guide&amp;quot; to the language, highlighting functions or keywords that are builtin, so you can quickly check if it is &amp;quot;type&amp;quot; or &amp;quot;typeof&amp;quot; by typing each. In addition makes understanding other people's code easier, since you have all of the parts visually separated out, like loops, strings, constants, and builtin functions.&lt;br /&gt;
&lt;br /&gt;
== Atom ==&lt;br /&gt;
Script is available from [https://github.com/www2000/atom-language-nasal Github] and can also be found in the [https://atom.io/packages/language-nasal Atom's packages repository].&lt;br /&gt;
&lt;br /&gt;
Manual installation:&lt;br /&gt;
&lt;br /&gt;
# Download the latest release from https://github.com/www2000/atom-language-nasal&lt;br /&gt;
# Unpack the tar.bz2&lt;br /&gt;
# Copy/move the language-nasal package to ~/.atom/packages&lt;br /&gt;
&lt;br /&gt;
For installation from atom's packages repository:&lt;br /&gt;
&lt;br /&gt;
# Open Atom&lt;br /&gt;
# Go to Preferences Edit -&amp;gt; Preferences or {{key press|Ctrl|+}},&lt;br /&gt;
# Click on packages and search for nasal&lt;br /&gt;
# Click install for Language Nasal&lt;br /&gt;
&lt;br /&gt;
== Emacs ==&lt;br /&gt;
[[File:Emacs-nasal-syntax-highlighting.png|400px|thumb|Nasal syntax highlighting in GNU Emacs]]&lt;br /&gt;
&lt;br /&gt;
There is an Emacs major mode for Nasal available in SimGear, that is based on Andy Ross' [https://github.com/andyross/nasal/blob/master/misc/nasal-mode.el original version]. In order to use it, you can copy the {{simgear source&lt;br /&gt;
| path = simgear/nasal/misc/nasal-mode.el&lt;br /&gt;
| text = nasal-mode.el&lt;br /&gt;
}} file where you have the rest of your manually installed packages and add the following line to your [https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html Emacs initialization file]:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(require 'nasal-mode)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In case you don't already have a directory to place your manually installed packages, put the file for instance in ''~/.emacs.d/manual-installs/'' (first create this directory if necessary) and insert the following in your Emacs initialization file before the above ''require'' line:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;;; Tell Emacs it can load ELisp files from there&lt;br /&gt;
(add-to-list 'load-path &amp;quot;~/.emacs.d/manual-installs&amp;quot;)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is done, restart Emacs, check that no error is reported and open a .nas file.&lt;br /&gt;
&lt;br /&gt;
Optional step: in order to speed up loading of nasal-mode.el, you can open it and choose ''Byte-compile this file'' from the ''Emacs-Lisp'' menu (or equivalently, run M-x byte-compile-file).&lt;br /&gt;
&lt;br /&gt;
{{Tip|In case you have a clone of the {{simgear source&lt;br /&gt;
| text = SimGear repository&lt;br /&gt;
}} on your hard drive, you may create a symbolic link from ~/.emacs.d/manual-installs/nasal-mode.el to the file inside that repository; this way, you'll get automatic updates of nasal-mode.el when your SimGear repository is updated (Emacs will ignore the .elc file resulting from byte compilation if the corresponding .el file is more recent).}}&lt;br /&gt;
&lt;br /&gt;
The '''true''' and '''false''' keywords introduced in January 2023 are already supported.&amp;lt;ref&amp;gt;https://forum.flightgear.org/viewtopic.php?f=30&amp;amp;t=41115&amp;amp;p=409029#p409029&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geany ==&lt;br /&gt;
&lt;br /&gt;
A syntax highlighting solution for [https://www.geany.org/ Geany], a lean text editor/IDE is available from [https://forum.flightgear.org/viewtopic.php?f=30&amp;amp;t=36838#p360677 this thread] in the FlightGear forum.&lt;br /&gt;
&lt;br /&gt;
== gedit ==&lt;br /&gt;
[[File:Philosopher's nasal highlighting in gEdit.jpeg|400px|thumb|Screen shot illustrating syntax highlighting in gedit]]&lt;br /&gt;
&lt;br /&gt;
'''Philosopher''' on the FlightGear Forum has created syntax highlighting for gedit, a popular and simple text editor for Mac OS X, Linux, and Windows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--http://theomegahangar.flymerlion.com/downloads/nasal.lang --&amp;gt;&lt;br /&gt;
To install, copy the ''nasal.lang'' file &amp;lt;!--from the link above or--&amp;gt; from the first post of the forum topic {{forum link|p=164133}} and:&lt;br /&gt;
&lt;br /&gt;
* If you use Mac, move it into your ''Applications/gedit/Contents/Resources/share/gtksourceview-X.0/language specs'' folder.&lt;br /&gt;
* For Linux, move it into your ''/usr/share/gtksourceview-X.0/language-specs'' folder.&lt;br /&gt;
&lt;br /&gt;
In the same post given above, there are instructions for how to edit ''xml.lang'' (in the same directory) to add the embedded XML content support (with this minor edit, Nasal highlighting will be used inside of certain tags, instead of plain text).&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;snippets&amp;quot; support, nasal.xml from the above post has to be moved into ''/usr/share/gedit/plugins/snippets/'' folder or installed using the &amp;quot;import&amp;quot; feature. See this image for more details: &lt;br /&gt;
&lt;br /&gt;
[[:File:Install nasal snippets in gedit.png|how to import Nasal snippets]].&lt;br /&gt;
{{-}}&lt;br /&gt;
&lt;br /&gt;
== jEdit ==&lt;br /&gt;
There's a syntax highlighting mode for jEdit, programmer's text editor&lt;br /&gt;
&lt;br /&gt;
Included are some of Nasal's internal functions and those functions currently implemented in NasalSys.cxx&lt;br /&gt;
To use, add the content of the catalog inside your own catalog (do NOT overwrite the file) and nasal.xml in /home/USER/.jedit/modes&lt;br /&gt;
&lt;br /&gt;
Restart jEdit and you can use it. Current extension is .nas, you can add your own extension and functions.&lt;br /&gt;
This mode is heavily based on the Javascript mode.&lt;br /&gt;
&lt;br /&gt;
Get it here: https://sourceforge.net/projects/fgscheduleview/files/jedit/catalog.zip/download&lt;br /&gt;
&lt;br /&gt;
== KDE Editors ==&lt;br /&gt;
There's a highlighting definition for nasal available at '''opendesktop.org''' (https://www.opendesktop.org/p/1187022/)&lt;br /&gt;
&lt;br /&gt;
Download the file and copy it into:&lt;br /&gt;
:~/.kde4/share/apps/katepart/syntax/ (for KDE4)&lt;br /&gt;
:or&lt;br /&gt;
:~/.local/share/katepart5/syntax/ (for KF5 pre 5.29) &lt;br /&gt;
:or &lt;br /&gt;
:~/.local/share/org.kde.syntax-highlighting/syntax/ (for current KF5 versions)&lt;br /&gt;
&lt;br /&gt;
(you can create the folders if they don't exist yet).&lt;br /&gt;
&lt;br /&gt;
Note that the syntax highlighting in KDE doesn't set colors, it just identifies structural elements, colors are defined by the '''schemas''' used by each editor, thus you get consistent highlighting between different languages.&lt;br /&gt;
&lt;br /&gt;
The highlighting file should work with all editors based on the katepart: KWrite, Kate, and the editor component of KDevelop.&lt;br /&gt;
&lt;br /&gt;
== Notepad++ ==&lt;br /&gt;
[[File:Highlight parse.png|400px|thumb|Screenshot of Nasal support for Notepad++]]&lt;br /&gt;
Provides comprehensive syntax highlighting and a function list parser with support for hierarchical display of both inline and out-of-body class member functions.&lt;br /&gt;
* [http://github.com/Slaiyer/nasal-npp GitHub repository for download and instructions]&lt;br /&gt;
&lt;br /&gt;
'''Alternative (syntax highlighting only):'''&lt;br /&gt;
* [http://dl.dropbox.com/u/1463693/nasal.xml Download here]&lt;br /&gt;
** [http://superuser.com/questions/62474/notepad-custom-syntax-highlighting-setting-where-to-look-for-it Instructions are here]&lt;br /&gt;
{{-}}&lt;br /&gt;
&lt;br /&gt;
== Sublime Text 2 ==&lt;br /&gt;
[[File:Sublime Text 2 syntax highlighting.png|400px|thumb|Sublime Text 2 syntax highlighting]]&lt;br /&gt;
&lt;br /&gt;
Scripts and installation instructions are here: https://github.com/freevryheid/nasal&lt;br /&gt;
{{-}}&lt;br /&gt;
&lt;br /&gt;
== Sublime Text 4 ==&lt;br /&gt;
Scripts and installation instructions are here: https://github.com/NikolaiVChr/sublime-nasal&lt;br /&gt;
{{-}}&lt;br /&gt;
&lt;br /&gt;
== Vim ==&lt;br /&gt;
[[File:Vim-nasal-syntax-highlighting.png|400px|thumb|Screen shot illustrating syntax highlighting in Vim]]&lt;br /&gt;
&lt;br /&gt;
One such editor is the free vim or its GUI variant gvim. &lt;br /&gt;
&lt;br /&gt;
It's not for everyone but it's free, and testing it doesn't hurt: http://www.vim.org/. &lt;br /&gt;
&lt;br /&gt;
The syntax definition file comes with the FlightGear code ({{flightgear file|scripts/syntax/nasal.vim}}). Highlighting works even for Nasal embedded in XML files (type &amp;quot;:set ft=nasal&amp;quot;, where ft stands for file-type)&lt;br /&gt;
&lt;br /&gt;
Here's an example, which demonstrates a short code segment with three syntax errors as well as the highlighting of a matching pair of parentheses (yellow) and trailing spaces (blue x). (The leading blue dots aren't on by default. They help to spot tab crimes.)&lt;br /&gt;
{{-}}&lt;br /&gt;
&lt;br /&gt;
== Visual Studio Code ==&lt;br /&gt;
[[File:Vscode-sintaxhighlight.jpg|thumb|Screen shot illustrating syntax highlighting in VSCode]]&lt;br /&gt;
&lt;br /&gt;
[https://code.visualstudio.com Visual Studio Code] is a source-code editor developed by Microsoft for Windows, Linux and macOS. Its open source and free.&lt;br /&gt;
&lt;br /&gt;
The nasal extension is available from [https://github.com/RenanMsV/nasal-vscode Github] and can also be found in the [https://marketplace.visualstudio.com/items?itemName=Renan-MsV.nasal-lang VSCode's marketplace].&lt;br /&gt;
It supports basic syntax highlighting and snippets to improve development speed.&lt;br /&gt;
&lt;br /&gt;
For installation from the marketplace:&lt;br /&gt;
&lt;br /&gt;
# Open VSCode&lt;br /&gt;
# Go to File -&amp;gt; Preferences -&amp;gt; Extensions or {{key press|Ctrl|Shift|X}},&lt;br /&gt;
# Search for nasal&lt;br /&gt;
# Click install for Nasal Language (FlightGear)&lt;br /&gt;
&lt;br /&gt;
Manual installation:&lt;br /&gt;
&lt;br /&gt;
# Download the latest release from the repository, it should be a .vsix file.&lt;br /&gt;
# Install the extension manually by doing the command 'code --install-extension path_to_extension.vsix'&lt;br /&gt;
&lt;br /&gt;
{{-}}&lt;br /&gt;
&lt;br /&gt;
== TextMate==&lt;br /&gt;
[[File:Nasal syntax highlighting in TextMate.png|thumb|Screen shot illustrating syntax highlighting in TextMate]]&lt;br /&gt;
[https://macromates.com/ TextMate] is a general-purpose GUI text editor for macOS created by Allan Odgaard. It is open source and free to use.&lt;br /&gt;
&lt;br /&gt;
There is a TextMate Bundle for Nasal available on [https://github.com/BobDotCom/Nasal.tmbundle GitHub] which can be [https://macromates.com/manual/en/bundles#installing_a_bundle installed in TextMate] for basic syntax highlighting.&lt;br /&gt;
&lt;br /&gt;
{{-}}&lt;br /&gt;
&lt;br /&gt;
==IntelliJ Family Editors (JetBrains)==&lt;br /&gt;
[[File:Nasal syntax highlighting in PyCharm.png|thumb|Screenshot illustrating syntax highlighting in PyCharm]]&lt;br /&gt;
[https://www.jetbrains.com/idea/ IntelliJ IDEA] is an integrated development environment written in Java for developing computer software written in Java, Kotlin, Groovy, and other JVM-based languages. It is developed by JetBrains and is available as an Apache 2 Licensed community edition, and in a proprietary commercial edition.&lt;br /&gt;
&lt;br /&gt;
Although there is not a native IntelliJ plugin for Nasal, IntelliJ supports [https://www.jetbrains.com/help/idea/textmate-bundles.html installing TextMate bundles] for syntax highlighting, so the [https://github.com/BobDotCom/Nasal.tmbundle Nasal TextMate Bundle] can be used. Installation instructions are available [https://www.jetbrains.com/help/webstorm/tutorial-using-textmate-bundles.html here].&lt;br /&gt;
&lt;br /&gt;
There are many [https://www.jetbrains.com/products/ JetBrains products] that are based on IntelliJ such as [https://www.jetbrains.com/pycharm/ PyCharm] (Python) and [https://www.jetbrains.com/webstorm/ WebStorm] (Javascript). These IDEs can also be used with nasal syntax highlighting, in the same way as above.&lt;br /&gt;
&lt;br /&gt;
{{-}}&lt;br /&gt;
&lt;br /&gt;
==Other editors==&lt;br /&gt;
Nasal being syntactically very close to other programming languages like C, Php or JavaScript, you can get some usable highlighting even without real Nasal support:&lt;br /&gt;
&lt;br /&gt;
* TextMate {{forum link|hilit=syntax+nasal|p=127828}}&lt;br /&gt;
*SciTe {{forum link|hilit=syntax+nasal|p=94521}}&lt;br /&gt;
&lt;br /&gt;
==FlightGear Wiki==&lt;br /&gt;
{{Note|As of 02/2016, we do not currently have a dedicated Nasal module available [http://wiki.flightgear.org/FlightGear_wiki:Village_pump/Archive_2016#Nasal_Syntaxhighlighting]}}&lt;br /&gt;
{{main article|Help:Formatting#Syntax highlighting}}&lt;br /&gt;
&lt;br /&gt;
Using the &amp;amp;lt;syntaxhighight&amp;amp;gt; tag with a lang=&amp;quot;nasal&amp;quot; attribute, we can have highlighting right here on the wiki. Use enclose=&amp;quot;div&amp;quot; to wrap the text, if it happens to be particularly wide.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
  # hello.nas&lt;br /&gt;
  print('Hello World!');&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which renders into:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
# hello.nas&lt;br /&gt;
print('Hello World!');&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax highlighting test==&lt;br /&gt;
Just a collection of keywords, etc. to test whether highlighting works (you can copy this to test your own highlighting):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
# this is a comment&lt;br /&gt;
# operators (if applicable):&lt;br /&gt;
!a ? a+b - c/d*e : f~g; expr1 and expr2 or expr3;&lt;br /&gt;
# Builtin functions, strings&lt;br /&gt;
print('Hello World!');&lt;br /&gt;
die(&amp;quot;We have an error, Houston!&amp;quot;, arg[0]);&lt;br /&gt;
cmdarg().getNode(&amp;quot;setting&amp;quot;).getValue();&lt;br /&gt;
streq(typeof(id(keys(hash))),10);&lt;br /&gt;
# Loopoids&lt;br /&gt;
foreach (var a; [&amp;quot;haha&amp;quot;, {command:&amp;quot;NASAL!&amp;quot;}, me]) {&lt;br /&gt;
    if(0) break;&lt;br /&gt;
    elsif(1) continue;&lt;br /&gt;
    else return;&lt;br /&gt;
    while(1) sprintf(&amp;quot;%s%s\n%s=%f&amp;quot;, &amp;quot;Spam&amp;quot;, &amp;quot;spam&amp;quot;, &amp;quot;spam&amp;quot;, 0e-0);&lt;br /&gt;
    for (var i=0; i &amp;lt; 0.00; i += 0x0) printf(&amp;quot;%d&amp;quot;, int(i));&lt;br /&gt;
    forindex(var o; a) (func {&lt;br /&gt;
        var o = o;&lt;br /&gt;
        setlistener(&amp;quot;/&amp;quot;, func print(o), 1, 2);&lt;br /&gt;
    })();&lt;br /&gt;
}&lt;br /&gt;
# String escaping stress tests:&lt;br /&gt;
'\a\b\c\&amp;quot;\\\?' # none of these&lt;br /&gt;
&amp;quot;\e\?\'\f\a&amp;quot; # none of these&lt;br /&gt;
'\'' # this one&lt;br /&gt;
&amp;quot;\&amp;quot;\r\n\t\\\t&amp;quot; # and all of these&lt;br /&gt;
# And optionally string formatting:&lt;br /&gt;
&amp;quot;%s%%s%.0f%8d&amp;quot; # the second &amp;quot;s&amp;quot; shouldn't be highlighted, otherwise everything else&lt;br /&gt;
# Syntax error!:&lt;br /&gt;
%$@&amp;amp;^|\`&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related content==&lt;br /&gt;
*{{forum url|p=164155}}&lt;br /&gt;
*{{forum url|t=12495}}&lt;br /&gt;
*{{forum url|t=15972}}&lt;br /&gt;
*{{forum url|t=9812}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Nasal howto]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Virtual_Reality&amp;diff=137765</id>
		<title>Virtual Reality</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Virtual_Reality&amp;diff=137765"/>
		<updated>2023-06-07T13:22:45Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Testing */ Added Windows&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Experimental|disclaimer=VR support in flightgear still comes with a number of caveats.}}&lt;br /&gt;
&lt;br /&gt;
{{infobox subsystem&lt;br /&gt;
|image       = VR screenshot c182s.png&lt;br /&gt;
|name        = Virtual Reality&lt;br /&gt;
|started     = 07/2021&lt;br /&gt;
|description = Virtual Reality support using osgXR / OpenXR&lt;br /&gt;
|status      = Active&lt;br /&gt;
|developers  = James Hogan &amp;lt;ref&amp;gt;https://sourceforge.net/u/amalon/profile/&amp;lt;/ref&amp;gt;&lt;br /&gt;
|changelog = https://sourceforge.net/u/amalon/profile/feed.rss&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The '''Virtual Reality''' project aims to add immersive VR support to FlightGear. This is done using the OpenXR&amp;lt;ref&amp;gt;{{cite web |url=https://www.khronos.org/OpenXR/ |title=OpenXR Overview |publisher=The Khronos Group Inc}}&amp;lt;/ref&amp;gt; API, via an external library called osgXR&amp;lt;ref name=&amp;quot;github-osgXR&amp;quot;&amp;gt;{{github source |user=amalon |repo=osgXR |full=1}}&amp;lt;/ref&amp;gt; for handling OpenXR and OpenSceneGraph specifics, which is being developed in parallel.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
A previous attempt to support some form of VR is described in [[OculusImplementation]].&lt;br /&gt;
&lt;br /&gt;
The portable OpenXR API now seems to be getting widespread adoption, which will allow FlightGear to support a variety of VR devices across multiple platforms.&lt;br /&gt;
&lt;br /&gt;
== Source code ==&lt;br /&gt;
&lt;br /&gt;
* osgXR source can be found on github&amp;lt;ref name=&amp;quot;github-osgXR&amp;quot;/&amp;gt;, or the version included in the flightgear 3rdparty directory can be used.&lt;br /&gt;
** On ArchLinux, you can install the osgxr AUR package &amp;lt;ref&amp;gt;https://aur.archlinux.org/packages/osgxr/&amp;lt;/ref&amp;gt; to get the version needed by FlightGear's next branches.&lt;br /&gt;
* Some VR code can now be found in FlightGear's next branches (see below for details).&lt;br /&gt;
** On ArchLinux, you can use the -git AUR packages, i.e. flightgear-git, simgear-git, flightgear-data-git.&lt;br /&gt;
** On Windows, you can use the [[Nightly Build#Windows|Windows nightly builds]].&lt;br /&gt;
* More FlightGear changes can be found on James Hogan's osgxr branch&amp;lt;ref&amp;gt;{{sourceforge source |user=amalon |repo=flightgear |branch=osgxr |full=1}}&amp;lt;/ref&amp;gt; (non-rebased branch), or osgxr_clean branch&amp;lt;ref&amp;gt;{{sourceforge source |user=amalon |repo=flightgear |branch=osgxr_clean |full=1}}&amp;lt;/ref&amp;gt; (clean history, may be rebased). A mirror is available on github for issue tracking&amp;lt;ref&amp;gt;{{github source |user=amalon |repo=flightgear-vr}}&amp;lt;/ref&amp;gt;.&lt;br /&gt;
* More SimGear changes can be found in James Hogan's osgxr branch&amp;lt;ref&amp;gt;{{sourceforge source |user=amalon |repo=simgear |branch=osgxr |full=1}}&amp;lt;/ref&amp;gt; (non-rebased branch), or osgxr_clean branch&amp;lt;ref&amp;gt;{{sourceforge source |user=amalon |repo=simgear |branch=osgxr_clean |full=1}}&amp;lt;/ref&amp;gt; (clean history, may be rebased).&lt;br /&gt;
* More FGData changes can be found on James Hogan's osgxr branch&amp;lt;ref&amp;gt;{{sourceforge source |user=amalon |repo=fgdata |branch=osgxr |full=1}}&amp;lt;/ref&amp;gt; (non-rebased branch), or osgxr_clean branch&amp;lt;ref&amp;gt;{{sourceforge source |user=amalon |repo=fgdata |branch=osgxr_clean |full=1}}&amp;lt;/ref&amp;gt; (clean history, may be rebased).&lt;br /&gt;
&lt;br /&gt;
== Building &amp;amp; Packaging Notes ==&lt;br /&gt;
&lt;br /&gt;
When CMake runs for FlightGear (next or osgxr/osgxr_clean branches), by default it will attempt to enable VR on Windows and Linux (same as &amp;lt;code&amp;gt;-DENABLE_VR=ON&amp;lt;/code&amp;gt;). It will do the following:&lt;br /&gt;
# Look for the osgXR library, and if found it will link against that (same as &amp;lt;code&amp;gt;-DSYSTEM_OSGXR=ON&amp;lt;/code&amp;gt;).&lt;br /&gt;
# If no osgXR library is found it will check for OpenXR and if found it will build its own static built-in copy of osgXR to use.&lt;br /&gt;
# If no OpenXR is found it will disable VR support.&lt;br /&gt;
&lt;br /&gt;
In any case it will print a message along the lines of &amp;lt;code&amp;gt;-- VR support enabled/disabled...&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To avoid implicit dependencies when packaging, packagers may need to do ONE of the following:&lt;br /&gt;
* preferably depend upon an osgXR package providing the osgXR dynamic library&lt;br /&gt;
* OR depend on OpenXR and GLX, and explicitly pass `-DSYSTEM_OSGXR=OFF` to CMake so the built-in osgXR is built statically&lt;br /&gt;
* OR explicitly pass `-DENABLE_VR=OFF` to CMake to disable VR support altogether&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
'''Last updated: 22nd August 2022'''&lt;br /&gt;
&lt;br /&gt;
Highly experimental, partially in next, partly out of tree. Development in progress.&lt;br /&gt;
&lt;br /&gt;
Working in next branch (e.g. [[Nightly Build#Windows|Windows nightly builds]]):&lt;br /&gt;
* Enable/disable at startup via --enable-vr / --disable-vr command line options, or from GUI (View-&amp;gt;VR Options).&lt;br /&gt;
* VR friendly splash screen.&lt;br /&gt;
* Displaying stereo images on the HMD.&lt;br /&gt;
* Motion tracking updates HMD views (but doesn't move main camera).&lt;br /&gt;
* Configurable VR mirror (see View-&amp;gt;VR Settings) shown in default camera view (blank, left, right, side-by-side left &amp;amp; right).&lt;br /&gt;
* Visibility mask support.&lt;br /&gt;
&lt;br /&gt;
Working in osgxr/osgxr_clean branch:&lt;br /&gt;
* Controller support for flight (helicopter collective in left hand, helicopter cyclic in right).&lt;br /&gt;
* Controller pointing support with some mouse emulation.&lt;br /&gt;
* Rendering of controllers (as basic cuboids).&lt;br /&gt;
&lt;br /&gt;
Current priorities:&lt;br /&gt;
* Improving platform support (Monado in particular).&lt;br /&gt;
* Continue to polish controller flight support, add haptics etc.&lt;br /&gt;
* Get started on other controller interaction and controller rendering.&lt;br /&gt;
&lt;br /&gt;
=== Known issues ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;Splash screen is rendered directly onto the left eye viewport which isn't very pleasant in VR.&amp;lt;/s&amp;gt;&lt;br /&gt;
* Performance could be better so crank down the graphics if frame rate is low.&lt;br /&gt;
* Shadows are broken:&lt;br /&gt;
** When shadows are enabled, the FlightGear window doesn't appear to refresh even though buffers are swapped, but VR output works.&lt;br /&gt;
** Sun position is fixed relative to head, presumably because shadow maps are rendered based on master camera, but osgXR only moves slave cams.&lt;br /&gt;
* Spotlights (taxi/landing lights) are relative to camera in default mode&lt;br /&gt;
** Affects default / scene view mode (&amp;lt;code&amp;gt;--prop:/sim/vr/mode=AUTOMATIC&amp;lt;/code&amp;gt;), as stereo callbacks position cameras&lt;br /&gt;
** Doesn't affect slave cameras mode (&amp;lt;code&amp;gt;--prop:/sim/vr/mode=SLAVE_CAMERAS&amp;lt;/code&amp;gt;), as slave cameras are positioned correctly&lt;br /&gt;
* ALS filters appear to operate in screen space but don't take into account side by side rendering&lt;br /&gt;
* Still some Monado issues:&lt;br /&gt;
** &amp;lt;s&amp;gt;Saturated output due to not using SRGB textures&amp;lt;/s&amp;gt; (use osgXR 0.3.8)&lt;br /&gt;
** &amp;lt;s&amp;gt;Suboptimal depth format used&amp;lt;/s&amp;gt; (osgXR 0.3.8 should end up using GL_DEPTH32F_STENCIL8)&lt;br /&gt;
** Warnings about suggesting bindings of attached action sets when restarting VR (looks like a monado issue at first glance)&lt;br /&gt;
* Multiple SteamVR issues on Linux:&lt;br /&gt;
** If it doesn't close cleanly on Linux it may be due to a SteamVR bug&amp;lt;ref name=&amp;quot;github-SteamVR-422&amp;quot;/&amp;gt;, but a ctrl+c / SIGINT on the command line should close it.&lt;br /&gt;
* osgXR doesn't support Direct3D graphics bindings for WMR (it isn't a priority for me). Contributions welcome.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
&lt;br /&gt;
VR has been tested with the following hardware &amp;amp; software configurations:&lt;br /&gt;
* HTC Vive, SteamVR, Linux/X11 (ArchLinux), nVidia proprietary -- [[User:Amalon|Amalon]] ([[User talk:Amalon|talk]]) 21:43, 27 August 2021 (UTC)&lt;br /&gt;
* Oculus Quest 2, SteamVR (ALVR), Linux/X11 (Fedora 34) -- [[User:vezza|vezza]] ([[User talk:vezza|talk]]) 16:30 27 August 2021 (UTC)&lt;br /&gt;
* Oculus Quest 2, Oculus App, Windows 10 --[[User:Necolatis|Necolatis]] ([[User talk:Necolatis|talk]]) 13:22, 7 June 2023 (UTC)&lt;br /&gt;
** Works fine, shadows gets rendered, but move when turning the head.&lt;br /&gt;
** Eye view point is about 0.2 meter above where the view is defined, so I have to duck my head to look out through the HUD and stuff.&lt;br /&gt;
* HTC Vive, Monado (to window), Linux/X11 (ArchLinux), nVidia proprietary -- [[User:Amalon|Amalon]] ([[User talk:Amalon|talk]]) 22:36, 17 December 2021 (UTC)&lt;br /&gt;
** only basic display to window tested&lt;br /&gt;
** osgXR master&lt;br /&gt;
* Monado dummy driver, Linux/X11 (ArchLinux), Intel mesa -- [[User:Amalon|Amalon]] ([[User talk:Amalon|talk]]) 22:36, 17 December 2021 (UTC)&lt;br /&gt;
** only basic display to window tested&lt;br /&gt;
** osgXR master&lt;br /&gt;
** /sim/vr/depth-info=false&lt;br /&gt;
* Monado Dummy HMD, Linux/X11 (Debian), AMD Mesa Drivers [[User:merspieler|merspieler]] ([[User talk:merspieler|talk]]) 23:27, 17 December 2021 (UTC)&lt;br /&gt;
** Applying the following patch: &amp;lt;syntaxhighlight lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff --git a/src/XRState.cpp b/src/XRState.cpp&lt;br /&gt;
index ce09bcd..5bcbbca 100644&lt;br /&gt;
--- a/src/XRState.cpp&lt;br /&gt;
+++ b/src/XRState.cpp&lt;br /&gt;
@@ -1017,7 +1017,7 @@ XRState::UpResult XRState::upSession()&lt;br /&gt;
         unsigned int thisDepthBits = 0;&lt;br /&gt;
         switch (format)&lt;br /&gt;
         {&lt;br /&gt;
-            case GL_RGBA16:&lt;br /&gt;
+            case GL_RGB10_A2:&lt;br /&gt;
                 // FIXME This one will do for now...&lt;br /&gt;
                 if (!chosenSwapchainFormat)&lt;br /&gt;
                     chosenSwapchainFormat = format;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you've got VR working, feel free to add your configuration above.&lt;br /&gt;
&lt;br /&gt;
The following testing is desired:&lt;br /&gt;
* SteamVR, Linux, AMD graphics:&lt;br /&gt;
** Test that motion smoothing works (its unsupported on NVidia)&lt;br /&gt;
** moving head side to side should reproject using depth buffer&lt;br /&gt;
** try suspending fgfs with Ctrl+Z in terminal (resume with fg) to force reprojection&lt;br /&gt;
* Monado, Linux:&lt;br /&gt;
** May be awkward to test as it crashes in latest NVidia proprietary drivers&amp;lt;ref&amp;gt;https://gitlab.freedesktop.org/monado/monado/-/issues/122&amp;lt;/ref&amp;gt;.&lt;br /&gt;
*** There's now a workaround mentioned in that ticket that allows for basic testing&lt;br /&gt;
** Use at least osgXR 0.3.6 for monado workaround, or &amp;lt;code&amp;gt;--disable-vr&amp;lt;/code&amp;gt; and enable VR with GUI&lt;br /&gt;
* SteamVR, Windows, with a headset (I've only attempted to null driver, and it at least partly worked):&lt;br /&gt;
** Needs building with at least osgXR 0.3.7 for Windows bindings, and my osgxr/osgxr_clean branch of flightgear/fgdata/simgear&lt;br /&gt;
** May need --disable-sentry&lt;br /&gt;
** Test headset output and controllers&lt;br /&gt;
&lt;br /&gt;
Issues can be reported:&lt;br /&gt;
* On the flightgear-devel [[Mailing lists|mailing list]]&lt;br /&gt;
* To the {{tickets|FlightGear bug tracker}} if the issue is reproducible on the next branch&lt;br /&gt;
* To the [{{github issues url |user=amalon |repo=flightgear-vr}} flightgear-vr issue tracker]&lt;br /&gt;
* To the [{{github issues url |user=amalon |repo=osgXR}} osgXR issue tracker] if it is known to be a non-flightgear specific bug in osgXR&lt;br /&gt;
&lt;br /&gt;
But please be aware of the known caveats mentioned above, and the roadmap below.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
Here are some pointers to get the best VR experience.&lt;br /&gt;
* Ensure your runtime supports asynchronous reprojection, which may alleviate the nausea induced by lower frame rates.&lt;br /&gt;
** On Linux / SteamVR / NVidia proprietary driver, ensure you have at least driver version 270.&lt;br /&gt;
* If your frame rate is being capped at the refresh rate of your desktop monitor, try disabling VSync in both flightgear settings and your driver settings&lt;br /&gt;
** On Linux / NVidia proprietary driver, its found in OpenGL settings in nvidia-settings.&lt;br /&gt;
* If FlightGear is getting throttled by SteamVR (to try and ensure a consistent, if slow, frame rate), consider switching to fixed throttling (in per-application video settings) and playing with the sliders. You may prefer no frame rate throttling but a higher predicted frame time.&lt;br /&gt;
* Enabling multithreading may get you better performance, e.g. &amp;lt;code&amp;gt;--prop:/sim/rendering/multithreading-mode=CullThreadPerCameraDrawThreadPerContext&amp;lt;/code&amp;gt;&lt;br /&gt;
* If using an AMD GPU, use [https://gitlab.com/corectrl/corectrl CoreCtrl] and set the GPU to the &amp;quot;Virtual Reality&amp;quot; power profile with GPU and memory clocked to max. You may also benefit from changing the CPU frequency governor to Performance.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
=== Concepts ===&lt;br /&gt;
&lt;br /&gt;
==== Interaction Modes ====&lt;br /&gt;
&lt;br /&gt;
Interaction modes are a way of describing (via XML) how a VR controller should look and behave in a particular context. It roughly corresponds to a virtual control you can hold (and let go of), for example:&lt;br /&gt;
* When you're holding a helicopter collective control, the pitch angle of the controller should control the collective pitch (and look like a collective in your hand).&lt;br /&gt;
* When you're pointing the controller at a GUI or cockpit controls it should pick along a line, rendered in a specific way, and emulate mouse events to those controls (and look like a small laser pointer control or a pointing hand/glove).&lt;br /&gt;
* When you're teleporting around, it should pick along a parabolic arc, rendered a specific way, and teleport there when the button is released.&lt;br /&gt;
* When you're using the flight recorder it should treat the controller trackpad as a rewind/fast forward (and look like a fancy TV remote or something).&lt;br /&gt;
&lt;br /&gt;
The definition of interaction modes should be generic enough that custom ones can be provided with aircraft, or defined separately and work with any aircraft, but also powerful enough that a complex and intuitive control can be defined with a minimum of Nasal scripting.&lt;br /&gt;
&lt;br /&gt;
== Roadmap ==&lt;br /&gt;
&lt;br /&gt;
=== Development targets ===&lt;br /&gt;
* Merge stable &amp;amp; minimally functional code into next ({{Merge-request |project=flightgear |id=253}}, {{Merge-request |project=fgdata |id=238}}) {{done}}&lt;br /&gt;
** Bare functionality {{done}}&lt;br /&gt;
** Stability {{done}}&lt;br /&gt;
* Merge some form of desktop mirroring of VR view ({{Merge-request |project=flightgear |id=260}}, {{Merge-request |project=fgdata |id=241}}) {{done}}&lt;br /&gt;
* Merge visibility mask support ({{Merge-request |project=simgear |id=98}}, {{Merge-request |project=flightgear |id=264}}, {{Merge-request |project=fgdata |id=244}}) {{done}}&lt;br /&gt;
* Polish {{not done}}&lt;br /&gt;
** Make launcher accessible to VR user {{not done}}&lt;br /&gt;
** Make splash screen VR friendly {{done}}&lt;br /&gt;
** Make GUI accessible to VR user {{not done}}&lt;br /&gt;
** Make aircraft center accessible to VR user {{not done}}&lt;br /&gt;
* Functionality {{progressbar|40}}&lt;br /&gt;
** Controller flight support {{progressbar|80}}&lt;br /&gt;
*** Haptic feedback {{not done}}&lt;br /&gt;
** Controller interaction support {{progressbar|40}}&lt;br /&gt;
** Walker locomotion / room scale {{not done}}&lt;br /&gt;
&lt;br /&gt;
=== General tasks ===&lt;br /&gt;
&lt;br /&gt;
* Stability {{done}}&lt;br /&gt;
** Clean shutdown {{done}}&lt;br /&gt;
*** SteamVR for Linux hangs on OpenXR app shutdown&amp;lt;ref name=&amp;quot;github-SteamVR-422&amp;quot;&amp;gt;{{github issues url|ValveSoftware|SteamVR-for-Linux|number=422}}&amp;lt;/ref&amp;gt;.&lt;br /&gt;
** Handle OpenXR stopping {{done}}&lt;br /&gt;
*** SteamVR for Linux kills running app even if it ends session&amp;lt;ref&amp;gt;{{github issues url|ValveSoftware|SteamVR-for-Linux|number=461}}&amp;lt;/ref&amp;gt;.&lt;br /&gt;
* Resolve questions around VR mirror switching {{done}}&lt;br /&gt;
* Performance {{progressbar|10}}&lt;br /&gt;
** Handle shouldRender=false by somehow disabling VR cameras (maybe setting cull mask to 0) {{not done}}&lt;br /&gt;
** SceneView mode: Combine culling traversal {{not done}}&lt;br /&gt;
** Check why update isn't proceeding in parallel with multithreading {{not done}}&lt;br /&gt;
** Use OpenXR visibility mask extension to avoid rendering to invisible fragments {{done}}&lt;br /&gt;
* Sound {{progressbar|0}}&lt;br /&gt;
** Ensure surround sound is relative to user's head {{not done}}&lt;br /&gt;
** Investigate a way to use appropriate OpenAL binaural mode automatically {{not done}}&lt;br /&gt;
** Specify separate sound device for VR so it switches automatically? {{not done}}&lt;br /&gt;
&lt;br /&gt;
=== User facing features ===&lt;br /&gt;
&lt;br /&gt;
* Display {{progressbar|60}}&lt;br /&gt;
** Show views on HMD {{done}}&lt;br /&gt;
** Configurable mirror on desktop window {{done}}&lt;br /&gt;
*** Left, Right, Left &amp;amp; Right {{done}}&lt;br /&gt;
*** Composited mirror mode (combine &amp;amp; blend views and allow zooming) {{paused}}&lt;br /&gt;
** Geometry shader multi viewport {{not done}}&lt;br /&gt;
** OVR_multiview2 with OSG branch {{not done}}&lt;br /&gt;
* Motion tracking {{progressbar|50}}&lt;br /&gt;
** Follow motion of HMD {{done}}&lt;br /&gt;
** Move master camera instead of scene slave cameras (presumably would fix surround sound) {{not done}}&lt;br /&gt;
* Settings {{progressbar|20}}&lt;br /&gt;
** Mirror settings {{done}}&lt;br /&gt;
** Dynamic toggling of VR {{done}}&lt;br /&gt;
** Sound settings? {{not done}}&lt;br /&gt;
*** Sound reference frame (user's head or room)? {{not done}}&lt;br /&gt;
** Advanced VR settings {{not done}}&lt;br /&gt;
*** validation layer {{not done}}&lt;br /&gt;
*** submit depth information {{done}} but needs testing (SteamVR+Linux+nVidia doesn't do motion smoothing yet)&lt;br /&gt;
*** osgXR VR mode {{not done}}&lt;br /&gt;
**** Fix slave cameras mode clearing {{not done}}&lt;br /&gt;
*** osgXR swapchain mode {{not done}}&lt;br /&gt;
* Platform support {{progressbar|70}}&lt;br /&gt;
** Linux/X11/OpenGL graphics bindings {{done}}&lt;br /&gt;
** Monado support {{progressbar|60}}&lt;br /&gt;
** Windows/OpenGL graphics bindings {{done}}&lt;br /&gt;
** Windows Mixed Reality render via DirectX bindings {{not done}}&lt;br /&gt;
* Splash screen {{progressbar|80}}&lt;br /&gt;
** Show splash screen as quad layer for runtime to composite {{done}}&lt;br /&gt;
** Cube map/quads background provided by aircraft {{progressbar|20}}&lt;br /&gt;
* GUI {{progressbar|10}} {{priority|2}}&lt;br /&gt;
** Shown over mirror on desktop window {{done}}&lt;br /&gt;
** Expose a menubar &amp;amp; GUI, rendered to a quad or cylinder in front of VR user when they activate {{not done}}&lt;br /&gt;
** Interact with GUI buttons etc using controllers as lasers {{not done}}&lt;br /&gt;
* Launcher {{not done}}&lt;br /&gt;
** Show launcher in VR similar to GUI when enabled via command line or launcher option {{not done}}&lt;br /&gt;
** Transition to flightgear {{not done}}&lt;br /&gt;
** Transition to aircraft center with VR already started {{not done}}&lt;br /&gt;
** Transition back to flightgear from aircraft center {{not done}}&lt;br /&gt;
** More VR friendly environment&lt;br /&gt;
*** A simple background cubemap, shared with splash {{not done}}&lt;br /&gt;
*** A hanger (like xplane11)? {{not done}}&lt;br /&gt;
* Controller support {{progressbar|50}}&lt;br /&gt;
** Basic action support in osgXR API {{done}}&lt;br /&gt;
** Tie osgXR actions into FG's input system {{done}}&lt;br /&gt;
** Helicopter flight controls (can use for planes too) {{done}}&lt;br /&gt;
** Plane flight controls {{not done}}&lt;br /&gt;
** Render controllers {{progressbar|20}}&lt;br /&gt;
** Hand tracking (robot hand) {{progressbar|90}}&lt;br /&gt;
** Render skinned hand {{not done}}&lt;br /&gt;
** Basic interaction with controls {{progressbar|80}}&lt;br /&gt;
*** Grasp surfaces {{{progressbar|90}}&lt;br /&gt;
*** Force feedback for haptic gloves {{not done}}&lt;br /&gt;
** Advanced interaction with animated controls {{progressbar|90}}&lt;br /&gt;
*** Direct manipulation mouse mode for testing without VR {{progressbar|90}}&lt;br /&gt;
*** Inverse kinematics of translate and rotate animations {{done}}&lt;br /&gt;
*** Ability to specify frictions {{not done}}&lt;br /&gt;
*** Ability to specify ranges (where can't be deduced) {{not done}}&lt;br /&gt;
*** Ability to hint what aircraft processes/filters/kinematics should be reversible {{progressbar|10}}&lt;br /&gt;
** Haptic feedback {{not done}}&lt;br /&gt;
* Walker VR locomotion / Room scale {{progressbar|0}}&lt;br /&gt;
** Walker follows user {{not done}}&lt;br /&gt;
** Parabolic arc teleport {{not done}}&lt;br /&gt;
** Snap into seats {{not done}}&lt;br /&gt;
** Easy turning around {{not done}}&lt;br /&gt;
&lt;br /&gt;
=== Aircraft compatibility ===&lt;br /&gt;
&lt;br /&gt;
This section is largely about how usable controls are in VR with direct manipulation.&lt;br /&gt;
&lt;br /&gt;
==== [[Cessna 172P]] ====&lt;br /&gt;
* Controls&lt;br /&gt;
** Flaps {{progressbar|90}}&lt;br /&gt;
*** kinematic needs to be reversible {{progressbar|90}}&lt;br /&gt;
** Visors {{progressbar|70}}&lt;br /&gt;
*** correct relative friction {{not done}}&lt;br /&gt;
** Opening of doors {{not done}}&lt;br /&gt;
*** reversing of gain expression {{not done}}&lt;br /&gt;
&lt;br /&gt;
==== [[Eurocopter EC130 B4]] ====&lt;br /&gt;
* Engine start&lt;br /&gt;
** Engine cutoff lever reversing (Alt+C required) {{not done}}&lt;br /&gt;
** External power on (GUI required) {{not done}}&lt;br /&gt;
** External power off (GUI required) {{not done}}&lt;br /&gt;
** Throttle roll (middle mouse drag required) {{not done}}&lt;br /&gt;
* Take off &amp;amp; flight&lt;br /&gt;
** Arms &amp;amp; hands get a bit in the way {{not done}}&lt;br /&gt;
* Controls&lt;br /&gt;
** Engine cutoff lever {{not done}}&lt;br /&gt;
*** Uses nasal, needs pick animation binding of some sort&lt;br /&gt;
** ELT {{progressbar|50}}&lt;br /&gt;
*** Both /ELT/test and /ELT/armed can be set to bool&lt;br /&gt;
*** Both can get set though&lt;br /&gt;
** Doors &amp;amp; hatches {{not done}}&lt;br /&gt;
*** Add limits&lt;br /&gt;
&lt;br /&gt;
==== [[McDonnell Douglas F-15 Eagle]] ====&lt;br /&gt;
* Model&lt;br /&gt;
** Floating switches are very noticeable {{not done}}&lt;br /&gt;
** HUD should be at infinity {{not done}}&lt;br /&gt;
&lt;br /&gt;
==== [[Robinson R22]] ====&lt;br /&gt;
* Controls&lt;br /&gt;
** Tilting T-bar {{progressbar|90}}&lt;br /&gt;
*** limit range? {{not done}}&lt;br /&gt;
** Collective awkward to get at {{not done}}&lt;br /&gt;
** Throttle roll &amp;amp; governor switch? {{not done}}&lt;br /&gt;
&lt;br /&gt;
==== [[Robinson R44]] ====&lt;br /&gt;
* Controls&lt;br /&gt;
** Tilting T-bar {{not done}}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{Appendix}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Core development projects]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/HDR&amp;diff=137761</id>
		<title>User:Necolatis/HDR</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/HDR&amp;diff=137761"/>
		<updated>2023-06-05T16:30:45Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page I detail my experiences with playing around with PBR and [[HDR Pipeline|HDR]] in Flightgear 2020.4.0.&lt;br /&gt;
=Render quality=&lt;br /&gt;
It looks absolutely amazing when using model-pbr.eff with ORM texture.&lt;br /&gt;
[[File:Hdr-3.png|thumb|Looks great]]&lt;br /&gt;
=Bugs=&lt;br /&gt;
===Black areas===&lt;br /&gt;
This happens sometimes in HDR. Only when using model-pbr.eff, model-combined.eff don't have the issue. It goes away if I sit and wait about 1 to 2 minutes.&lt;br /&gt;
[[File:Hdr-1.png|thumb|Black areas]]&lt;br /&gt;
===Dark halo===&lt;br /&gt;
Some aircraft have a dark halo around the lower edge of the objects in HDR.&lt;br /&gt;
The used effect is just stock model-combined without any adjustments. The halo goes away moving camera lower than the object that displays a halo.&lt;br /&gt;
[[File:Hdr-2.png|thumb|Dark halo]]&lt;br /&gt;
===Weak AA===&lt;br /&gt;
The only I got to work was FXAA from driver, and that don't get shown in screenshots.&lt;br /&gt;
Also tried &amp;lt;nowiki&amp;gt;--prop:/sim/rendering/hdr/antialiasing-technique=1&amp;lt;/nowiki&amp;gt; or 2 to no avail.&lt;br /&gt;
===Textranslate===&lt;br /&gt;
This type of animation seems to not work in HDR.&lt;br /&gt;
=Missing model features=&lt;br /&gt;
===Ignores canvas background alpha===&lt;br /&gt;
Canvas background color alpha is constant at 1.0. So canvas HUDs wont work.&lt;br /&gt;
===Ignores model alpha (AC3D material)===&lt;br /&gt;
Constant at 1.0&lt;br /&gt;
===Thruster effect===&lt;br /&gt;
It don't show.&lt;br /&gt;
===Backout===&lt;br /&gt;
It does something weird.&lt;br /&gt;
=Missing world features=&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis&amp;diff=137760</id>
		<title>User:Necolatis</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis&amp;diff=137760"/>
		<updated>2023-06-05T11:45:57Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''List of Wiki pages I intend to expand:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''List of Wiki pages I intend to make:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''List of Wiki pages I made and try to keep updated:'''&lt;br /&gt;
* [[Canvas Nasal API‎]]&lt;br /&gt;
* [[Aero input and outputs‎]]&lt;br /&gt;
* [[Saab 37 Viggen]]&lt;br /&gt;
* [[Aircraft Failure System]]&lt;br /&gt;
* [[Nasal and the Property-tree]]&lt;br /&gt;
* [[Aircraft sound]]&lt;br /&gt;
* [[Crash and stress damage system]]&lt;br /&gt;
* [[Blender AC3D import and export]]&lt;br /&gt;
* [[:Category:Aerodynamic Tools]]&lt;br /&gt;
* [[Aeromatic]]&lt;br /&gt;
* [[Save properties between sessions]]&lt;br /&gt;
* [[JSBSim Logging]]&lt;br /&gt;
* [[Custom blackout system]]&lt;br /&gt;
* [[Terrain Detection]]&lt;br /&gt;
* [[Howto:Add sound effects to aircraft]]&lt;br /&gt;
* [[AI wake turbulence]]&lt;br /&gt;
* [[Effect Framework]]&lt;br /&gt;
* [[JSB to PNG]]&lt;br /&gt;
* [[User:Necolatis/HDR|My experience with testing HDR]]&lt;br /&gt;
&lt;br /&gt;
[[User:Necolatis/often_used|Shortcuts]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/HDR&amp;diff=137759</id>
		<title>User:Necolatis/HDR</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/HDR&amp;diff=137759"/>
		<updated>2023-06-05T11:30:14Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Missing AA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page I detail my experiences with playing around with PBR and [[HDR Pipeline|HDR]] in Flightgear 2020.4.0.&lt;br /&gt;
=Render quality=&lt;br /&gt;
It looks absolutely amazing when using model-pbr.eff with ORM texture.&lt;br /&gt;
[[File:Hdr-3.png|thumb|Looks great]]&lt;br /&gt;
=Bugs=&lt;br /&gt;
===Black areas===&lt;br /&gt;
This happens sometimes in HDR. Only when using model-pbr.eff, model-combined.eff don't have the issue. It goes away if I sit and wait about 1 to 2 minutes.&lt;br /&gt;
[[File:Hdr-1.png|thumb|Black areas]]&lt;br /&gt;
===Dark halo===&lt;br /&gt;
Some aircraft have a dark halo around the lower edge of the objects in HDR.&lt;br /&gt;
The used effect is just stock model-combined without any adjustments. The halo goes away moving camera lower than the object that displays a halo.&lt;br /&gt;
[[File:Hdr-2.png|thumb|Dark halo]]&lt;br /&gt;
===Weak AA===&lt;br /&gt;
The only I got to work was FXAA from driver, and that don't get shown in screenshots.&lt;br /&gt;
Also tried &amp;lt;nowiki&amp;gt;--prop:/sim/rendering/hdr/antialiasing-technique=1&amp;lt;/nowiki&amp;gt; or 2 to no avail.&lt;br /&gt;
=Missing model features=&lt;br /&gt;
===Ignores canvas background alpha===&lt;br /&gt;
Canvas background color alpha is constant at 1.0. So canvas HUDs wont work.&lt;br /&gt;
===Ignores model alpha (AC3D material)===&lt;br /&gt;
Constant at 1.0&lt;br /&gt;
===Thruster effect===&lt;br /&gt;
It don't show.&lt;br /&gt;
===Backout===&lt;br /&gt;
It does something weird.&lt;br /&gt;
=Missing world features=&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/HDR&amp;diff=137758</id>
		<title>User:Necolatis/HDR</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/HDR&amp;diff=137758"/>
		<updated>2023-06-05T11:29:50Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Ignores model alpha (AC3D) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page I detail my experiences with playing around with PBR and [[HDR Pipeline|HDR]] in Flightgear 2020.4.0.&lt;br /&gt;
=Render quality=&lt;br /&gt;
It looks absolutely amazing when using model-pbr.eff with ORM texture.&lt;br /&gt;
[[File:Hdr-3.png|thumb|Looks great]]&lt;br /&gt;
=Bugs=&lt;br /&gt;
===Black areas===&lt;br /&gt;
This happens sometimes in HDR. Only when using model-pbr.eff, model-combined.eff don't have the issue. It goes away if I sit and wait about 1 to 2 minutes.&lt;br /&gt;
[[File:Hdr-1.png|thumb|Black areas]]&lt;br /&gt;
===Dark halo===&lt;br /&gt;
Some aircraft have a dark halo around the lower edge of the objects in HDR.&lt;br /&gt;
The used effect is just stock model-combined without any adjustments. The halo goes away moving camera lower than the object that displays a halo.&lt;br /&gt;
[[File:Hdr-2.png|thumb|Dark halo]]&lt;br /&gt;
===Missing AA===&lt;br /&gt;
The only I got to work was FXAA from driver, and that don't get shown in screenshots.&lt;br /&gt;
Also tried &amp;lt;nowiki&amp;gt;--prop:/sim/rendering/hdr/antialiasing-technique=1&amp;lt;/nowiki&amp;gt; or 2 to no avail.&lt;br /&gt;
=Missing model features=&lt;br /&gt;
===Ignores canvas background alpha===&lt;br /&gt;
Canvas background color alpha is constant at 1.0. So canvas HUDs wont work.&lt;br /&gt;
===Ignores model alpha (AC3D material)===&lt;br /&gt;
Constant at 1.0&lt;br /&gt;
===Thruster effect===&lt;br /&gt;
It don't show.&lt;br /&gt;
===Backout===&lt;br /&gt;
It does something weird.&lt;br /&gt;
=Missing world features=&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/HDR&amp;diff=137757</id>
		<title>User:Necolatis/HDR</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/HDR&amp;diff=137757"/>
		<updated>2023-06-05T11:27:55Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page I detail my experiences with playing around with PBR and [[HDR Pipeline|HDR]] in Flightgear 2020.4.0.&lt;br /&gt;
=Render quality=&lt;br /&gt;
It looks absolutely amazing when using model-pbr.eff with ORM texture.&lt;br /&gt;
[[File:Hdr-3.png|thumb|Looks great]]&lt;br /&gt;
=Bugs=&lt;br /&gt;
===Black areas===&lt;br /&gt;
This happens sometimes in HDR. Only when using model-pbr.eff, model-combined.eff don't have the issue. It goes away if I sit and wait about 1 to 2 minutes.&lt;br /&gt;
[[File:Hdr-1.png|thumb|Black areas]]&lt;br /&gt;
===Dark halo===&lt;br /&gt;
Some aircraft have a dark halo around the lower edge of the objects in HDR.&lt;br /&gt;
The effect is just stock model-combined without any adjustments. The halo goes away moving camera lower than the object that displays a halo.&lt;br /&gt;
[[File:Hdr-2.png|thumb|Dark halo]]&lt;br /&gt;
===Missing AA===&lt;br /&gt;
The only I got to work was FXAA from driver, and that don't get shown in screenshots.&lt;br /&gt;
Also tried &amp;lt;nowiki&amp;gt;--prop:/sim/rendering/hdr/antialiasing-technique=1&amp;lt;/nowiki&amp;gt; or 2 to no avail.&lt;br /&gt;
=Missing model features=&lt;br /&gt;
===Ignores canvas background alpha===&lt;br /&gt;
Canvas background color alpha is constant at 1.0. So canvas HUDs wont work.&lt;br /&gt;
===Ignores model alpha (AC3D)===&lt;br /&gt;
Constant at 1.0&lt;br /&gt;
===Thruster effect===&lt;br /&gt;
It don't show.&lt;br /&gt;
===Backout===&lt;br /&gt;
It does something weird.&lt;br /&gt;
=Missing world features=&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Hdr-3.png&amp;diff=137756</id>
		<title>File:Hdr-3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Hdr-3.png&amp;diff=137756"/>
		<updated>2023-06-05T10:52:04Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Using ORM texture&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Hdr-2.png&amp;diff=137755</id>
		<title>File:Hdr-2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Hdr-2.png&amp;diff=137755"/>
		<updated>2023-06-05T10:40:48Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Dark halo&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=File:Hdr-1.png&amp;diff=137754</id>
		<title>File:Hdr-1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=File:Hdr-1.png&amp;diff=137754"/>
		<updated>2023-06-05T10:37:03Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bug in hdr&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Canvas_Image&amp;diff=137675</id>
		<title>Canvas Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Canvas_Image&amp;diff=137675"/>
		<updated>2023-05-12T16:51:08Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: Added imageSize&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Canvas Elements]]&lt;br /&gt;
{{Template:Canvas Navigation}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= setPixel =&lt;br /&gt;
* '''Version''': FlightGear &amp;gt;= 2020.1&lt;br /&gt;
* '''Format''': setPixel(x_position, y_position, color)&lt;br /&gt;
* '''Color Format''': Can be a vector of size 3 or 4 (rgba as 0 to 1). Or a string with hexadecimal colors, for example &amp;quot;#7f3f1f&amp;quot;.&lt;br /&gt;
Will change a single pixel to a specified color in the image. End the changing by calling dirtyPixels.&lt;br /&gt;
&lt;br /&gt;
setPixel and fillRect is typically used when having to change an image alot. So to avoid using possibly hundreds of path elements on top of the image, changing the image pixel colors is more efficient.&lt;br /&gt;
&lt;br /&gt;
= dirtyPixels =&lt;br /&gt;
* '''Version''': FlightGear &amp;gt;= 2020.1&lt;br /&gt;
After operations on setPixel is done, the method dirtyPixels() must be run.&lt;br /&gt;
&lt;br /&gt;
= imageSize =&lt;br /&gt;
* '''Version''': Flightgear &amp;gt;= 2020.4&lt;br /&gt;
Returns the raw image size.&lt;br /&gt;
&lt;br /&gt;
= fillRect =&lt;br /&gt;
* '''Version''': FlightGear &amp;gt;= 2020.1&lt;br /&gt;
* '''Format''': fillRect(dimension, color)&lt;br /&gt;
* '''Dimension Format''': Can be a vector of size 4 [x_position,y_position,x_size,y_size]. The numbers is in absolute pixel coordinates, not 0 to 1.&lt;br /&gt;
* '''Color Format''': Can be a vector of size 3 or 4 (rgba as 0 to 1). Or a string with hexadecimal colors, for example &amp;quot;#7f3f1f&amp;quot;.&lt;br /&gt;
Will fill a specified rectangle inside the image with a specified color.&lt;br /&gt;
&lt;br /&gt;
= Properties =&lt;br /&gt;
&lt;br /&gt;
Additionally to the properties supported by every [[Canvas Element]], Canvas Images support the following properties:&lt;br /&gt;
&lt;br /&gt;
== src ==&lt;br /&gt;
&lt;br /&gt;
* '''Version''': FlightGear &amp;gt;= 3.1&lt;br /&gt;
* '''Format''': [&amp;lt;protocol&amp;gt;://]&amp;lt;path&amp;gt; (Supported protocols: canvas://, &amp;lt;nowiki&amp;gt;http://&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
# Use file inside default search paths&lt;br /&gt;
img.set(&amp;quot;src&amp;quot;, &amp;quot;gui/dialogs/images/exit.png&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# Show canvas with index 3&lt;br /&gt;
img.set(&amp;quot;src&amp;quot;, &amp;quot;canvas://by-index/texture[3]&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# Download and show FlightGear logo&lt;br /&gt;
img.set(&amp;quot;src&amp;quot;, &amp;quot;http://wiki.flightgear.org/skins/common/images/icons-fg-135.png&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# Show canvas available as object&lt;br /&gt;
img.set(&amp;quot;src&amp;quot;, my_canvas.getPath());&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== x/y ==&lt;br /&gt;
== size ==&lt;br /&gt;
&lt;br /&gt;
== fill ==&lt;br /&gt;
&lt;br /&gt;
* '''Format''': &amp;lt;color&amp;gt; (#rrggbb | rgb(r, g, b) | rgba(r, g, b, a))&lt;br /&gt;
where r, g, b must be in range 0 - 255 and a must be in range 0.0 - 1.0.&lt;br /&gt;
*'''Default''': #ffffff (white)&lt;br /&gt;
&lt;br /&gt;
Image background color. Each pixel is modulated with the background color. If the image shall be displayed unchanged use white as background color.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
# White with alpha of 0.5 (=half transparent)&lt;br /&gt;
img.set(&amp;quot;fill&amp;quot;, &amp;quot;rgba(255,255,255,0.5)&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# red completely opaque&lt;br /&gt;
img.set(&amp;quot;fill&amp;quot;, &amp;quot;#ff0000&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== slice ==&lt;br /&gt;
&lt;br /&gt;
* '''Format''': [&amp;lt;number&amp;gt;%?]{1,4} fill?&lt;br /&gt;
* '''Default''': (empty) (disabled)&lt;br /&gt;
&lt;br /&gt;
Image slicing (or scale-9, 9-slice) is a technique for dividing an image into nine regions. While scaling such an image the four corner regions will be shown undistorted, whereas the other regions are scaled to fit into the remaining parts. See the CSS3 [https://www.w3.org/TR/css-backgrounds-3/#the-border-image-slice border-image-slice] property for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
# Top/bottom offset 10%, left/right offset 5%, fill center&lt;br /&gt;
img.set(&amp;quot;slice&amp;quot;, &amp;quot;10% 5% fill&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# All offsets 8 pixels, only draw border and do not fill center&lt;br /&gt;
img.set(&amp;quot;slice&amp;quot;, &amp;quot;8&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# Disable slicing&lt;br /&gt;
img.set(&amp;quot;slice&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== outset ==&lt;br /&gt;
&lt;br /&gt;
* '''Format''': [&amp;lt;number&amp;gt;%?]{1,4}&lt;br /&gt;
* '''Default''': (empty) (disabled)&lt;br /&gt;
&lt;br /&gt;
Let the image extend outside its specified size. The areas extending outside the original dimensions are just drawn but not included in the bounding box, and therefore ignored for event handling and distance/margin calculations. This could be used, for example, to draw a shadow around an element which is ignored for handling events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
# Top outset 10%, left/right outset 5%, bottom outset 10 pixels&lt;br /&gt;
img.set(&amp;quot;outset&amp;quot;, &amp;quot;10% 5% 10&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# All offsets 8 pixels&lt;br /&gt;
img.set(&amp;quot;outset&amp;quot;, &amp;quot;8&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
# Disable outset&lt;br /&gt;
img.set(&amp;quot;outset&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== file (deprecated) ==&lt;br /&gt;
&lt;br /&gt;
* '''Version''': FlightGear &amp;lt;= 3.0&lt;br /&gt;
&lt;br /&gt;
Same as ''src''. Use ''src'' with FlightGear &amp;gt;= 3.1.&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Talk:Virtual_Reality&amp;diff=137057</id>
		<title>Talk:Virtual Reality</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Talk:Virtual_Reality&amp;diff=137057"/>
		<updated>2023-01-10T07:49:45Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: Question&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Nightly ==&lt;br /&gt;
Is the Windows Nightly binary compiled with osgXR? So in theory just have to start SteamVR and enable the VR setting in Flightgear?&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=FlightGear_Newsletter_December_2022&amp;diff=136752</id>
		<title>FlightGear Newsletter December 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=FlightGear_Newsletter_December_2022&amp;diff=136752"/>
		<updated>2022-12-21T13:37:43Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* In the hangar */ Added 3 updated aircraft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
NOTES TO EDITORS&lt;br /&gt;
&lt;br /&gt;
* Headings&lt;br /&gt;
  * DO NOT DELETE HEADINGS prior to final cleanup&lt;br /&gt;
  * Current headings and their order is merely a suggestion based on what have been used earlier&lt;br /&gt;
  * Changes made to headings or structure should also be copied the Newsletter template http://wiki.flightgear.org/User:Skybike/Template:This_months_newsletter/Newsletter_example&lt;br /&gt;
&lt;br /&gt;
* Final cleanup before write protecting&lt;br /&gt;
  * Remove unused headings&lt;br /&gt;
  * Remove {{Appendix}} if not used.&lt;br /&gt;
  * Update &amp;quot;Category: Changes after&amp;quot; to the FG version current at the 1st of this month&lt;br /&gt;
  * Finally remove this comment&lt;br /&gt;
  * Update [[Next Newsletter]] and [[FlightGear Newsletter]]&lt;br /&gt;
&lt;br /&gt;
* Discussion, issues and suggestions&lt;br /&gt;
  * Regarding this newsletter issue, please use the discussion page&lt;br /&gt;
  * Regarding the newsletter in general, primarily use the FlightGear Newsletter discussion page (Talk:FlightGear Newsletter)&lt;br /&gt;
  * Regarding this Newsletter template, please use FIXME&lt;br /&gt;
&lt;br /&gt;
+++   {{Newsletter-header|{{#time: F | 2022-12}}}}   +++&lt;br /&gt;
--&amp;gt;{{User:Skybike/Template:Newsletter-header-translate|2022-12}}&lt;br /&gt;
{{TOC_right|limit=2}}&lt;br /&gt;
''We would like to emphasize that the monthly newsletter cannot live without the contributions of FlightGear users and developers. Everyone with a wiki account (free to register) is welcome to contribute to the newsletter.  If you know about any FlightGear related news or projects such as for example updated scenery or aircraft, please do feel invited to add such news to the newsletter.''&lt;br /&gt;
&lt;br /&gt;
''The new Visual Editor makes editing the wiki as simple as using a Word-processor, and even easier than using the forum as you don't even need to know the syntax for a url. Just hit the 'edit' link and start.''&lt;br /&gt;
&lt;br /&gt;
== Development news ==&lt;br /&gt;
&amp;lt;!-- News about FlightGear itself.  The FlightGear mailing list and/or core developers are a good source. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- {{Disclaimer|id=final-fixed-function-release}}--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == Related Software tools and projects == --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Those not being part of FlightGear itself, like for example OpenRadar, TerreMaster or flightgear-atc.alwaysdata.net. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== In the hangar ==&lt;br /&gt;
&amp;lt;!-- News about new and upgraded aircraft and related stuff.  The official forum and other ones usually are a good source for this. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- === New aircraft === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updated aircraft ===&lt;br /&gt;
The Saab Viggen was updated to version 3.5.1 (2020.3.xx and 2020.4.0).&lt;br /&gt;
&lt;br /&gt;
The F-16 was updated to version 2.71 (2020.3.xx).&lt;br /&gt;
&lt;br /&gt;
The S-75 was updated with new guidance system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Liveries === --&amp;gt;&lt;br /&gt;
&amp;lt;!-- === Instruments === --&amp;gt;&lt;br /&gt;
&amp;lt;!-- === Aircraft reviews === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scenery corner ==&lt;br /&gt;
&amp;lt;!-- Scenery development news --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Scenery Models === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Airports === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Land cover === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Osm2city === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === New OSM2City areas === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == Interview with a contributor == --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == Suggested flights == --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Help wanted ==&lt;br /&gt;
{{Help wanted}}&lt;br /&gt;
&lt;br /&gt;
== AI == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === AI traffic === --&amp;gt;&lt;br /&gt;
The AI team makes FlightGear more realistic, colorful and lively every month. You can support the development of ''Interactive Traffic'' and contribute at the FlightGear {{forum link|title=AI|f=23}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === AI scenarios === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Community news ==&lt;br /&gt;
&amp;lt;!-- === FlightGear on YouTube === --&amp;gt;&lt;br /&gt;
&amp;lt;!-- embed video as {{#ev:youtube|VCc6PwRI1LA}}--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Forum news ===&lt;br /&gt;
&lt;br /&gt;
A new '''Logbook add-on''' has been released that automatically logs our flights to a CSV file. The add-on also includes a GUI written in Canvas, with which you can view the log, edit entries and delete them. For read more please visit the [https://forum.flightgear.org/viewtopic.php?t=41070 forum topic] or [[Logbook_Add-on|wiki]] page.&lt;br /&gt;
&lt;br /&gt;
[[File:Logbook-v.1.1.0.png|thumb|Logbook add-on - main logbook window and secondary with details of single entry, with &amp;quot;dark&amp;quot; theme]]&lt;br /&gt;
[[File:Logbook-v.1.1.0-edit-field.png|thumb|Logbook add-on - editing one of the fields with &amp;quot;Light&amp;quot; theme]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Wiki updates === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Article of the month === --&amp;gt;&lt;br /&gt;
=== FlightGear on Facebook ===&lt;br /&gt;
Since early December 2010, FlightGear has an [https://www.facebook.com/FlightGear official Facebook page].  If you have a Facebook account please feel free to join the page.&lt;br /&gt;
&lt;br /&gt;
=== FlightGear on Instagram ===&lt;br /&gt;
In January 2018 the [https://www.instagram.com/flightgear_sim/ @flightgear_sim Instagram account] was brought back to life. If you've got nice screenshots to be featured, feel free to {{forum link|text=contact the maintainer|t=33636}}.&lt;br /&gt;
&lt;br /&gt;
=== FlightGear on FlightSim.com ===&lt;br /&gt;
FlightGear has also a [https://www.flightsim.com/vbfs/forumdisplay.php?102-FlightGear sub-forum] on flightsim.com - just like the commercial flight sims. It is an opportunity to showcase what FG can do, get people curious and answer any questions they may have with regard to the software or the project.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer events ==&lt;br /&gt;
&amp;lt;!-- === Upcoming events === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Finished events === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == FlightGear events == --&amp;gt;&lt;br /&gt;
&amp;lt;!-- For example presence at FSWeekend --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == Hardware reviews == --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributing ==&lt;br /&gt;
=== Translators needed ===&lt;br /&gt;
{|&lt;br /&gt;
| [[File:en.gif]]&lt;br /&gt;
| The FlightGear Wiki still needs help for translating it into various languages. If you are interested in making the FlightGear Wiki multilingual, you can start by looking at [[Help:Translate]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:fr.gif]]&lt;br /&gt;
| Le wiki de FlightGear a toujours besoin d'aide pour être traduit en différentes langues. Si vous êtes intéressé par le rendre multilingue, commencez par lire [[:fr:Help:Traduire|Help:Traduire]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:de.gif]]&lt;br /&gt;
| Das FlightGear Wiki benötigt immer noch Hilfe bei der Übersetzung in verschiedene Sprachen. Wenn Du Interesse daran hast, das FlightGear Wiki mehrsprachig zu machen, dann fang mit dem [[:de:Help:Übersetzen|Help:Übersetzen]] an.&lt;br /&gt;
|-&lt;br /&gt;
| [[File:nl.gif]]&lt;br /&gt;
| De FlightGear Wiki kan nog steed hulp gebruiken bij het vertalen van artikelen. Als je interesse hebt om de wiki meertalig te maken, raden we je aan om een kijkje te nemen bij [[:nl:Help:Vertalen|Help:Vertalen]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:es.gif]]&lt;br /&gt;
| La wiki de FlightGear todavía necesita ayuda para traducirla a varios lenguajes. Si estás interesado en hacer la FlightGear wiki multilingüe, entonces comienza en [[:es:Help:Traducir|Help:Traducir]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:cat.gif]]&lt;br /&gt;
| La wiki de FlightGear encara necessita ajuda per traduir-la a diverses llengües. Si esteu interessat en fer la wiki de FlightGear multilingüe, llavors comenceu a [[:ca:Help:Traduir|Help:Traduir]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:pt.gif]]&lt;br /&gt;
| A wiki de FlightGear ainda necessita de ajuda para traduzi-la em vários idiomas. Se estás interessado em tornar a wiki de FlightGear multi-lingual, por favor começa em [[:pt:Help:Traduzir|Help:Traduzir]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:zh.gif]]&lt;br /&gt;
| FlightGear 百科仍然需要志愿者将其翻译为各种语言。如果你有兴趣让FlightGear百科支持更多语言, 你可以查看 [[Help:Translate]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FlightGear logos ===&lt;br /&gt;
If you want some graphic elements for your FlightGear-related site (such as a hangar or YouTube channel), please feel free to visit [[FlightGear logos]] for a repository of logos. And if you have some art skills, please don't hesitate to contribute with your own design creations.&lt;br /&gt;
&lt;br /&gt;
=== Screenshots ===&lt;br /&gt;
The FlightGear project always needs screenshots, which show features that were added since the last release. These should be of good quality, especially in content and technical image properties. It is therefore recommended to use the best viable filter settings ([[anti-aliasing]], texture sharpening, etc.). More info at [[Howto:Make nice screenshots]].&lt;br /&gt;
&lt;br /&gt;
==== Screenshot of the Month ====&lt;br /&gt;
&amp;lt;!--FlightGear's Screenshot of the Month {{#time: F | 2022-12}} 2022 is FIXME by {{usr|FIXME}}&lt;br /&gt;
ADD IMAGE --&amp;gt;&lt;br /&gt;
If you want to participate in the screenshot contest&amp;lt;!-- of {{#time: F | 2022-12 + 1month}}--&amp;gt;, you can submit your candidate to the {{forum link|title=this|f=88|t=}}. Be sure to see the first post for participation rules. For purposes of convenience and organization, at the end of the month or after 20 entries have been submitted, a new forum topic will be started containing all shots in an easy-to-view layout. The voting will then take place there.&amp;lt;!--Once the voting has finished, the best screenshot will be presented in the Newsletter edition of {{#time: F | 2022-12 + 1month}}--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Thanks for reading {{PAGENAME}}!''&lt;br /&gt;
&lt;br /&gt;
{{Appendix}}&lt;br /&gt;
&amp;lt;!--&amp;lt;small&amp;gt;&amp;lt;div style=&amp;quot;text-align: center; size: 15px&amp;quot;&amp;gt;About the [[FlightGear Newsletter]]  -  Information for [[Template:Welcome to the wiki|new Wiki users]]  -  Manual to the FlightGear Wiki [[Help:Your_first_article#Formatting_the_wiki_text|syntax]]  -  Edit the [[User:Skybike/Template:This_months_newsletter/Newsletter_example|draft]] for coming newsletters&amp;lt;/div&amp;gt;&amp;lt;/small&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Changes after 2020.3]]&amp;lt;!--Has a new version been released this month? Use previous version!--&amp;gt;&lt;br /&gt;
[[Category:FlightGear Newsletter|2022 12]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[de:FlightGear Newsletter {{#time: F Y | 2022-12 | de }}]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Changelog_2020.3&amp;diff=136314</id>
		<title>Changelog 2020.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Changelog_2020.3&amp;diff=136314"/>
		<updated>2022-11-26T13:37:46Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* 2020.3.13+ */ Scoured the mailing list for info, and found some bits.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{changelogs|prev=2020.1|next=2022.1}}&lt;br /&gt;
&lt;br /&gt;
Available in: [[Changelog_2020.3|English]], [[Pl/Changelog_2020.3|Polish]], [[Zh/2020.3|Chinese]]&lt;br /&gt;
&lt;br /&gt;
Please help us translate into other languages!&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
The FlightGear development team is delighted to announce the v2020.3 LTS release of FlightGear, the free, open-source flight simulator. This is the second Long Term Support release for FlightGear, since the project changed to offering both Long Term Support releases, and more cutting-edge Preview releases.  This release represents the culmination of two years of development effort by a worldwide group of volunteers, brought together by a shared ambition to create the most realistic flight simulator possible that is free to use, modify and distribute. FlightGear is used all over the world by desktop flight simulator enthusiasts, for research in universities and for interactive exhibits in museums.&lt;br /&gt;
&lt;br /&gt;
Major enhancements since the v2020.3 LTS include: &lt;br /&gt;
* a developer preview of the upcoming Compositor graphical rendering framework as a separate pre-built binary, &lt;br /&gt;
* enhancements to both the JSBSim and YASim flight dynamics models&lt;br /&gt;
* DDS texture caching to reduce load times&lt;br /&gt;
* faster loading and more memory efficient buildings&lt;br /&gt;
* improved aircraft carrier support&lt;br /&gt;
&lt;br /&gt;
Additionally 30 completely new aircraft have been added to the official hangar, and a further 71 have received major updates.&lt;br /&gt;
&lt;br /&gt;
{{Disclaimer|id=final-fixed-function-release}}&lt;br /&gt;
&lt;br /&gt;
Founded in 1997, FlightGear features more than 700 aircraft, a worldwide scenery database, a multiplayer environment, detailed sky modelling, a flexible and open aircraft modelling system, varied networking options, multiple display support, a powerful scripting language, and an open architecture. Best of all, being open-source, the simulator is owned by the community and everyone is encouraged to contribute.&lt;br /&gt;
&lt;br /&gt;
FlightGear - Fly Free! &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Launcher ==&lt;br /&gt;
* Addition of a welcome screen on first launch, providing helpful information to first time users.&lt;br /&gt;
* Aircraft can now be marked as Favourites, and filtered, making it easier to see find your favourite aircraft out of the hundreds available.&lt;br /&gt;
* The launcher now supports aircraft carriers, including selecting a carrier and setting a start position.&lt;br /&gt;
* {{key press|Ctrl|F}} shortcut for when you just want to Fly!&lt;br /&gt;
* Improved support for helipads and seaports, including detection of current aircraft type.&lt;br /&gt;
* Numerous bugfixes and stability improvements, in particular for the aircraft and addons tabs.&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
* To provide a developer preview, the [[Compositor]] renderer is included as part of this release.  It provides a fully XML-configurable multi-pass rendering pipeline that is compatible with ALS and includes clustered shading.&lt;br /&gt;
* Support for DDS Texture Cache, improving loading times for texture files.&lt;br /&gt;
* Star visibility is configurable based on magnitude of star and atmospheric conditions.&lt;br /&gt;
* Use of non-directional point sprites as a fallback for drivers that do not support triangles of point sprites is now supported by setting &amp;lt;code&amp;gt;/rendering/triangle-directional-lights=false&amp;lt;/code&amp;gt;.&lt;br /&gt;
* A new Tower AGL view has been added.  This is similar to Tower View, except that it keeps both the aircraft and the ground immediately below the aircraft in view, zooming and panning smoothly as the aircraft moves. Good for viewing landings.&lt;br /&gt;
* Improved airport grass textures&lt;br /&gt;
* Implemented tidal movement for littoral areas.&lt;br /&gt;
* Updated regional material definitions for California, Asia, Northern Brazil, Iceland, Jan Mayen island.&lt;br /&gt;
* Active volcanoes - Katla, Eyjafjallajokull, Surtsey.  &lt;br /&gt;
* Instanced-based random and OpenStreetMap buildings, improving performance and graphical quality significantly.&lt;br /&gt;
* Improvements to the Wingflex Shader.&lt;br /&gt;
* Users may enable/disable the pilot model from the View Options dialog.&lt;br /&gt;
&lt;br /&gt;
== JSBSim ==&lt;br /&gt;
* Added the ability to set up the starter and acceleration times of a turbine (parameters &amp;lt;code&amp;gt;&amp;lt;n1spinup&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;n2spinup&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;n1startrate&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;n2startrate&amp;gt;&amp;lt;/code&amp;gt;).&lt;br /&gt;
* The &amp;lt;code&amp;gt;&amp;lt;integrator&amp;gt;&amp;lt;/code&amp;gt; filter can now be reset to 0.0 by setting its &amp;lt;code&amp;gt;&amp;lt;trigger&amp;gt;&amp;lt;/code&amp;gt; property to a negative value.&lt;br /&gt;
* The integration scheme of the &amp;lt;code&amp;gt;&amp;lt;integrator&amp;gt;&amp;lt;/code&amp;gt; filter can now be chosen among &amp;lt;code&amp;gt;rect&amp;lt;/code&amp;gt; (Euler), &amp;lt;code&amp;gt;trap&amp;lt;/code&amp;gt; (Trapezoidal), &amp;lt;code&amp;gt;ab2&amp;lt;/code&amp;gt; (2nd order Adams-BashForth) and &amp;lt;code&amp;gt;ab3&amp;lt;/code&amp;gt; (3rd order Adams-Bashforth)&lt;br /&gt;
* The following functions can now be used in &amp;lt;code&amp;gt;&amp;lt;function&amp;gt;&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;floor&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ceil&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;fmod&amp;lt;/code&amp;gt;. Their functionalities are the same than the corresponding C/C++ functions.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;function&amp;gt;&amp;lt;/code&amp;gt; now checks the number of its arguments.&lt;br /&gt;
* New system component linear_actuator&lt;br /&gt;
* Export the fuel density to the property tree&lt;br /&gt;
* Added cyclic clipping for FCS components&lt;br /&gt;
* Added the ability to control the turbine engines spin down factor&lt;br /&gt;
* [Backward compatibility breakage] Gyros are now measuring rotation rates instead of rotational accelerations. Gyros that measure rotational accelerations do not exist in the real world.&lt;br /&gt;
* Output properties of flight control elements are no longer tied. This saves a lot of spurious warning messages and allows direct references of the same properties among several flight controls.&lt;br /&gt;
* Water vapor in the atmosphere is now managed through its mass fraction rather than its partial pressure. The former being the physical quantity that is conserved when pressure and temperature vary.&lt;br /&gt;
* Check that there are at least 3 contacts before trying to trim on ground.&lt;br /&gt;
* Added optional transmission of the simulation time for FG UDP interface&lt;br /&gt;
* The existence of the property that is used for table independent vars is now checked during execution rather than when the XML definition is parsed. This relaxes the order in which filters, table and more generally flight controls need to be declared in the XML definition files.&lt;br /&gt;
* Electric engines RPM is now exported in UDP sockets.&lt;br /&gt;
* The parameter &amp;lt;code&amp;gt;&amp;lt;ignitionn2&amp;gt;&amp;lt;/code&amp;gt; now affects N2 rather than N1. &lt;br /&gt;
* A warning is now given when max &amp;lt; min in a &amp;lt;code&amp;gt;&amp;lt;clipto&amp;gt;&amp;lt;/code&amp;gt; rather than throwing an exception&lt;br /&gt;
* Added the ability to log properties in a CSV file with the new fgfs executable argument &amp;lt;code&amp;gt;--jsbsim-output-directive-file&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== YASim ==&lt;br /&gt;
* Ground friction (stiction) changes&lt;br /&gt;
* Support for transonic flow effects.&lt;br /&gt;
* Control initial gear state directly by setting &amp;lt;code&amp;gt;/fdm/yasim/respect-external-gear-state=true&amp;lt;/code&amp;gt;, rather then YASim settings this depending on whether the aircraft is in the air or on the ground.&lt;br /&gt;
* Electric engines are now supported.&lt;br /&gt;
&lt;br /&gt;
== Weather and Environment ==&lt;br /&gt;
* Increased turbulence will be encountered near active volcanoes.&lt;br /&gt;
* Configurable METAR URL.&lt;br /&gt;
* METAR strings are decoded and displayed in a human-readable form in the weather dialog.&lt;br /&gt;
&lt;br /&gt;
== Carriers ==&lt;br /&gt;
* Two new carrier-specific starting options are supported in the launcher: &amp;lt;code&amp;gt;carrier-takeoff&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;carrier-approach&amp;lt;/code&amp;gt;.&lt;br /&gt;
* A new &amp;lt;code&amp;gt;--carrier-position&amp;lt;/code&amp;gt; command-line argument has been added.  This can be used to select the aircraft start position on an aircraft carrier.  Either a catapult (e.g. &amp;lt;code&amp;gt;cat-1&amp;lt;/code&amp;gt;), a parking position (e.g. &amp;lt;code&amp;gt;park-1&amp;lt;/code&amp;gt;), on final approach on the FLOLS (&amp;lt;code&amp;gt;flols&amp;lt;/code&amp;gt;) or abeam the carrier (&amp;lt;code&amp;gt;abeam&amp;lt;/code&amp;gt;).&lt;br /&gt;
* MPCarrier can now be detected by the GUI even if not available on startup.  To enable this feature set &amp;lt;code&amp;gt;/sim/mp-carriers/auto-attach=true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== AI ==&lt;br /&gt;
* New fgcommands &amp;lt;code&amp;gt;add-aiobject&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;remove-aiobject&amp;lt;/code&amp;gt; for adding/removing objects to the AI subsystem.&lt;br /&gt;
* New AI aircraft, including 747 Freighter, CRJ900, SR-71, Saab 340.&lt;br /&gt;
* Numerous updates to AI traffic schedules and airline liveries.&lt;br /&gt;
* Space Shuttle TAEM and approach at KEDW scenario.&lt;br /&gt;
* Accurate Britten-Norman Islander performance data, from an Islander pilot.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer ==&lt;br /&gt;
* Connection to VATSIM via swift is now available via the GUI.&lt;br /&gt;
* FGCom now supports both COM1 and COM2, as well as volume settings.&lt;br /&gt;
* The views defined by the user's aircraft (Pilot view, Helicopter view, Tower view etc) can now be used with multiplayer aircraft.  Viewing a particular multiplayer aircraft is done by clicking in the Pilot List dialogue's &amp;quot;view' column (see the &amp;quot;Multiplayer/Pilot List&amp;quot; menu).&lt;br /&gt;
* &amp;lt;code&amp;gt;--disable-hold-short&amp;lt;/code&amp;gt; option which allows the user to force a start on the runway when multiplayer is enabled.  This option should be used with caution - it can give other pilots and ATC a nasty fright to find an aircraft materialize on the runway!&lt;br /&gt;
* Support for recording multiplayer data&lt;br /&gt;
&lt;br /&gt;
== Nasal Scripting ==&lt;br /&gt;
* Configurable load order for core Nasal modules.&lt;br /&gt;
* Improvements and bug fixes to Emesary, the messaging interface.&lt;br /&gt;
* Improvements to the core libraries.&lt;br /&gt;
* Garbage collection improvements to reduce frame stuttering&lt;br /&gt;
* Re-loadable Nasal modules&lt;br /&gt;
* Canvas EFIS framework&lt;br /&gt;
* New methods in Canvas Image to set colors of pixels in the image.&lt;br /&gt;
&lt;br /&gt;
== Aircraft == &lt;br /&gt;
* FG1000 Glass Panel improvements include user-configurable VFR transponder codes, volume controls, new fascia, UI is now resizeable, support for custom SVG files (e.g. for a G500).  The FG1000 is now available on the Cessna 182T, J3 Cub, Diamond DA40.&lt;br /&gt;
* Improved glider vario instrument.&lt;br /&gt;
* New Aircraft: &lt;br /&gt;
** Airbus A320 - airliner&lt;br /&gt;
** Alisport Silent2Electro - glider with electric sustainer motor&lt;br /&gt;
** Bombardier Q400 DHC8-402 - shorthaul turboprop airliner&lt;br /&gt;
** Breguet Atlantic BR 1150 - long-range maritime patrol aircraft&lt;br /&gt;
** Cessna 140 - GA aircraft&lt;br /&gt;
** Cessna 208B Caravan - short range passenger, freighter and utility aircraft&lt;br /&gt;
** Cirrus SR22T - GA aircraft&lt;br /&gt;
** Diamond DA40 NG - GA aircraft, including FG1000 glass panel cockpit&lt;br /&gt;
** Diamond DA62 Twinstar- Twin engine GA aircraft&lt;br /&gt;
** Diamond HK36 Super Dimona - motorglider&lt;br /&gt;
** Dornier DO 28 Skyservant - Twin engine STOL utility aircraft&lt;br /&gt;
** Douglas TBD Devastator - WWII Torpedo bomber&lt;br /&gt;
** Draco Wilga - turboprop taildragger bush plane&lt;br /&gt;
** Fokker T.V - twin engine bomber&lt;br /&gt;
** Glasfluegel H201B Standard Libelle - glider&lt;br /&gt;
** Grumman F11-Tiger - carrier-based fighter&lt;br /&gt;
** Grumman HU-16A Albatross - twin engine amphibian&lt;br /&gt;
** Petliakov PE-8 (Ant-42/TB-7) - WWII bomber&lt;br /&gt;
** Piper PA28-161 Warrior II - GA aircraft&lt;br /&gt;
** Pipistrel Alpha Electro - electric training aircraft&lt;br /&gt;
** Pipistrel Taurus Electro G2.5 - glider with electric sustainer motor&lt;br /&gt;
** Rolladen Schneider LS8sc neo - standard glider with electric sustainer motor&lt;br /&gt;
** Robin DR400 Ecoflyer - GA Aircraft&lt;br /&gt;
** Scheibe Bergfalke II/55 - training glider&lt;br /&gt;
** Schempp-Hirth Arcus S - high performance glider&lt;br /&gt;
** Schleicher Ka6(CR) &amp;quot;Rhoensegler&amp;quot; - training glider&lt;br /&gt;
** SEPECAT Jaguar GR.1 - jet attack aircraft&lt;br /&gt;
** SUMPAC - Human powered airplane&lt;br /&gt;
** Supermarine Swift - jet fighter&lt;br /&gt;
** Yak 52 - training aircraft&lt;br /&gt;
* Major updates to over 70 aircraft.  Including 737-100, 737-300, 777, A-26-Invader, AR-234, ASG29, ASK13, ASK21, Aero-Commander, Aichi-D3A, B-17, B-24-Liberator, B-25, Bombardier-415, CH750STOL, CRJ700-family, Cessna-208-Caravan, Cessna Citation II, Cessna-L19, Cirrus-SR22, Concorde, DO-228, DO-335, Diamond-Da40, Diamond-Da42, Dragonfly, Embraer-ERJ-145, F-15, Fairchild-Metroliner, Falcon-50, Fokker-S-11, Fw200, H4-Hercules, Harrier-GR3, Horten-Ho-IX, Hughes-XF11, J3Cub, JA37, JAS39-Gripen, Jaguar, LS4, Lancair-235, Lionceau, Lockheed-NF104A, Lockheed-P38, ME-262, Mirage-2000, MirageIV, Northrop-xb35, PC-12, Piaggio-P166, Piper-PA-28, Potez-630, R44, Ryan-Navion, SIAI-Marchetti-SF.260, Socata-ST10, SpaceShuttle, Starship, Tecnam-P2006T, UH-1, Yak-18T, Zlin-50lx, an24b, bluebird, c182s, dhc1, f-14b, f16.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
* Updated Chinese, Dutch, French, German, Italian, Polish and Slovak translations.&lt;br /&gt;
* Map dialog displays heliports and allows configurable cursor key panning&lt;br /&gt;
* Faster Terrasync:  Download a tarball of airport information on first start and only check for updates every 24 hours rather than every simulator run.&lt;br /&gt;
* GPS fly-by mode&lt;br /&gt;
* Sentry.io integration to provide centralized crash reporting.&lt;br /&gt;
* Change screenshot filename to have date and time&lt;br /&gt;
* New thread safe particle manager -- should reduce random crashes around particles.&lt;br /&gt;
&lt;br /&gt;
=Updates since 2020.1=&lt;br /&gt;
Changes since the 2020.1 preview release include:&lt;br /&gt;
* Various launcher improvements including a Welcome screen and a keyboard shortcut ({{key press|Ctrl|F}}) to Fly!&lt;br /&gt;
* Improved regional definitions for California, Iceland and Northern Brazil and better grass textures.&lt;br /&gt;
* Implemented tidal movement for littoral areas.&lt;br /&gt;
* New AI model for the 747 Freighter, and numerous AI livery and traffic updates.&lt;br /&gt;
* Updates to the FG1000 glass panel display including configurable VFR transponder codes, volume controls, a new fascia, resizeable UI and support for custom SVG files.&lt;br /&gt;
* A hangar full of new aircraft: HU-16A-Albatross, LS8, Embraer-ERJ-145, Cessna 208B Caravan, PZL 104 wilga 2000 Draco, Scheibe Bergfalke, Taurus, f16, Dornier Do 28 Skyservant, Petliakov Pe 8 (Ant 42/DB 7), Grumman F.11 Tiger&lt;br /&gt;
* Updates to a large number of aircraft including CRJ700, Dragonfly, Mirage 2000, Jaguar GR1, H4 Hercules, JA37, Supermarine Swift, A320, Cirrus-SR22, Cessna Citation, J3Cub&lt;br /&gt;
* Updated Chinese, Dutch, French, German, Italian, Polish and Slovak translations.&lt;br /&gt;
* Faster Terrasync:  Download a tarball of airport information on first start and only check for updates every 24 hours rather than every simulator run.&lt;br /&gt;
* GPS fly-by mode&lt;br /&gt;
* Sentry.io integration to provide centralized crash reporting.&lt;br /&gt;
* New thread safe particle manager -- should reduce random crashes around particles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Updates since 2020.3.0=&lt;br /&gt;
&lt;br /&gt;
As 2020.3 is a long term supported release, there are ongoing bug-fixes and small improvements happening, based on user feedback and automatic reporting of crashes and issues. Significant fixes are listed below:&lt;br /&gt;
&lt;br /&gt;
==2020.3.1==&lt;br /&gt;
* Add help page to the launcher&lt;br /&gt;
* Fix handling of helipads at heliports&lt;br /&gt;
* Migrate installed aircraft packages, when migrating to the new stable catalog&lt;br /&gt;
* TerraSync: improve startup performance on Windows&lt;br /&gt;
&lt;br /&gt;
==2020.3.2==&lt;br /&gt;
* TerraSync waits for Models to be completely sync-ed, to avoid missing models when starting&lt;br /&gt;
* First-run screen: add a 'scroll to the bottom' hint icon&lt;br /&gt;
* Tides fixes from Erik Hofman&lt;br /&gt;
* Use nicer scrollbar for the launcher, fixes some issue with long aircraft lists&lt;br /&gt;
* Support Apt.dat v1000 comm frequencies&lt;br /&gt;
* Fix an ATC crash when repositioning&lt;br /&gt;
* Many translations fixes identified by Michael Danilov&lt;br /&gt;
* Greatly improve the Brazilian cerradio areas (near SBMQ)&lt;br /&gt;
* Russian translation updates&lt;br /&gt;
* Iceland materials fixes&lt;br /&gt;
&lt;br /&gt;
==2020.3.3==&lt;br /&gt;
* Fix accidental mouse picks while using a right-mouse-drag to look around&lt;br /&gt;
* Fix the download location we recommend in the 'setup root' dialog&lt;br /&gt;
&lt;br /&gt;
==2020.3.4==&lt;br /&gt;
* Handle more METAR strings correctly, including wind sensor failures&lt;br /&gt;
* Fix airmass velocity being applied to sub-models twice (eg, when dropping payloads in a cross-wind)&lt;br /&gt;
* Fix crash on shutdown in the properties code&lt;br /&gt;
* Spanish translation updates &lt;br /&gt;
* Disable flights to EGEL to avoid crashes in traffic code&lt;br /&gt;
&lt;br /&gt;
==2020.3.5==&lt;br /&gt;
* Change default Windows download location to %USERS%\FlightGear\Downloads, to avoid problems with Windows Defender blocking un-trusted applications from writing to Documents, which was the previous location.&lt;br /&gt;
* Fix a crash when returning to FlightGear from another application and scrolling or clicking&lt;br /&gt;
* Avoid crashing with UIUC-based aircraft such as the Wright Flyer&lt;br /&gt;
* Fix a crash on macOS when a joystick failed to open&lt;br /&gt;
* Update the macOS application icon&lt;br /&gt;
* Fix Nasal crash on reset&lt;br /&gt;
* Canvas: allow anisotropic filtering&lt;br /&gt;
* Larger, improved moon texture&lt;br /&gt;
* UFO speed goes to 11&lt;br /&gt;
* Fix taxiway markings disappearing in specific graphics settings&lt;br /&gt;
&lt;br /&gt;
==2020.3.6==&lt;br /&gt;
* Fixed crash downloading the default aircraft catalog&lt;br /&gt;
* Fix a hang starting at scenery in the ocean&lt;br /&gt;
* Fix incorrect sky &amp;amp; cockpit rendering with certain METAR values&lt;br /&gt;
* Add getting-started hints to the launcher (English only for now)&lt;br /&gt;
* Fix Shuttle AI scenarios&lt;br /&gt;
* Improvements to flight-planning mode&lt;br /&gt;
* Sun / moon scaling fixes&lt;br /&gt;
* Fix initial position of submodels&lt;br /&gt;
* macOS: warn if running with app translocation&lt;br /&gt;
* Windows: detect missing OpenGL drivers&lt;br /&gt;
* Fix UIUC FDM crashes&lt;br /&gt;
* Fix crash with invalid view numbers&lt;br /&gt;
* Catch FDM NaN errors more gracefully&lt;br /&gt;
* KAP-140 approach mode improvements&lt;br /&gt;
* Traffic+AI livery updates&lt;br /&gt;
&lt;br /&gt;
== 2020.3.7 ==&lt;br /&gt;
&lt;br /&gt;
* Enable OSM2City buildings via TerraSync for the whole planet&lt;br /&gt;
* C172 bug-fixes and updates&lt;br /&gt;
* Improved regional material definitions for Europe, California&lt;br /&gt;
* Allow chat box to be re-positioned&lt;br /&gt;
* Fix crashes related to particle systems&lt;br /&gt;
* Fix selection of time-zone around Beijing&lt;br /&gt;
* Fix display of non-Latin1 strings in Canvas displays&lt;br /&gt;
* Fix Multi-player mode runway-start logic to select hold-short position correctly&lt;br /&gt;
* macOS: fix crash on text with certain fonts&lt;br /&gt;
* Fix launcher language selection when the UI language include a script specifier (eg zh-Hans-CN)&lt;br /&gt;
* Fix aircraft-id property when loading from a hangar ( https://sourceforge.net/p/flightgear/codetickets/2502/ )&lt;br /&gt;
* Improve checks for out-of-date Intel Graphics drivers on Windows&lt;br /&gt;
&lt;br /&gt;
== 2020.3.8 ==&lt;br /&gt;
&lt;br /&gt;
* Fix behaviour of &amp;lt;code&amp;gt;&amp;lt;local&amp;gt;&amp;lt;/code&amp;gt; particle systems &lt;br /&gt;
* Fix autumn tree appearance&lt;br /&gt;
&lt;br /&gt;
== 2020.3.9 ==&lt;br /&gt;
&lt;br /&gt;
* Fix crash in Swift&lt;br /&gt;
* Corrections to MP protocol timing&lt;br /&gt;
* Correct URL to FGData&lt;br /&gt;
* Fix bug in cache reload dialog&lt;br /&gt;
* Improvements to ATC dialog to display frequencies with 3 decimal places correctly&lt;br /&gt;
* Improve material definitions for Africa, Mediterranean regions&lt;br /&gt;
* Add updated ocean and water visual effects&lt;br /&gt;
&lt;br /&gt;
== 2020.3.10 ==&lt;br /&gt;
&lt;br /&gt;
* Transponder: make standby mode work&lt;br /&gt;
* Launcher: pick up scenery and aircraft paths from the command line&lt;br /&gt;
* Launcher: store locations differently, to avoid problems when running multiple FlightGear versions and switching between them.&lt;br /&gt;
* Launcher: add 'restart on quit' option&lt;br /&gt;
* Fix NavCache errors loading ShapeFile data&lt;br /&gt;
* Fix NavCache errors when running multiple copies of FlightGear&lt;br /&gt;
&lt;br /&gt;
== 2020.3.11 ==&lt;br /&gt;
&lt;br /&gt;
* Fix a crash introduced in 2020.3.10&lt;br /&gt;
* Improve error message when no aircraft search paths are available&lt;br /&gt;
* Fix a crash with misconfigured traffic taxi routes&lt;br /&gt;
* Update AI traffic schedules&lt;br /&gt;
&lt;br /&gt;
== 2020.3.12 ==&lt;br /&gt;
&lt;br /&gt;
* Add aircraft directory name validation &lt;br /&gt;
* Add an extra step of antialiasing (8x)&lt;br /&gt;
* Add feature allowing aircraft to define custom fonts for osg::Text&lt;br /&gt;
* Add generic combined ALS procedural lights and Compositor lights&lt;br /&gt;
* Add new regional materials for Australia&lt;br /&gt;
* Fix Basic Weather producing invalid pressure altitudes&lt;br /&gt;
* Fix bug in path searching for previews&lt;br /&gt;
* Fix bug in sound system when approaching max-dist range&lt;br /&gt;
* Fix crashes after reset&lt;br /&gt;
* Fix crash when AI aircraft has invalid destination runway&lt;br /&gt;
* Fix Mapstructure error in RTE layer&lt;br /&gt;
* Fix &amp;lt;code&amp;gt;--view-offset&amp;lt;/code&amp;gt; to use the correct property&lt;br /&gt;
* HUD: make vertical gauges look the same as horizontal ones&lt;br /&gt;
* Improved Russian and Spanish translations&lt;br /&gt;
* Miscellaneous improvements to weather dialog&lt;br /&gt;
* Property browser: display values for folders in verbose mode &lt;br /&gt;
* Route manager: select correct waypoint when duplicate waypoints exist&lt;br /&gt;
* Update AI traffic schedules and add new AI models&lt;br /&gt;
&lt;br /&gt;
== 2020.3.13 ==&lt;br /&gt;
&lt;br /&gt;
* Fix for the disappearing MP pilot list&lt;br /&gt;
&lt;br /&gt;
== 2020.3.14 ==&lt;br /&gt;
&lt;br /&gt;
* Support for add-on paths&lt;br /&gt;
* Instant audio queue&lt;br /&gt;
* Support for canvas display focus change&lt;br /&gt;
&lt;br /&gt;
== 2020.3.15 ==&lt;br /&gt;
&lt;br /&gt;
* Fix radio audio morse issue.&lt;br /&gt;
&lt;br /&gt;
== 2020.3.16 ==&lt;br /&gt;
&lt;br /&gt;
* Fix audio indent issue.&lt;br /&gt;
&lt;br /&gt;
== 2020.3.17 ==&lt;br /&gt;
* Navradio: disable low-pass filter when changing selected freq or leaving GPS slave mode. When the selected frequency is changed or when leaving GPS slave mode, disable the low-pass filter applied to signal quality.&lt;br /&gt;
* Navradio: fix regression and optimize older code. Fix a little regression introduced in previous commit. Add: changing the standby frequency disabled the low-pass filter for the next call to updateReceiver(); this must happen when the selected frequency is changed but not when the standby frequency is changed.&lt;br /&gt;
* AP input: add property-path support to Inputs. Allow making the AP source indirect (via a string property), so that the actual source property can be configured or adjusted from a -set.xml, or at runtime.&lt;br /&gt;
* Replace displaying in Launcher `--on-ground=false` to `--in-air` for on final. The option`--on-ground=false` doesn't exist which can be misleading.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{Appendix}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FlightGear changelogs‎]]&lt;br /&gt;
[[pl:Changelog_2020.3]]&lt;br /&gt;
[[Zh:2020.3]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=General_Dynamics_F-16_Fighting_Falcon/info&amp;diff=134488</id>
		<title>General Dynamics F-16 Fighting Falcon/info</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=General_Dynamics_F-16_Fighting_Falcon/info&amp;diff=134488"/>
		<updated>2022-01-21T04:45:55Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{infobox aircraft&lt;br /&gt;
| name           = General Dynamics F-16 Fighting Falcon&lt;br /&gt;
| hangar         = fgaddon&lt;br /&gt;
| aircraft       = f16&lt;br /&gt;
| image          = F-16C KLSV.jpg&lt;br /&gt;
| image2         = F-16C Cockpit.png&lt;br /&gt;
| alt2           = {{LangSwitch&lt;br /&gt;
                     | en = F-16CG Cockpit view&lt;br /&gt;
                     | de = F-16CG cockpit aussicht&lt;br /&gt;
                   }}&lt;br /&gt;
| type           = Military aircraft/Attack aircraft/Fighter aircraft&lt;br /&gt;
| config         = Retractable gear aircraft&lt;br /&gt;
| propulsion     = Single-engine jet&lt;br /&gt;
| manufacturer   = General Dynamics/Lockheed&lt;br /&gt;
| authors        = Erik Hofman/Pensacola/Martin &amp;quot;Pegasus&amp;quot; Schmitt/Nikolai V. Chr./J Maverick 16/Richard Harrison/Josh Davidson/Martien Van Der P./Gary Brown/Justin Nicholson/legoboyvdlp/Timi/Enrico Castaldi&lt;br /&gt;
| fdm            = JSBSim&lt;br /&gt;
| fgname1        = f16-block-10&lt;br /&gt;
| fgname2        = f16-block-20&lt;br /&gt;
| fgname3        = f16-block-30&lt;br /&gt;
| fgname4        = f16-block-32&lt;br /&gt;
| fgname5        = f16-block-40&lt;br /&gt;
| fgname6        = f16-block-42&lt;br /&gt;
| fgname7        = f16-block-50&lt;br /&gt;
| fgname8        = f16-block-52&lt;br /&gt;
| fgname9        = f16-block-60&lt;br /&gt;
| fgname10       = f16-simplified&lt;br /&gt;
| fgname11       = YF-16&lt;br /&gt;
| status-fdm     = 5&lt;br /&gt;
| status-systems = 4&lt;br /&gt;
| status-cockpit = 4&lt;br /&gt;
| status-model   = 4&lt;br /&gt;
| ready          = airrefuel/canvas/checklist&lt;br /&gt;
| liverydbid     = 20&lt;br /&gt;
| license        = GPLv2+&lt;br /&gt;
| forumtid       = 2003&lt;br /&gt;
| manual         = https://github.com/NikolaiVChr/f16/wiki&lt;br /&gt;
| navbar         = 1&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
This is the aircraft infobox subpage of the [[General Dynamics F-16 Fighting Falcon]].&lt;br /&gt;
[[Category:Aircraft infobox documentation]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=General_Dynamics_F-16_Fighting_Falcon&amp;diff=134487</id>
		<title>General Dynamics F-16 Fighting Falcon</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=General_Dynamics_F-16_Fighting_Falcon&amp;diff=134487"/>
		<updated>2022-01-21T04:43:12Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:{{PAGENAME}}/info}}&lt;br /&gt;
The '''General Dynamics F-16 Fighting Falcon''' (nicknamed Viper by pilots) is a single-engine supersonic multirole fighter aircraft by General Dynamics, exported to many countries. Designed as an air superiority day fighter for the US Air Force, it evolved into a successful all-weather multirole aircraft.&lt;br /&gt;
The Fighting Falcon has key features including a frameless bubble canopy for better visibility, side-mounted control stick to ease control while maneuvering, a seat reclined 30 degrees to reduce the effect of g-forces on the pilot, and the first use of a relaxed static stability/fly-by-wire flight control system which helps to make it a nimble aircraft.&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
====Flight Controls====&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Ctrl|B}}&lt;br /&gt;
|Toggles speed brake&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Delete}}&lt;br /&gt;
|Toggles FBW (fly by wire) override (F-16 Simplified)&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Delete}}&lt;br /&gt;
|Toggles MPO&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Radar====&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|E}}&lt;br /&gt;
|Decreases radar range&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|R}}&lt;br /&gt;
|Increases radar range&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|R}}&lt;br /&gt;
|Toggles radar standby mode&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Y}}&lt;br /&gt;
|Toggles next target&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Tactical====&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|E}}&lt;br /&gt;
|Fires the cannon&lt;br /&gt;
|-&lt;br /&gt;
| {{Key press|Q}} &lt;br /&gt;
| Chaff/flare&lt;br /&gt;
|-&lt;br /&gt;
| {{Key press|M}} &lt;br /&gt;
| Master arm&lt;br /&gt;
|-&lt;br /&gt;
| {{Key press|W}} &lt;br /&gt;
| Cycle weapon&lt;br /&gt;
|}&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
{| class=&amp;quot;keytable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Ctrl|H}}&lt;br /&gt;
|Toggles arrester hook&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|Shift|C}}&lt;br /&gt;
|Toggles canopy&lt;br /&gt;
|-&lt;br /&gt;
| {{Key press|Q}} &lt;br /&gt;
| Reset cockpit view&lt;br /&gt;
|-&lt;br /&gt;
| {{Key press|Ctrl|Q}} &lt;br /&gt;
| View right MFD&lt;br /&gt;
|-&lt;br /&gt;
| {{Key press|Shift|W}} &lt;br /&gt;
| View left MFD and RWR&lt;br /&gt;
|-&lt;br /&gt;
|{{Key press|F}}&lt;br /&gt;
|Toggles refuel door&lt;br /&gt;
|-&lt;br /&gt;
| {{Key press|Shift|S}} &lt;br /&gt;
| Toggle smoke&lt;br /&gt;
|-&lt;br /&gt;
| {{Key press|U}} &lt;br /&gt;
| Seat up&lt;br /&gt;
|-&lt;br /&gt;
| {{Key press|Shift|U}} &lt;br /&gt;
| Seat down&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
=== Canvas HUD ===&lt;br /&gt;
[[File:Canvasready.png|left|caption|link=Howto:Aerial refueling]] The F-16 has a canvas {{wikipedia|Head-Up Display}}.&amp;lt;br clear=all&amp;gt; &amp;lt;!-- ITS AN TAG TO STOP THE TEXT FLOW AND START AGAIN UNDER THE IMAGE. OTHERWHISE THE NEXT HEADING WOULD START RIGHT OF THE PICTURE. SEE https://www.mediawiki.org/wiki/Help:Images --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Air-to-air refueling ===&lt;br /&gt;
[[File:Airrefuelingready.png|left|caption|link=Howto:Aerial refueling]]&lt;br /&gt;
The General Dynamics F-16 Fighting Falcon supports ''in-flight refueling''. You need to start a specific scenario or do that in multiplayer to get a tanker [[aircraft]]. See [[Howto:Aerial refueling]] for more information. Also look on the box at the [[{{PAGENAME}}#External link|bottom]] of the page.&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Aircraft carrier ===&lt;br /&gt;
[[File:Carrier3.jpg|left|150px|caption|link=Howto:Carrier]]&lt;br /&gt;
Although the Viper wasn't designed for maritime operations, there is the possibility to start from and land on a [[Aircraft carrier|carrier]]. You can toggle the '''arrester hook''' with {{Key press|Ctrl|H}}. There are several [[Aircraft carrier]] available. How to set it up start your aircraft there is described in '''[[Howto:Carrier]]'''. If you fly in multiplayer mode see [[Carrier over MP]]&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;!-- _________PICTURES_____________ --&amp;gt;[[File:F-16 AV029.JPG|thumb|400px|'''F-16''' taxiing to parking at [[LIPA]] after landing on rwy 05 with home livery]] [[File:F-16 RNLAF J015-demo 3.png|thumb|400px|The RNLAF J015-demo livery of the F-16]]&lt;br /&gt;
&lt;br /&gt;
== Video tutorials ==&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|iSkxDhy8-zk}}&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|uN6pddgHaog}}&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|AjTw77d_lzo}}&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|Dd1Ddqr8-A0}}&lt;br /&gt;
&lt;br /&gt;
== New to fighter aircraft ==&lt;br /&gt;
If you have never flown an aircraft like this one before (Just light planes or airliners), crashed it before landing or just are not sure, how to land a right way; there is an article ''[[A-4F Skyhawk Operations Manual]]'' by Andy Ross. Although is written for the [[Douglas A-4]] most of the information contain general stuff about fly delta wing aircraft, about stall, AoA and landing maneuver and applies to the F-16 too.&lt;br /&gt;
&lt;br /&gt;
[[File:F16-cockpit-pano.jpg|480px|thumb|center|[[Howto: Make full spherical panorama|A full spherical panorama]] of the f-16 cockpit]]&lt;br /&gt;
&lt;br /&gt;
== Development Status ==&lt;br /&gt;
{{Main article|F16/Development}}&lt;br /&gt;
&lt;br /&gt;
== External link ==&lt;br /&gt;
* [http://brenthugh.com/flightgear/Sun_Valley_Tank_Invasion1.zip Several ground bombing scenarios suitable for the F-16, involving moving and static tank formations, explodable M1 Abrams tanks, etc.]&lt;br /&gt;
* [https://github.com/NikolaiVChr/f16/wiki Flightgear F-16 Manual]&lt;br /&gt;
&lt;br /&gt;
[[Category:Military aircraft]]&lt;br /&gt;
&lt;br /&gt;
{{Lockheed}}&lt;br /&gt;
{{air-to-air refueling}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Fighter aircraft]]&lt;br /&gt;
[[de:General Dynamics F-16 Fighting Falcon]]&lt;br /&gt;
[[fr:General Dynamics F-16]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Talk:High-Level_Architecture&amp;diff=134286</id>
		<title>Talk:High-Level Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Talk:High-Level_Architecture&amp;diff=134286"/>
		<updated>2022-01-05T23:54:49Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: Another GPL 2.0 RTI&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Another GPL 2.0 RTI ====&lt;br /&gt;
If the block for this was getting the RTI done, there is another GPL RTI out there.&lt;br /&gt;
&lt;br /&gt;
https://github.com/etopzone/CERTI&lt;br /&gt;
&lt;br /&gt;
--[[User:Necolatis|Necolatis]] ([[User talk:Necolatis|talk]]) 23:54, 5 January 2022 (UTC)&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User_talk:Jsb&amp;diff=132306</id>
		<title>User talk:Jsb</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User_talk:Jsb&amp;diff=132306"/>
		<updated>2021-06-14T22:08:52Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: Re-loading multi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In Nasal runtime re-loadable modules, how do I set more than 1 nasal file to be loaded?&lt;br /&gt;
I have 3 nas files, all belong together in same namespace. And would like to load them as one. --[[User:Necolatis|Necolatis]] ([[User talk:Necolatis|talk]]) 22:08, 14 June 2021 (UTC)&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=FlightGear_Newsletter_May_2021&amp;diff=131934</id>
		<title>FlightGear Newsletter May 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=FlightGear_Newsletter_May_2021&amp;diff=131934"/>
		<updated>2021-05-17T09:08:22Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Updated aircraft */ F-16&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
NOTES TO EDITORS&lt;br /&gt;
&lt;br /&gt;
* Headings&lt;br /&gt;
  * DO NOT DELETE HEADINGS prior to final cleanup&lt;br /&gt;
  * Current headings and their order is merely a suggestion based on what have been used earlier&lt;br /&gt;
  * Changes made to headings or structure should also be copied the Newsletter template http://wiki.flightgear.org/User:Skybike/Template:This_months_newsletter/Newsletter_example&lt;br /&gt;
&lt;br /&gt;
* Final cleanup before write protecting&lt;br /&gt;
  * Remove unused headings&lt;br /&gt;
  * Remove {{Appendix}} if not used.&lt;br /&gt;
  * Update &amp;quot;Category: Changes after&amp;quot; to the FG version current at the 1st of this month&lt;br /&gt;
  * Finally remove this comment&lt;br /&gt;
  * Update [[Next Newsletter]] and [[FlightGear Newsletter]]&lt;br /&gt;
&lt;br /&gt;
* Discussion, issues and suggestions&lt;br /&gt;
  * Regarding this newsletter issue, please use the discussion page&lt;br /&gt;
  * Regarding the newsletter in general, primarily use the FlightGear Newsletter discussion page (Talk:FlightGear Newsletter)&lt;br /&gt;
  * Regarding this Newsletter template, please use FIXME&lt;br /&gt;
&lt;br /&gt;
+++   {{Newsletter-header|{{#time: F | 2021-05}}}}   +++&lt;br /&gt;
--&amp;gt;{{User:Skybike/Template:Newsletter-header-translate|2021-05}}&lt;br /&gt;
{{TOC_right|limit=2}}&lt;br /&gt;
''We would like to emphasize that the monthly newsletter cannot live without the contributions of FlightGear users and developers. Everyone with a wiki account (free to register) is welcome to contribute to the newsletter.  If you know about any FlightGear related news or projects such as for example updated scenery or aircraft, please do feel invited to add such news to the newsletter.''&lt;br /&gt;
&lt;br /&gt;
== Development news ==&lt;br /&gt;
&amp;lt;!-- News about FlightGear itself.  The FlightGear mailing list and/or core developers are a good source. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == Related Software tools and projects == --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Those not being part of FlightGear itself, like for example OpenRadar, TerreMaster or flightgear-atc.alwaysdata.net. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|FG is currently undergoing a lot of huge changes. More importantly: moving to the OpenGL core profile, WS 3.0, osm2city buildings, photoscenery and Compositor shadows&amp;amp;lights.&amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/codetickets/2560/#76c9&amp;lt;/ref&amp;gt; It is likely the non-shader code path (fixed-function pipeline) will also go away in the next twelve months (~ early/mid 2022). We tried to communicate this: 2020.3 is the last release that will work on really old hardware: 'next' and future releases will need a more modern machine with an OpenGL 4 / DX12 class GPU.&amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/codetickets/2560/#f6f6&amp;lt;/ref&amp;gt; 'next' is work-in-progress: likely 12 or 18 months before it becomes a release. In that time the minimum system requirements, performance baseline and basically everything else are going to change (and keep changing). Of course we'll try to make it work on as wide a range of hardware as possible, but right now we don't know, and it would be incorrect to speculate or promise anything. (Eg, we cannot say 'an Intel 4000 will work but an Intel 3000 won't - we have no idea!)&lt;br /&gt;
&lt;br /&gt;
If next works for someone, that is great, but if you want stability, stable FPS and comaptability with older hardware, there is an easy answer: use 2020.3. That's what we recommend for everyone who wants to fly and enjoy flying. &amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/codetickets/2560/#5802&amp;lt;/ref&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Text animations and OSG 3.6 ===&lt;br /&gt;
Fernando pushed two commits to simgear and fgdata that should hopefully fix the [[OSGText Issues|white osgText issue under OSG 3.6]]. Apparently assigning an Effect to the geode containing the osgText was enough to get it working. He thought it would conflict with OSG internal shaders, but it didn't. This might not be the case with the core profile, but has got a few tricks which should force our shaders to prevail over OSG's.&lt;br /&gt;
&lt;br /&gt;
Anyway, Fernando tested it and it looks fine to him. If someone who is more used to using osgText can report if the fix was successful and the text looks exactly the same as before, it would be greatly appreciated.&amp;lt;ref&amp;gt;https://sourceforge.net/p/flightgear/mailman/message/37282835/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is vital that people report back if this fix works for them or not, since the osgText issue has been preventing us from adopting OSG 3.6, and OSG 3.6 can be considered a prerequisite for some other core development efforts, namely [[WS30]], [[Compositor]] and [[CompositeViewer Support]] - furthermore, once we can safely require OSG 3.6, it is also much more likely that we'll get support for [[Hackathon Proposal: CompositeViewer and Canvas|Canvas Cameras]] (for features like tail cams, rear view mirrors, shuttle RMS arm etc). &lt;br /&gt;
&lt;br /&gt;
Thus, please report back via the developers mailing list and/or the issue tracker.&lt;br /&gt;
&lt;br /&gt;
== In the hangar ==&lt;br /&gt;
&amp;lt;!-- News about new and upgraded aircraft and related stuff.  The official forum and other ones usually are a good source for this. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- === New aircraft === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:H130 update.jpg|thumb|EC 130 B4 sitting on the tarmac in dawn with lights on- showing [[Compositor|compositor lights]] with [[Atmospheric light scattering|ALS]] and [[Advanced weather]]]]&lt;br /&gt;
[[File:H130 RotorWashEffect.jpg|thumb|Airbus H130 T2 hovering above a lake on Hawaii near PHNL]]&lt;br /&gt;
&lt;br /&gt;
The [[Eurocopter EC130 B4]] and [[Eurocopter EC 135]] helicopters are quite popular among helicopter fans in FlightGear. It´s main author and long term aircraft developer [[User:HHS|HHS]], whose work in models, fdm, systems and instruments is used by many other helicopter and aircraft projects, is currently working on updating them. With the [[Compositor|compositor pipeline]], it is now possible to have shadows, lights and [[Atmospheric light scattering|ALS]] all together- the aircraft needs some changes to make them work with. There will be also many other improvements. You can expect the finish results around early summer in [[FGAddon]]. Stay tuned! &lt;br /&gt;
&lt;br /&gt;
== Updated aircraft ==&lt;br /&gt;
=== Pottier P130 ===&lt;br /&gt;
The [[Pottier P130 UltraLight]] has received a new, [[JSBSim]] FDM as well as a lot of fixes and systems updates, based on the little data that is available.&lt;br /&gt;
=== Diamond HK36 ===&lt;br /&gt;
The [[Diamond HK36]] got also various fixes and additionally its interior was substantially improved, featuring now a detailed engine control quadrant and more. It also comes with another variant now, the -TC with a Rotax 912 engine.&lt;br /&gt;
=== F-16 ===&lt;br /&gt;
The [[General Dynamics F-16 Fighting Falcon]] has been updated, this is some of the changes:&lt;br /&gt;
* Helmet mounted off-bore display&lt;br /&gt;
* Forward looking Infrared (FLIR) capability in the HUD.&lt;br /&gt;
* Reworked steerpoint, markpoint, bulls-eye, threat-circles system.&lt;br /&gt;
* Link16 by Colin, including possibility to send any points over the datalink.&lt;br /&gt;
* Auto release program for chaff and flares.&lt;br /&gt;
* CCIP aiming for hydra rockets.&lt;br /&gt;
* New cannon aiming mode: STRF (strafe).&lt;br /&gt;
* Bunch of new liveries by Bat.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Liveries === --&amp;gt;&lt;br /&gt;
&amp;lt;!-- === Instruments === --&amp;gt;&lt;br /&gt;
&amp;lt;!-- === Aircraft reviews === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scenery corner ==&lt;br /&gt;
&amp;lt;!-- Scenery development news --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Scenery Models === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Airports === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Land cover === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Osm2city === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === New OSM2City areas === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == Interview with a contributor == --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == Suggested flights == --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Help wanted ==&lt;br /&gt;
{{Help wanted}}&lt;br /&gt;
&lt;br /&gt;
== AI == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === AI traffic === --&amp;gt;&lt;br /&gt;
The AI team makes FlightGear more realistic, colorful and lively every month. You can support the development of ''Interactive Traffic'' and contribute at the FlightGear {{forum link|title=AI|f=23}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === AI scenarios === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Community news ==&lt;br /&gt;
&amp;lt;!-- === FlightGear on YouTube === --&amp;gt;&lt;br /&gt;
&amp;lt;!-- embed video as {{#ev:youtube|VCc6PwRI1LA}}--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Forum news === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Wiki updates === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Article of the month === --&amp;gt;&lt;br /&gt;
=== FlightGear on Facebook ===&lt;br /&gt;
Since early December 2010, FlightGear has an [https://www.facebook.com/FlightGear official Facebook page].  If you have a Facebook account please feel free to join the page.&lt;br /&gt;
&lt;br /&gt;
=== FlightGear on Instagram ===&lt;br /&gt;
In January 2018 the [https://www.instagram.com/flightgear_sim/ @flightgear_sim Instagram account] was brought back to life. If you've got nice screenshots to be featured, feel free to {{forum link|text=contact the maintainer|t=33636}}.&lt;br /&gt;
&lt;br /&gt;
=== FlightGear on FlightSim.com ===&lt;br /&gt;
FlightGear has also a [https://www.flightsim.com/vbfs/forumdisplay.php?102-FlightGear sub-forum] on flightsim.com - just like the commercial flight sims. It is an opportunity to showcase what FG can do, get people curious and answer any questions they may have with regard to the software or the project.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer events ==&lt;br /&gt;
&amp;lt;!-- === Upcoming events === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Finished events === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == FlightGear events == --&amp;gt;&lt;br /&gt;
&amp;lt;!-- For example presence at FSWeekend --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- == Hardware reviews == --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributing ==&lt;br /&gt;
=== Translators needed ===&lt;br /&gt;
{|&lt;br /&gt;
| [[File:en.gif]]&lt;br /&gt;
| The FlightGear Wiki still needs help for translating it into various languages. If you are interested in making the FlightGear Wiki multilingual, you can start by looking at [[Help:Translate]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:fr.gif]]&lt;br /&gt;
| Le wiki de FlightGear a toujours besoin d'aide pour être traduit en différentes langues. Si vous êtes intéressé par le rendre multilingue, commencez par lire [[:fr:Help:Traduire|Help:Traduire]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:de.gif]]&lt;br /&gt;
| Das FlightGear Wiki benötigt immer noch Hilfe bei der Übersetzung in verschiedene Sprachen. Wenn Du Interesse daran hast, das FlightGear Wiki mehrsprachig zu machen, dann fang mit dem [[:de:Help:Übersetzen|Help:Übersetzen]] an.&lt;br /&gt;
|-&lt;br /&gt;
| [[File:nl.gif]]&lt;br /&gt;
| De FlightGear Wiki kan nog steed hulp gebruiken bij het vertalen van artikelen. Als je interesse hebt om de wiki meertalig te maken, raden we je aan om een kijkje te nemen bij [[:nl:Help:Vertalen|Help:Vertalen]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:es.gif]]&lt;br /&gt;
| La wiki de FlightGear todavía necesita ayuda para traducirla a varios lenguajes. Si estás interesado en hacer la FlightGear wiki multilingüe, entonces comienza en [[:es:Help:Traducir|Help:Traducir]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:cat.gif]]&lt;br /&gt;
| La wiki de FlightGear encara necessita ajuda per traduir-la a diverses llengües. Si esteu interessat en fer la wiki de FlightGear multilingüe, llavors comenceu a [[:ca:Help:Traduir|Help:Traduir]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:pt.gif]]&lt;br /&gt;
| A wiki de FlightGear ainda necessita de ajuda para traduzi-la em vários idiomas. Se estás interessado em tornar a wiki de FlightGear multi-lingual, por favor começa em [[:pt:Help:Traduzir|Help:Traduzir]].&lt;br /&gt;
|-&lt;br /&gt;
| [[File:zh.gif]]&lt;br /&gt;
| FlightGear 百科仍然需要志愿者将其翻译为各种语言。如果你有兴趣让FlightGear百科支持更多语言, 你可以查看 [[Help:Translate]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FlightGear logos ===&lt;br /&gt;
If you want some graphic elements for your FlightGear-related site (such as a hangar or YouTube channel), please feel free to visit [[FlightGear logos]] for a repository of logos. And if you have some art skills, please don't hesitate to contribute with your own design creations.&lt;br /&gt;
&lt;br /&gt;
=== Screenshots ===&lt;br /&gt;
The FlightGear project always needs screenshots, which show features that were added since the last release. These should be of good quality, especially in content and technical image properties. It is therefore recommended to use the best viable filter settings ([[anti-aliasing]], texture sharpening, etc.). More info at [[Howto:Make nice screenshots]].&lt;br /&gt;
&lt;br /&gt;
==== Screenshot of the Month ====&lt;br /&gt;
&amp;lt;!--FlightGear's Screenshot of the Month {{#time: F | 2021-05}} 2021 is FIXME by {{usr|FIXME}}&lt;br /&gt;
ADD IMAGE --&amp;gt;&lt;br /&gt;
If you want to participate in the screenshot contest&amp;lt;!-- of {{#time: F | 2021-05 + 1month}}--&amp;gt;, you can submit your candidate to the {{forum link|title=this|f=88|t=}}. Be sure to see the first post for participation rules. For purposes of convenience and organization, at the end of the month or after 20 entries have been submitted, a new forum topic will be started containing all shots in an easy-to-view layout. The voting will then take place there.&amp;lt;!--Once the voting has finished, the best screenshot will be presented in the Newsletter edition of {{#time: F | 2021-05 + 1month}}--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Thanks for reading {{PAGENAME}}!''&lt;br /&gt;
&lt;br /&gt;
{{Appendix}}&lt;br /&gt;
&amp;lt;!--&amp;lt;small&amp;gt;&amp;lt;div style=&amp;quot;text-align: center; size: 15px&amp;quot;&amp;gt;About the [[FlightGear Newsletter]]  -  Information for [[Template:Welcome to the wiki|new Wiki users]]  -  Manual to the FlightGear Wiki [[Help:Your_first_article#Formatting_the_wiki_text|syntax]]  -  Edit the [[User:Skybike/Template:This_months_newsletter/Newsletter_example|draft]] for coming newsletters&amp;lt;/div&amp;gt;&amp;lt;/small&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Changes after 2020.3]]&amp;lt;!--Has a new version been released this month? Use previous version!--&amp;gt;&lt;br /&gt;
[[Category:FlightGear Newsletter|2021 05]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[[de:FlightGear Newsletter {{#time: F Y | 2021-05 | de }}]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Howto:Configure_views_in_FlightGear&amp;diff=128165</id>
		<title>Howto:Configure views in FlightGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Howto:Configure_views_in_FlightGear&amp;diff=128165"/>
		<updated>2020-10-18T04:25:13Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Changes in 2020.3.1 to eye position */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{merge|Howto:Set view points|date=March 2016}}&lt;br /&gt;
&lt;br /&gt;
This mini-HOWTO explains how to configure views in FlightGear. Views define the position of the eye in the rendered scene and what if any object the eye is focused on or tracking. The eye is the imaginary or constructed eye that is simulated by the 3D rendering. It makes the picture on your screen represent what things would look like if you were standing or sitting at a given location.&lt;br /&gt;
&lt;br /&gt;
Formerly there were two views hard coded into FlightGear, but as this document describes, it is possible to configure any number of views with XML configuration files. Views may be configured to switch between pilot and co-pilot, tower view, or view of an observer on the ground.&lt;br /&gt;
&lt;br /&gt;
== Types of Views ==&lt;br /&gt;
There are two basic types of views:&lt;br /&gt;
&lt;br /&gt;
* '''LookFrom''' - This type requires a single coordinate position. The direction of the view is independent of any particular object. Adjusting the heading and pitch offsets moves the direction of observation around. In the default FlightGear configuration panning with the mouse will move the view around as if the observer was turning their head.&lt;br /&gt;
* '''LookAt''' - This type requires two coordinate positions. The direction of the view is always oriented toward a target and tracks the target if it moves.&lt;br /&gt;
&lt;br /&gt;
(see configuration examples below for usage of the &amp;lt;type&amp;gt; paramter)&lt;br /&gt;
&lt;br /&gt;
== Defining Positions ==&lt;br /&gt;
There are two methods to define a postion and orientation for use in configuring a view. One method is tied to a model which means the view references the position and orientation of a model (e.g. Aircraft 3D Model) and the other is an independent postion which simply means that the view references location data directly (via the FlightGear property tree):&lt;br /&gt;
&lt;br /&gt;
=== Tied to a Model ===&lt;br /&gt;
This method allows definition of the &amp;quot;eye&amp;quot;, that is where you are looking from and/or the &amp;quot;target&amp;quot; or objected being looked at based on a model position and orientation. The following illustrates defining the positon of a &amp;quot;Cockpit View&amp;quot; that is positioned and oriented according to the position and orientation of a model:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;sim&amp;gt;&lt;br /&gt;
   &amp;lt;view&amp;gt;&lt;br /&gt;
     &amp;lt;name&amp;gt;Cockpit View&amp;lt;/name&amp;gt;&lt;br /&gt;
     &amp;lt;type&amp;gt;lookfrom&amp;lt;/type&amp;gt;&lt;br /&gt;
     &amp;lt;internal type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/internal&amp;gt;&lt;br /&gt;
     &amp;lt;config&amp;gt;&lt;br /&gt;
       &amp;lt;from-model type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/from-model&amp;gt;&lt;br /&gt;
       &amp;lt;from-model-idx type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/from-model-idx&amp;gt;&lt;br /&gt;
     &amp;lt;/config&amp;gt;&lt;br /&gt;
   &amp;lt;/view&amp;gt;&lt;br /&gt;
 &amp;lt;/sim&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Syntax for the '''eye position''' is:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;from-model type=&amp;quot;bool&amp;quot;&amp;gt;true or false&amp;lt;/from-model&amp;gt;&lt;br /&gt;
    &amp;lt;from-model-idx type=&amp;quot;int&amp;quot;&amp;gt;modelnumber&amp;lt;/from-model-idx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Syntax for the target or '''at position''' used in views of type &amp;quot;lookat&amp;quot; is:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;at-model type=&amp;quot;bool&amp;quot;&amp;gt;true or false&amp;lt;/at-model&amp;gt;&lt;br /&gt;
    &amp;lt;at-model-idx type=&amp;quot;int&amp;quot;&amp;gt;modelnumber&amp;lt;/at-model-idx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that from-model or at-model must be true in order for the position and orientation data from the model to be used.&lt;br /&gt;
&lt;br /&gt;
=== Independent Position ===&lt;br /&gt;
This method allows definition of the eye, that is where you are looking from or the target (objected being looked at) based on arbitrary position and orientation data obtained from the property tree (i.e. any source). The following illustrates a Tower defined as a &amp;quot;lookat&amp;quot;, a view that can be used to track or follow a moving model:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;sim&amp;gt;&lt;br /&gt;
   &amp;lt;view&amp;gt;&lt;br /&gt;
     &amp;lt;name&amp;gt;Tower View&amp;lt;/name&amp;gt;&lt;br /&gt;
     &amp;lt;type&amp;gt;lookat&amp;lt;/type&amp;gt;&lt;br /&gt;
     &amp;lt;config&amp;gt;&lt;br /&gt;
       &amp;lt;eye-lat-deg-path&amp;gt;/sim/tower/latitude-deg&amp;lt;/eye-lat-deg-path&amp;gt;&lt;br /&gt;
       &amp;lt;eye-lon-deg-path&amp;gt;/sim/tower/longitude-deg&amp;lt;/eye-lon-deg-path&amp;gt;&lt;br /&gt;
       &amp;lt;eye-alt-ft-path&amp;gt;/sim/tower/altitude-ft&amp;lt;/eye-alt-ft-path&amp;gt;&lt;br /&gt;
       &amp;lt;eye-roll-deg-path&amp;gt;/sim/tower/roll-deg&amp;lt;/eye-roll-deg-path&amp;gt;&lt;br /&gt;
       &amp;lt;eye-pitch-deg-path&amp;gt;/sim/tower/pitch-deg&amp;lt;/eye-pitch-deg-path&amp;gt;&lt;br /&gt;
       &amp;lt;eye-heading-deg-path&amp;gt;/sim/tower/heading-deg&amp;lt;/eye-heading-deg-path&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
       &amp;lt;at-model type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/at-model&amp;gt;&lt;br /&gt;
       &amp;lt;at-model-idx type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/at-model-idx&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     &amp;lt;/config&amp;gt;&lt;br /&gt;
   &amp;lt;/view&amp;gt;&lt;br /&gt;
 &amp;lt;/sim&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the definition is constructed as a path to a numeric data item in the global property tree. If you are unfamiliar with these properties, take a look at the &amp;quot;Property Picker&amp;quot; dialog while FlightGear is running and you can see the kinds of values in use. You may define your own static values, say for a fixed location of an observer, by adding the following xml to your setup (prefrences.xml or another file):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;somepath&amp;gt;&lt;br /&gt;
  &amp;lt;ground-observer-lon-deg&amp;gt;48.6124&amp;lt;/ground-observer-lon-deg&amp;gt;&lt;br /&gt;
  &amp;lt;ground-observer-lat-deg&amp;gt;63.1243&amp;lt;/ground-observer-lat-deg&amp;gt;&lt;br /&gt;
  &amp;lt;ground-observer-alt-ft&amp;gt;123.5&amp;lt;/ground-observer-alt-ft&amp;gt;&lt;br /&gt;
 &amp;lt;/somepath&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These values can then then be referenced in your view by including their path in the definition. For example to reference the above longitude for the ground observer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sim&amp;gt;&lt;br /&gt;
  &amp;lt;view&amp;gt;&lt;br /&gt;
    &amp;lt;config&amp;gt;&lt;br /&gt;
      &amp;lt;eye-lat-deg-path&amp;gt;/somepath/ground-observer-lat-deg&amp;gt;&amp;lt;/eye-lon-deg-path&amp;gt;&lt;br /&gt;
      ..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All three longitude, latitude, and altitude must be defined to have a valid position (otherwise the missing items default to 0). You may also define orientation such as heading (the direction to look toward) and pitch (the angle up or down to be looking). In the case of a cockpit view the orientation will be that of the aircraft itself, but in the case of a &amp;quot;lookfrom&amp;quot; view like a ground observer or tower it can be an arbitrary view direction that is either static, or changing.&lt;br /&gt;
&lt;br /&gt;
Syntax for the '''eye position and orientation''' is:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;eye-lat-deg-path&amp;gt;path-to-property-value&amp;lt;/eye-lat-deg-path&amp;gt;&lt;br /&gt;
    &amp;lt;eye-lon-deg-path&amp;gt;path-to-property-value&amp;lt;/eye-lon-deg-path&amp;gt;&lt;br /&gt;
    &amp;lt;eye-alt-ft-path&amp;gt;path-to-property-value&amp;lt;/eye-alt-ft-path&amp;gt;&lt;br /&gt;
    &amp;lt;eye-roll-deg-path&amp;gt;path-to-property-value&amp;lt;/eye-roll-deg-path&amp;gt;&lt;br /&gt;
    &amp;lt;eye-pitch-deg-path&amp;gt;path-to-property-value&amp;lt;/eye-pitch-deg-path&amp;gt;&lt;br /&gt;
    &amp;lt;eye-heading-deg-path&amp;gt;path-to-property-value&amp;lt;/eye-heading-deg-path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Syntax for the target or '''at position''' used in views of type &amp;quot;lookat&amp;quot; is:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;target-lat-deg-path&amp;gt;path-to-property-value&amp;lt;/target-lat-deg-path&amp;gt;&lt;br /&gt;
    &amp;lt;target-lon-deg-path&amp;gt;path-to-property-value&amp;lt;/target-lon-deg-path&amp;gt;&lt;br /&gt;
    &amp;lt;target-alt-ft-path&amp;gt;path-to-property-value&amp;lt;/target-alt-ft-path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== View Offsets ==&lt;br /&gt;
There are two types of offsets, but only one is used in building viewer configurations. This is an offset from the eye position applied to the position defined for the eye as described in the section on '''Defining Positon'''.&lt;br /&gt;
&lt;br /&gt;
These offsets are defined in meters. Here is an example of a '''Cockpit View''' definition that includes offsets for the pilot's eye:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;sim&amp;gt;&lt;br /&gt;
  &amp;lt;view&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;Cockpit View&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;lookfrom&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;internal type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/internal&amp;gt;&lt;br /&gt;
    &amp;lt;config&amp;gt;&lt;br /&gt;
      &amp;lt;from-model type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/from-model&amp;gt;&lt;br /&gt;
      &amp;lt;from-model-idx type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/from-model-idx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;x-offset-m type=&amp;quot;double&amp;quot;&amp;gt;-0.22&amp;lt;/x-offset-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-offset-m type=&amp;quot;double&amp;quot;&amp;gt;0.30&amp;lt;/y-offset-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-offset-m type=&amp;quot;double&amp;quot;&amp;gt;-0.45&amp;lt;/z-offset-m&amp;gt;&lt;br /&gt;
    &amp;lt;/config&amp;gt;&lt;br /&gt;
  &amp;lt;/view&amp;gt;&lt;br /&gt;
 &amp;lt;/sim&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that these offsets are actually best applied differently to specific aircraft models. The size of the aircraft and the actual position of the pilot's seat make a big difference. So typically these offset entries are included per aircraft in the aircraft-set.xml files.&lt;br /&gt;
&lt;br /&gt;
In other circumstances, such as defining a Chase View, you can possibly get away with defining the x-offsets in a more global location so that they apply to all aircraft. Here is an example of a Chase View configuration that includes offsets to define the eye as being 25 meters behind the model origin:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;sim&amp;gt;&lt;br /&gt;
  &amp;lt;view&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;Chase View&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;lookat&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;config&amp;gt;&lt;br /&gt;
      &amp;lt;from-model type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/from-model&amp;gt;&lt;br /&gt;
      &amp;lt;from-model-idx type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/from-model-idx&amp;gt;&lt;br /&gt;
      &amp;lt;at-model type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/at-model&amp;gt;&lt;br /&gt;
      &amp;lt;at-model-idx type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/at-model-idx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;x-offset-m type=&amp;quot;double&amp;quot;&amp;gt;0&amp;lt;/x-offset-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-offset-m type=&amp;quot;double&amp;quot;&amp;gt;0&amp;lt;/y-offset-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-offset-m type=&amp;quot;double&amp;quot;&amp;gt;-25&amp;lt;/z-offset-m&amp;gt;&lt;br /&gt;
    &amp;lt;/config&amp;gt;&lt;br /&gt;
  &amp;lt;/view&amp;gt;&lt;br /&gt;
 &amp;lt;/sim&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the time of this writing (and this is subject to change), offsets define the change in eye position as follows:&lt;br /&gt;
&lt;br /&gt;
x-offset-m&lt;br /&gt;
    Positive values to the right of origin (view position).&lt;br /&gt;
y-offset-m&lt;br /&gt;
    Positive values move up from origin.&lt;br /&gt;
z-offset-m&lt;br /&gt;
    Positive values move back (or in) from origin.&lt;br /&gt;
&lt;br /&gt;
Generally, a higher Near Plane value will result in a better quality rendering of distant scenery and models. Currently when the aircraft is in flight the Near Plane is set at 10 meters.&lt;br /&gt;
&lt;br /&gt;
Any object (including terrain) that is closer to the eye or camera than 10 meters will not be visible. For this reason, when the eye is close to the ground, the Near Plane must be set lower. Here is an example of a Cockpit view that is configured to have only a 0.5 meter Near Plane when sitting on the ground (or below a given flight level which currently defaults to 30ft AGL altitude).&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;view&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;Cockpit View&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;lookfrom&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;internal type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/internal&amp;gt;&lt;br /&gt;
    &amp;lt;config&amp;gt;&lt;br /&gt;
      &amp;lt;from-model type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/from-model&amp;gt;&lt;br /&gt;
      &amp;lt;from-model-idx type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/from-model-idx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ground-level-nearplane-m type=&amp;quot;double&amp;quot;&amp;gt;0.5f&amp;lt;/ground-level-nearplane-m&amp;gt;&lt;br /&gt;
    &amp;lt;/config&amp;gt;&lt;br /&gt;
  &amp;lt;/view&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example Tower View however, is able to set the value to 10 meters since the tower position is 50ft AGL altitude to start with:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;view&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;Tower View&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;lookat&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;config&amp;gt;&lt;br /&gt;
      &amp;lt;eye-lat-deg-path&amp;gt;/sim/tower/latitude-deg&amp;lt;/eye-lat-deg-path&amp;gt;&lt;br /&gt;
      &amp;lt;eye-lon-deg-path&amp;gt;/sim/tower/longitude-deg&amp;lt;/eye-lon-deg-path&amp;gt;&lt;br /&gt;
      &amp;lt;eye-alt-ft-path&amp;gt;/sim/tower/altitude-ft&amp;lt;/eye-alt-ft-path&amp;gt;&lt;br /&gt;
      &amp;lt;eye-roll-deg-path&amp;gt;/sim/tower/roll-deg&amp;lt;/eye-roll-deg-path&amp;gt;&lt;br /&gt;
      &amp;lt;eye-pitch-deg-path&amp;gt;/sim/tower/pitch-deg&amp;lt;/eye-pitch-deg-path&amp;gt;&lt;br /&gt;
      &amp;lt;eye-heading-deg-path&amp;gt;/sim/tower/heading-deg&amp;lt;/eye-heading-deg-path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;at-model type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/at-model&amp;gt;&lt;br /&gt;
      &amp;lt;at-model-idx type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/at-model-idx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ground-level-nearplane-m type=&amp;quot;double&amp;quot;&amp;gt;10.0f&amp;lt;/ground-level-nearplane-m&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/config&amp;gt;&lt;br /&gt;
  &amp;lt;/view&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other examples ==&lt;br /&gt;
&lt;br /&gt;
Example 1 - The configuration of a Chase View without a rotating frutstum (the view does not tilt with the aircraft's roll and pitch) is easy. Since the aircraft model's orientation is contained in it's location definition, you must set from-model property to false so you may define your own source for position and orientation. Then define eye position properties for the appropriate values. If you leave eye-roll-deg and eye-pitch-deg out then they will be fixed at 0 degrees. Note that technically this example does rotate, but only on the heading :)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;view&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;Chase View&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;type&amp;gt;lookat&amp;lt;/type&amp;gt;&lt;br /&gt;
    &amp;lt;config&amp;gt;&lt;br /&gt;
      &amp;lt;from-model type=&amp;quot;bool&amp;quot;&amp;gt;false&amp;lt;/from-model&amp;gt;&lt;br /&gt;
      &amp;lt;from-model-idx type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/from-model-idx&amp;gt;&lt;br /&gt;
      &amp;lt;eye-lat-deg-path&amp;gt;/position/latitude-deg&amp;lt;/eye-lat-deg-path&amp;gt;&lt;br /&gt;
      &amp;lt;eye-lon-deg-path&amp;gt;/position/longitude-deg&amp;lt;/eye-lon-deg-path&amp;gt;&lt;br /&gt;
      &amp;lt;eye-alt-ft-path&amp;gt;/position/altitude-ft&amp;lt;/eye-alt-ft-path&amp;gt;&lt;br /&gt;
      &amp;lt;eye-heading-deg-path&amp;gt;/orientation/heading-deg&amp;lt;/eye-heading-deg-path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;at-model type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/at-model&amp;gt;&lt;br /&gt;
      &amp;lt;at-model-idx type=&amp;quot;int&amp;quot;&amp;gt;0&amp;lt;/at-model-idx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ground-level-nearplane-m type=&amp;quot;double&amp;quot;&amp;gt;0.5f&amp;lt;/ground-level-nearplane-m&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;x-offset-m type=&amp;quot;double&amp;quot;&amp;gt;0&amp;lt;/x-offset-m&amp;gt;&lt;br /&gt;
      &amp;lt;y-offset-m type=&amp;quot;double&amp;quot;&amp;gt;0&amp;lt;/y-offset-m&amp;gt;&lt;br /&gt;
      &amp;lt;z-offset-m type=&amp;quot;double&amp;quot;&amp;gt;-25&amp;lt;/z-offset-m&amp;gt;&lt;br /&gt;
    &amp;lt;/config&amp;gt;&lt;br /&gt;
  &amp;lt;/view&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changes in 2020.3.1 to eye position ==&lt;br /&gt;
&lt;br /&gt;
To make eye views work like in earlier Flightgear version you can add this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;eye-fixed type=&amp;quot;bool&amp;quot;&amp;gt;true&amp;lt;/eye-fixed&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
* For some basic info about defining views see [[Howto:Set view points]]&lt;br /&gt;
* To make parts of the aircraft only appear in a specific view, read the [[Howto: Objects visible according to views]]&lt;br /&gt;
[[Category:Howto|Configure views in FlightGear]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis&amp;diff=128102</id>
		<title>User:Necolatis</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis&amp;diff=128102"/>
		<updated>2020-10-16T03:12:51Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''List of Wiki pages I intend to expand:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''List of Wiki pages I intend to make:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''List of Wiki pages I made and try to keep updated:'''&lt;br /&gt;
* [[Canvas Nasal API‎]]&lt;br /&gt;
* [[Aero input and outputs‎]]&lt;br /&gt;
* [[Saab 37 Viggen]]&lt;br /&gt;
* [[Aircraft Failure System]]&lt;br /&gt;
* [[Nasal and the Property-tree]]&lt;br /&gt;
* [[Aircraft sound]]&lt;br /&gt;
* [[Crash and stress damage system]]&lt;br /&gt;
* [[Blender AC3D import and export]]&lt;br /&gt;
* [[:Category:Aerodynamic Tools]]&lt;br /&gt;
* [[Aeromatic]]&lt;br /&gt;
* [[Save properties between sessions]]&lt;br /&gt;
* [[JSBSim Logging]]&lt;br /&gt;
* [[Custom blackout system]]&lt;br /&gt;
* [[Terrain Detection]]&lt;br /&gt;
* [[Howto:Add sound effects to aircraft]]&lt;br /&gt;
* [[AI wake turbulence]]&lt;br /&gt;
* [[Effect Framework]]&lt;br /&gt;
* [[JSB to PNG]]&lt;br /&gt;
&lt;br /&gt;
[[User:Necolatis/often_used|Shortcuts]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128101</id>
		<title>User:Necolatis/often used</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128101"/>
		<updated>2020-10-16T03:12:11Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Shading and shader settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Shading and shader settings==&lt;br /&gt;
&lt;br /&gt;
[[Procedural_texturing]]&lt;br /&gt;
&lt;br /&gt;
[[ALS_technical_notes]]&lt;br /&gt;
&lt;br /&gt;
[[ALS_infrared_vision]]&lt;br /&gt;
&lt;br /&gt;
[[Effect_Framework]]&lt;br /&gt;
&lt;br /&gt;
[[Compositor]]&lt;br /&gt;
&lt;br /&gt;
[[Howto:Shader_programming_in_FlightGear]]&lt;br /&gt;
&lt;br /&gt;
[[Coordinate_systems]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128100</id>
		<title>User:Necolatis/often used</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128100"/>
		<updated>2020-10-16T03:11:23Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Shading and shader settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Shading and shader settings==&lt;br /&gt;
&lt;br /&gt;
[[Procedural_texturing]]&lt;br /&gt;
&lt;br /&gt;
[[ALS_technical_notes]]&lt;br /&gt;
&lt;br /&gt;
[[ALS_infrared_vision]]&lt;br /&gt;
&lt;br /&gt;
[[Effect_Framework]]&lt;br /&gt;
&lt;br /&gt;
[[Compositor]]&lt;br /&gt;
&lt;br /&gt;
[[Howto:Shader_programming_in_FlightGear]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128099</id>
		<title>User:Necolatis/often used</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128099"/>
		<updated>2020-10-16T03:09:50Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Shading and shader settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Shading and shader settings==&lt;br /&gt;
&lt;br /&gt;
[[Procedural_texturing]]&lt;br /&gt;
&lt;br /&gt;
[[ALS_technical_notes]]&lt;br /&gt;
&lt;br /&gt;
[[ALS_infrared_vision]]&lt;br /&gt;
&lt;br /&gt;
[[Effect_Framework]]&lt;br /&gt;
&lt;br /&gt;
[[Compositor]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128098</id>
		<title>User:Necolatis/often used</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128098"/>
		<updated>2020-10-16T03:09:22Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Shading and shader settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Shading and shader settings==&lt;br /&gt;
&lt;br /&gt;
[[Procedural_texturing]]&lt;br /&gt;
&lt;br /&gt;
[[ALS_technical_notes]]&lt;br /&gt;
&lt;br /&gt;
[[ALS_infrared_vision]]&lt;br /&gt;
&lt;br /&gt;
[[Effect_Framework]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128097</id>
		<title>User:Necolatis/often used</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128097"/>
		<updated>2020-10-16T03:08:20Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Shading and shader settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Shading and shader settings==&lt;br /&gt;
&lt;br /&gt;
[[Procedural_texturing]]&lt;br /&gt;
&lt;br /&gt;
[[ALS_technical_notes]]&lt;br /&gt;
&lt;br /&gt;
[[ALS_infrared_vision]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128096</id>
		<title>User:Necolatis/often used</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128096"/>
		<updated>2020-10-16T03:07:49Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Shading and shader settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Shading and shader settings==&lt;br /&gt;
&lt;br /&gt;
[[Procedural_texturing]]&lt;br /&gt;
&lt;br /&gt;
[[ALS_technical_notes]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128095</id>
		<title>User:Necolatis/often used</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128095"/>
		<updated>2020-10-16T03:07:42Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Shading and shader settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Shading and shader settings==&lt;br /&gt;
&lt;br /&gt;
[[Procedural_texturing]]&lt;br /&gt;
[[ALS_technical_notes]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128094</id>
		<title>User:Necolatis/often used</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=User:Necolatis/often_used&amp;diff=128094"/>
		<updated>2020-10-16T03:07:02Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: Personal Shortcut page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Shading and shader settings==&lt;br /&gt;
&lt;br /&gt;
[[Procedural_texturing]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Using_listeners_and_signals_with_Nasal&amp;diff=124938</id>
		<title>Using listeners and signals with Nasal</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Using_listeners_and_signals_with_Nasal&amp;diff=124938"/>
		<updated>2020-05-24T07:56:02Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* setlistener() */ testing indicated that this is the way it works.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Nasal Navigation}}&lt;br /&gt;
&lt;br /&gt;
== Behind the Scenes of Listeners ==&lt;br /&gt;
&lt;br /&gt;
Repeatedly calling getprop() to update a property is called polling. Doing that at frame rate (each time a frame is updated) can become pretty expensive and often isn't necessary, especially for properties that are rarely updated.&lt;br /&gt;
&lt;br /&gt;
Polling is only really recommended for properties that change per frame or really often. Otherwise, you will probably want to use listeners or less-frequent polling using a custom timer.&lt;br /&gt;
&lt;br /&gt;
For example, a listener would be quite appropriate for an on/off switch or similar, an update loop for everything that needs to be updated each frame/update (i.e. engine rpm), and if something is changing every frame anyways or is a tied property, you might as well use the update loop for several reasons: besides the fact that it might be necessary, it linearizes your data flow and moves it closer to the use of the data, it makes use of the current known efficiency of getprop(), and I would venture that it seems most familiar to you. I really wouldn't worry about listener efficiency here&lt;br /&gt;
&lt;br /&gt;
The props.Node wrappers are slower than getprop/setprop because there's more Nasal-space overhead. Intuitively, the props.Node stuff should be faster, because of the cached reference - but the getprop()/setprop() code is native C code that uses a heavily optimized algorithm to look up properties (this may change once the props bindings start using the new cppbind framework).&lt;br /&gt;
&lt;br /&gt;
There will certainly be a break-even point, depending on how often properties change - and how many properties are involved. But usually, listeners should be superior to polling at frame rate for properties that do not change per frame.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that listeners are not &amp;quot;background processes&amp;quot; at all - a listener will be triggered by the property tree once a node is accessed, which will invoke the Nasal callback. Timers and listeners are NOT background &amp;quot;processes&amp;quot;. They are just invoked by different subsystems, i.e. the property tree (listeners) or the events subsystem (timers). There are other subsystems that can also invoke Nasal handlers, such as the GUI system or the AI code. This all takes place inside the FG main loop (=main thread), not some separate background/worker thread. Which is also the reason why all the Nasal APIs are safe to be used.&lt;br /&gt;
&lt;br /&gt;
It is important to understand that a &amp;quot;listener&amp;quot; is a passive thing, i.e. a &amp;quot;list&amp;quot; (array) of optional functions that are to be invoked whenever a property is modified/written to - thus, once you modify the property, the property tree code will check the size of the &amp;quot;callback list&amp;quot; that contains callbacks that are to be notified (called) when the property is written - and then calls each callback in a foreach() loop.&lt;br /&gt;
&lt;br /&gt;
Which is to say that those performance monitor stats are not necessarily representative when it comes to Nasal callbacks invoked as timers/listeners, which also applies to C++ code using these two APIs (timers &amp;amp; listeners).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Listeners are not actively &amp;quot;listening&amp;quot; at all - there's no &amp;quot;listener watch&amp;quot; running - unlike timers, listeners are totally passive instead - it works basically like this:&lt;br /&gt;
&lt;br /&gt;
* register a listener for some property named &amp;quot;foo&amp;quot;, to call some Nasal code&lt;br /&gt;
* which just adds a callback to a property specific vector, NOTHING else.&lt;br /&gt;
* once setprop(&amp;quot;foo&amp;quot;, value) is called&lt;br /&gt;
* the property tree is updated&lt;br /&gt;
* next the property tree checks if any listeners are registered for that branch&lt;br /&gt;
* if there are listeners attached, they are all called (there's basically a vector of listeners)&lt;br /&gt;
&lt;br /&gt;
So listeners are not really &amp;quot;processes&amp;quot; at all - neither background nor foreground: Merely their *callbacks* become processes after being invoked. Otherwise, they're just a vector of Nasal callbacks - which are only ever called if the property is modified. In other words, there's basically zero cost. Listener overhead is mainly determined by the callback's payload - not by listening (which is just checking vector.size() != 0 and calling each element), unless the property is updated frequently (in terms of frame rate)&lt;br /&gt;
&lt;br /&gt;
Admittedly, having many callbacks/listeners attached, could also add up quickly.&lt;br /&gt;
&lt;br /&gt;
So for benchmarking purposes, you can just use a closure to wrap your callback and update your systime() object accordingly, you could provide a separate &amp;quot;timed_listener&amp;quot; function or just override setlistener().&lt;br /&gt;
&lt;br /&gt;
== Listeners and Signals ==&lt;br /&gt;
The important thing to keep in mind is that custom listeners are generally not about loading or running Nasal files, most of the Nasal files are loaded and executed implicitly during startup. Only the Nasal sub modules (i.e. inside their own [[$FG_ROOT]]/Nasal/ directory) are dynamically loaded using a listener). So listeners are really just a simple way to talk to the property tree:&lt;br /&gt;
'''Hey property tree, would you please be so kind to call this Nasal function whenever this property is modified?'''&lt;br /&gt;
&lt;br /&gt;
So, listeners are callback functions that are attached to property nodes. They are triggered whenever the node is written to, or, depending on the listener type, also when children are added or removed, and when children are written to. Unlike polling loops, listeners don't have the least effect on the frame rate when they aren't triggered, which makes them preferable to monitor properties that aren't written to frequently. &lt;br /&gt;
&lt;br /&gt;
To learn more about managing resources like timers and listeners, please see [[Developing and debugging Nasal code#Managing timers and listeners]].&lt;br /&gt;
&lt;br /&gt;
===setlistener() vs. _setlistener() ===&lt;br /&gt;
You are requested '''not''' to use the raw _setlistener() function, except in files in [[$FG_ROOT]]/Nasal/ when they are&lt;br /&gt;
needed immediately. Only then the raw function is required, as it doesn't rely on props.nas. Using setlistener() once props.nas is loaded allows using high-level objects to reference properties, instead of raw C-objects (called &amp;quot;ghosts&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Once [[Nasal/CppBind|cppbind]] is used to replace props.nas, _setlistener() will be deprecated because the builtin function will be effectively using the same mechanism as what the wrapper function (the current setlistener()) does right now.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;tt&amp;gt;When listeners don't work&amp;lt;/tt&amp;gt;===&lt;br /&gt;
Unfortunately, '''listeners don't work on so-called &amp;quot;tied&amp;quot; properties''' when the node value isn't set via property methods. Tied properties are a semi-deprecated API to allow C++ code to handle the value directly and control getting/setting directly, usually avoiding the property tree altogether. (You can spot such tied properties by Ctrl-clicking the &amp;quot;.&amp;quot; entry in the property browser: they are marked with a &amp;quot;T&amp;quot;.) The problem comes when the C++ value is written to outside of the property tree, which means that the property tree doesn't receive a notification, even though normal sets via the property tree would still fire the listeners. Most of the FDM properties are &amp;quot;tied&amp;quot;, and a few in other subsystems.&lt;br /&gt;
&lt;br /&gt;
Examples of properties where setlistener ''won't'' work: &lt;br /&gt;
&lt;br /&gt;
* /position/elevation-ft&lt;br /&gt;
* /ai/models/aircraft/orientation/heading-deg&lt;br /&gt;
* /instrumentation/marker-beacon/[inner|middle|outer]&lt;br /&gt;
* Any property node created as an alias&lt;br /&gt;
* Lots of others&lt;br /&gt;
&lt;br /&gt;
Before working to create a listener, always check whether a listener will work with that property node by control-clicking the &amp;quot;.&amp;quot; in property browser to put it into verbose mode, and then checking whether the property node for which you want to set up a listener is marked with a &amp;quot;T&amp;quot; or not.&lt;br /&gt;
&lt;br /&gt;
If you can't set a listener for a particular property, the alternative is to use settimer to set up a timer loop that checks the property value regularly. &lt;br /&gt;
&lt;br /&gt;
Listeners are most efficient for properties that change only occasionally.  No code is called at all during frames where the listener function is not called.  If the property value changes every frame, setting up a settimer loop with time=0 will execute every frame, just the same as setlistener would, and the settimer loop is more efficient than setting a listener. This is one reason the fact the setlistener doesn't work on certain tied and FDM properties is not a great loss.  See the section on timer loops below.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;tt&amp;gt;setlistener()&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var listener_id = setlistener(&amp;lt;property&amp;gt;, &amp;lt;function&amp;gt; [, &amp;lt;startup=0&amp;gt; [, &amp;lt;runtime=1&amp;gt;]]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;property&amp;gt;''' The first argument is a property node object (&amp;lt;tt&amp;gt;props.Node()&amp;lt;/tt&amp;gt; hash) or a property path. Because the node hash depends on the props.nas module being loaded, &amp;lt;tt&amp;gt;setlistener()&amp;lt;/tt&amp;gt; calls need to be deferred when used in an [[$FG_ROOT]]/Nasal/*.nas file, usually by calling them in a &amp;lt;tt&amp;gt;settimer(func {}, 0)&amp;lt;/tt&amp;gt; construction. To avoid that, one can use the raw &amp;lt;tt&amp;gt;_setlistener()&amp;lt;/tt&amp;gt; function directly, for which &amp;lt;tt&amp;gt;setlistener()&amp;lt;/tt&amp;gt; is a wrapper. The raw function does only accept node paths (e.g. &amp;quot;/sim/menubar/visibility&amp;quot;), but not props.Node() objects.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;function&amp;gt;''' The second argument is a function object (not a function call!). The function you pass here will be called with the target property node as its sole argument as soon as someone writes to the property.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;startup=0&amp;gt;''' The third argument is optional. If it is non-zero, then it causes the listener to be called initially (but not if runtime is 1). This is useful to let the callback function pick up the node value at startup.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;runtime=1&amp;gt;''' The fourth argument is optional, and defaults to 1. This means that the callback function will be executed whenever the property is written to, independent of the value. &lt;br /&gt;
&lt;br /&gt;
If the argument is set to 0, then the function will only get triggered if a value other than the current value is written to the node. This is important for cases where a property is written to once per frame, no matter if the value changed or not. YASim, for example, does that for /gear/gear/wow or /gear/launchbar/state.&lt;br /&gt;
So, this should be used for properties that are written to in every frame, although the written value is mostly the same. If the argument is 2, then also write access to children will get reported, as well as the creation and removal of children nodes.&lt;br /&gt;
&lt;br /&gt;
For both optional flags 0 means less calls, and 1 means more calls. The first is for startup behavior, and the second for runtime behavior.&lt;br /&gt;
&lt;br /&gt;
Here's a real-life example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
setlistener(&amp;quot;/gear/launchbar/state&amp;quot;, func {&lt;br /&gt;
    if (cmdarg().getValue() == &amp;quot;Engaged&amp;quot;)&lt;br /&gt;
        setprop(&amp;quot;/sim/messages/copilot&amp;quot;, &amp;quot;Engaged!&amp;quot;);&lt;br /&gt;
}, 1, 0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
YASim writes once per frame the string &amp;quot;Disengaged&amp;quot; to property /gear/launchbar/state. When an aircraft on deck of the aircraft carrier locks into the catapult, this changes to &amp;quot;Engaged&amp;quot;, which is then written again in every frame, until the aircraft leaves the catapult. Because the locking in is a bit difficult -- one has to target the sensitive area quite exactly --, it was desirable to get some quick feedback: a screen message that's also spoken by the Festival speech synthesis. With the args 1 and 0, this is done initially (for the unlikely case that we are locked in from the beginning), and then only when the node changes from an arbitrary value to &amp;quot;Engaged&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;setlistener()&amp;lt;/tt&amp;gt; returns a unique listener id on success, and &amp;lt;tt&amp;gt;nil&amp;lt;/tt&amp;gt; on error. The id is nothing else than a counter that is 0 for the first Nasal listener, 1 for the second etc. You need this id number to remove the listener. Most listeners are never removed, so that one doesn't assign the return value, but simply drop it.&lt;br /&gt;
&lt;br /&gt;
Listener callback functions can access up to four values via regular function arguments, the first two of which are property nodes in the form of a &amp;lt;tt&amp;gt;props.Node()&amp;lt;/tt&amp;gt; object hash. The third is a indication of the operation: 0 for changing the value, -1 for removing a child node, and +1 for adding a child. The fourth indicates whether the event occurred on the node that was listened to and is always 0 if the previous argument is not 0.&lt;br /&gt;
&lt;br /&gt;
Here is the syntax supposing you have set a callback function named ''myCallbackFunc'' via &amp;lt;tt&amp;gt;setlistener&amp;lt;/tt&amp;gt; (''setlistener(myNode, myCallbackFunc)''):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
myCallbackFunc([&amp;lt;changed_node&amp;gt; [, &amp;lt;listened_to_node&amp;gt; [, &amp;lt;operation&amp;gt; [, &amp;lt;is_child_event&amp;gt;]]]])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;tt&amp;gt;removelistener()&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var num_listeners = removelistener(&amp;lt;listener id&amp;gt;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;removelistener()&amp;lt;/tt&amp;gt; takes one argument: the unique listener id that a &amp;lt;tt&amp;gt;setlistener()&amp;lt;/tt&amp;gt; call returned. It returns the number of remaining active Nasal listeners on success, &amp;lt;tt&amp;gt;nil&amp;lt;/tt&amp;gt; on error, or -1 if a listener function applies &amp;lt;tt&amp;gt;removelistener()&amp;lt;/tt&amp;gt; to itself. The fact that a listener can remove itself, can be used to implement a one-shot listener function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var L = setlistener(&amp;quot;/some/property&amp;quot;, func {&lt;br /&gt;
    print(&amp;quot;I can only be triggered once.&amp;quot;);&lt;br /&gt;
    removelistener(L);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{FGCquote&lt;br /&gt;
|1= For those not following all the cvs logs: I've added a new function to Nasal a few days ago: removelistener(). It takes one argument -- the unique id number of a listener as returned by setlistener(): var foo = setlistener(&amp;quot;/sim/foo&amp;quot;, die); ... removelistener(foo); This can be used to remove all listeners in an &amp;lt;unload&amp;gt; part that were set by the &amp;lt;load&amp;gt; part of a scenery object: &amp;lt;load&amp;gt; listener = []; append(listener, setlistener(&amp;quot;/sim/foo&amp;quot;, die)); append(listener, setlistener(&amp;quot;/sim/bar&amp;quot;, func {}); ... &amp;lt;/load&amp;gt; &amp;lt;unload&amp;gt; foreach (l; listener) { removelistener(l) } &amp;lt;/unload&amp;gt; screen.nas stores all relevant listener ids in a hash, so that other parts can, for example, remove the mapping of pilot messages to screen and voice): removelistener(screen.listener[&amp;quot;pilot&amp;quot;]); The id is 0 for the first listener, 1 for the second etc. removelistener() returns the total number of remaining listeners, or nil on error (i.e. if there was no listener known with this id). This can be used for statistics: id = setlistener(&amp;quot;/sim/signals/quit&amp;quot;, func {}); # let's not count this one num = removelistener(id); print(&amp;quot;there were &amp;quot;, id, &amp;quot; Nasal listeners attached since fgfs was started&amp;quot;); print(&amp;quot;of which &amp;quot;, num, &amp;quot; are still active&amp;quot;); m.&lt;br /&gt;
|2= {{cite web&lt;br /&gt;
  | url    = http://sourceforge.net/p/flightgear/mailman/message/12102466/&lt;br /&gt;
  | title  = &amp;lt;nowiki&amp;gt;[Flightgear-devel] Nasal: new command &amp;quot;removelistener()&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | author = &amp;lt;nowiki&amp;gt;Melchior FRANZ&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  | date   = Mar 2nd, 2006&lt;br /&gt;
  | added   = Mar 2nd, 2006&lt;br /&gt;
  | script_version = 0.23&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Listener Examples ===&lt;br /&gt;
&lt;br /&gt;
The following example attaches an anonymous callback function to a &amp;quot;signal&amp;quot;. The function will be executed when FlightGear is closed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
setlistener(&amp;quot;/sim/signals/exit&amp;quot;, func { print(&amp;quot;bye!&amp;quot;) });&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of an anonymous function, a named function can be used as well:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var say_bye = func { print(&amp;quot;bye&amp;quot;) }&lt;br /&gt;
setlistener(&amp;quot;/sim/signals/exit&amp;quot;, say_bye);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Callback functions can, optionally, access up to four parameters which are handed over via regular function arguments. Many times none of these parameters is used at all, as in the above example.&lt;br /&gt;
&lt;br /&gt;
Most often, only the first parameter is used--which gives the node of the changed value.&lt;br /&gt;
&lt;br /&gt;
The following code attaches the monitor_course() function to a gps property, using the argument ''course'' to get the node with the changed value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var monitor_course = func(course) {&lt;br /&gt;
    print(&amp;quot;Monitored course set to &amp;quot;, course.getValue());&lt;br /&gt;
}&lt;br /&gt;
var i = setlistener(&amp;quot;instrumentation/gps/wp/leg-course-deviation-deg&amp;quot;, monitor_course);&lt;br /&gt;
&lt;br /&gt;
# here the listener is active&lt;br /&gt;
&lt;br /&gt;
removelistener(i);                    # remove that listener again&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is code that accesses two arguments--the changed node and the listened-to node (these may be different when monitoring all children of a certain node)--and also shows how to monitor changes to a node including changes to children:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var monitor_course = func(course, flightinfo) {&lt;br /&gt;
    print(&amp;quot;One way to get the course setting: &amp;quot;, flightinfo.leg-course-deviation-deg.getValue());&lt;br /&gt;
    print(&amp;quot;Another way to get the same setting &amp;quot;, course.getValue());&lt;br /&gt;
}&lt;br /&gt;
var i = setlistener(&amp;quot;instrumentation/gps/wp&amp;quot;, monitor_course, 0, 2);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function object doesn't need to be a separate, external function -- it can also be an anonymous function made directly in the &amp;lt;tt&amp;gt;setlistener()&amp;lt;/tt&amp;gt; call:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
setlistener(&amp;quot;/sim/signals/exit&amp;quot;, func { print(&amp;quot;bye&amp;quot;) });    # say &amp;quot;bye&amp;quot; on exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Beware, however, that the contents of a function defined within the &amp;lt;tt&amp;gt;setlistener&amp;lt;/tt&amp;gt; call are not evaluated until the call is actually made. If, for instance, local variables change before the setlistener call happens, the call will reflect the current value of those variables ''at the time the callback function is called'', not the value ''at the time the listener was set''. &lt;br /&gt;
&lt;br /&gt;
For example, with this loop, the function will always return the value 10--even if mynode[1], mynode[2], mynode[3] or any of the others is the one that changed. It is because the contents of the setlistener are evaluated after the loop has completed running and at that point, i=10:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var output = func(number) {&lt;br /&gt;
    print(&amp;quot;mynode&amp;quot;, number, &amp;quot; has changed!&amp;quot;); #This won't work!&lt;br /&gt;
}&lt;br /&gt;
for(i=1; i &amp;lt;= 10; i = i+1) {&lt;br /&gt;
   var i = setlistener(&amp;quot;mynode[&amp;quot;~i~&amp;quot;]&amp;quot;, func{ output (i); });&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also access the four available function properties (or just one, two, or three of them as you need) in your anonymous function. Here is an example that accesses the first value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
for(i=1; i &amp;lt;= 10; i = i+1) {&lt;br /&gt;
    var i = setlistener(&amp;quot;mynode[&amp;quot;~i~&amp;quot;]&amp;quot;, func (changedNode) { print (changedNode.getPath() ~ &amp;quot; : &amp;quot; ~ changedNode.getValue()); });&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attaching a function to a node that is specified as &amp;lt;tt&amp;gt;props.Node()&amp;lt;/tt&amp;gt; hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
var node = props.globals.getNode(&amp;quot;/sim/signals/click&amp;quot;, 1);&lt;br /&gt;
setlistener(node, func { gui.popupTip(&amp;quot;don't click here!&amp;quot;) });&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes it is desirable to call the listener function initially, so that it can pick up the node value. In the following example a listener watches the view number, and turns the HUD on in cockpit view, and off in all other views. It doesn't only do that on writing to &amp;quot;view-number&amp;quot;, but also once when the listener gets attached, thanks to the third argument &amp;quot;1&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
setlistener(&amp;quot;/sim/current-view/view-number&amp;quot;, func(n) {&lt;br /&gt;
    setprop(&amp;quot;/sim/hud/visibility[0]&amp;quot;, n.getValue() == 0);&lt;br /&gt;
}, 1);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There's no limit for listeners on a node. Several functions can get attached to one node, just as one function can get attached to several nodes. Listeners may write to the node they are listening to. This will not make the listener call itself causing an endless recursion.&lt;br /&gt;
&lt;br /&gt;
=== Signals ===&lt;br /&gt;
&lt;br /&gt;
In addition to &amp;quot;normal&amp;quot; nodes, there are &amp;quot;signal&amp;quot; nodes that were created solely for the purpose of having listeners attached:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;/sim/signals/exit&amp;lt;/tt&amp;gt; ... set to &amp;quot;true&amp;quot; on quitting FlightGear&lt;br /&gt;
* &amp;lt;tt&amp;gt;/sim/signals/reinit&amp;lt;/tt&amp;gt; ... set to &amp;quot;true&amp;quot; right before repositioning the aircraft, and to &amp;quot;false&amp;quot; when the teleport has been completed&lt;br /&gt;
* &amp;lt;tt&amp;gt;/sim/signals/click&amp;lt;/tt&amp;gt; ... set to &amp;quot;true&amp;quot; after a mouse click at the terrain. Hint that the geo coords for the click spot were updated and can be retrieved from /sim/input/click/{longitude-deg,latitude-deg,elevation-ft,elevation-m}&lt;br /&gt;
* &amp;lt;tt&amp;gt;/sim/signals/screenshot&amp;lt;/tt&amp;gt; ... set to &amp;quot;true&amp;quot; right before the screenshot is taken, and set to &amp;quot;false&amp;quot; after it. Can be used to hide and reveal dialogs etc.&lt;br /&gt;
* &amp;lt;tt&amp;gt;/sim/signals/nasal-dir-initialized&amp;lt;/tt&amp;gt; ... set to &amp;quot;true&amp;quot; after all Nasal &amp;quot;library&amp;quot; files in [[$FG_ROOT]]/Nasal/ were loaded and executed. It is only set once and can only be used to trigger listener functions that were defined in one of the Nasal files in that directory. After that signal was set Nasal starts loading and executing aircraft Nasal files, and only later are &amp;lt;tt&amp;gt;settimer()&amp;lt;/tt&amp;gt; functions called and the next signal is set:&lt;br /&gt;
* &amp;lt;tt&amp;gt;/sim/signals/fdm-initialized&amp;lt;/tt&amp;gt; ... set to &amp;quot;true&amp;quot; when then FDM has just finished its initialization&lt;br /&gt;
* &amp;lt;tt&amp;gt;/sim/signals/reinit-gui&amp;lt;/tt&amp;gt; ... set to &amp;quot;true&amp;quot; when the GUI has just been reset (e.g. via Help menu). This is used by the gui.Dialog class to reload Nasal-loaded XML dialogs.&lt;br /&gt;
* &amp;lt;tt&amp;gt;/sim/signals/frame&amp;lt;/tt&amp;gt; ... triggered at the beginning of each iteration of the main loop (a.k.a. &amp;quot;frame&amp;quot;). This is meant for debugging purposes. Normally, one would just use a settimer() with interval 0 for the same effect. The difference is that the signal is guaranteed to be raised at a defined moment, while the timer call may change when subsystems are re-ordered.&lt;br /&gt;
&lt;br /&gt;
=== Nasal code coupled to the autopilot system ===&lt;br /&gt;
{{Callback Disclaimer}}&lt;br /&gt;
&lt;br /&gt;
Some people have a need to run Nasal code at the same rate as the simulation/FDM. Currently, without modifying the source code for FlightGear, the only way to do this is to find a property updated at the right time in the simulation cycle and set a listener on it. From a code quality standpoint, this is less than ideal.&lt;br /&gt;
&lt;br /&gt;
Autopilot rules, FDM and important instruments run at fixed rate of 120Hz and are already _independant_ of frame rate (Note: this does not help those who try to implement APs manually using Nasal, since Nasal can only run at frame rate. But please do use the &amp;quot;autopilot property rule&amp;quot; system for the fast control part of the autopilot - and only do slow stuff in Nasal (such as switching between autopilot modes), which does not require a close coupling to the FDM/autopilot. The 777 is a good example showing this: dynamic part of AP is done by property rules; switching between AP modes, like &amp;quot;hold glideslope&amp;quot; =&amp;gt; &amp;quot;flare&amp;quot; is done in Nasal). &lt;br /&gt;
&lt;br /&gt;
The FDM runs 120 times per second (if so configured), but it runs all iterations for a frame one after the other, then waits until the next frame. The FDM runs at 120 hertz and with a fixed time step.&lt;br /&gt;
&lt;br /&gt;
However, we play one small trick to make that happen.  We take the time that has elapsed since the last frame, compute how many whole iterations of the&lt;br /&gt;
FDM will fit in that time slice (at 1/120th of a second per iteration.) Then we invoke the FDM that many times with a time step of 1/120th of a&lt;br /&gt;
second.  Finally we save out the remainder and add that into the next time slice.&lt;br /&gt;
&lt;br /&gt;
This can produce a small amount of temporal jitter between the graphics and the fdm if the graphics frame rates are not a diviser of 120.  In the best&lt;br /&gt;
case scenario, you've locked your graphics frame rate to 60 hz so the FDM runs exactly 2 iterations every time it is invoked and there is no temporal&lt;br /&gt;
jitter at all, ever.&lt;br /&gt;
&lt;br /&gt;
One thing to keep in mind is that handing a different size time slice to the FDM every frame (and sometimes that time slice could be 1 second or more?)&lt;br /&gt;
can lead to instabilities in the math.  So our approach is intended to avoid that potential problem.  As far as the FDM is concerned, it *is* running&lt;br /&gt;
asyncronously, at a fixed time step.  But, we are playing a little trick on the FDM (it doesn't care) in order to handle the unfortunate possibility of&lt;br /&gt;
non-fixed and highly variable frame rates on PC hardware running consumer grade operating systems.&lt;br /&gt;
&lt;br /&gt;
Some FDM stuff would like to be tied to the FDM update rate, and that's a desirable goal. What about a callback function then? The FDM subsystem would set /sim/signals/fdm-update, and you could attach a listener to that which does all the things that should interact with the FDM, such as AP, FCS, etc. The rest of Nasal would keep running with the frame rate.&lt;br /&gt;
&lt;br /&gt;
There's just one (minor) problem at the moment. There's no generic FDM update() function where one could put a sig.setDoubleValue(dt).This would have to be done in all FDMs.&lt;br /&gt;
&lt;br /&gt;
Another possibility is to extend the declarative expression logic, which is already supported by the autopilot components, to allow a Nasal expression. Then you mix the declarative components (which you're going to want for most autopilot laws) with some scripted ones.&lt;br /&gt;
Since the expression evaluation would be driven by the autopilot subsystem, it would run at whatever frame-rate that itself runs at - which is currently in lock-step with the FDM [http://forum.flightgear.org/viewtopic.php?f=46&amp;amp;t=17069&amp;amp;hilit=nasal+fdm+autopilot&amp;amp;start=15#p165596].&lt;br /&gt;
&lt;br /&gt;
There are several other options, such as 1) Run a second events system and add an additional parameter to Nasal's settimer allowing you to use this new events system. 2) Add in a signal that is fired each simulation step, probably right before the Autopilot system is run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nasal&amp;quot;&amp;gt;&lt;br /&gt;
setlistener(&amp;quot;/sim/signals/fdm-update&amp;quot;, func(n) {&lt;br /&gt;
       var dt = n.getValue();&lt;br /&gt;
       # ... and whatever needs to be done at fdm rate&lt;br /&gt;
   });&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some core developers are fairly opposed to the whole idea, i.e. want to avoid *any* Nasal in the fast simulation loop of the FDM, because Nasal execution is slow and non-deterministic because of its GC issue. Running it in the fast simulation loop is the last thing they want[http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg38172.html].&lt;br /&gt;
&lt;br /&gt;
In addition, the developer and maintainer of the AP system is planning on adding Nasal bindings to the AP code to allow runtime instantiation of ap/property rules and has a Nasal binding for that in mind[http://forum.flightgear.org/viewtopic.php?f=66&amp;amp;t=15189&amp;amp;p=149376&amp;amp;hilit=#p149376]. &lt;br /&gt;
&lt;br /&gt;
You can then use Nasal for the high level stuff, and enable/disable/switch the individual controller elements (e.g. in order to automatically switch the autopilot mode when capturing the ILS). There are some nice examples with fgdata/Git aircraft. You could look at the 777.&lt;br /&gt;
&lt;br /&gt;
The big advantage of the property rules is that they don't produce garbage that a garbage collector has to clean up. But as nothing in life comes for free (except FlightGear, of course) XML tends to be much more verbose.&lt;br /&gt;
&lt;br /&gt;
Guideline&lt;br /&gt;
* Computing properties from a well defined set of other properties once per frame: use a property rule.&lt;br /&gt;
* If there is no other way to get it done: use Nasal.&lt;br /&gt;
&lt;br /&gt;
This is also how such things are done in the real world: controllers aren't implemented in imperative programming languages these days - especially not in scripting languages. People use model-based design and connect controller elements - using graphical tools like MATLAB/Simulink. Obviously, FG is missing a graphical interface to specify the controller rules - but the idea of specifying through XML is the same and specification is straight forward.&lt;br /&gt;
&lt;br /&gt;
Creating an autopilot (or any GNC or system model, for that matter) can be done very effectively with discrete objects such as summers, gains, controllers, filters, switches, etc., much as JSBSim has done with the system components. This is a standard approach in industry, as exemplified by Mathwork's $imulink product. &lt;br /&gt;
&lt;br /&gt;
Scilab/Scicos is similar in concept. Control system topologies are often diagrammed in a way that can lead to a one-to-one correspondence between a&lt;br /&gt;
block and a control system object that can be referenced in an XML file, if the control system component library has been defined properly. This, again,&lt;br /&gt;
is the way that JSBSim has approached the solution.&lt;br /&gt;
&lt;br /&gt;
Some benefits to such an approach include better testability, more predictability, and easier interface (someday) with a GUI tool, should one&lt;br /&gt;
materialize. The downside is that XML can be verbose.&lt;br /&gt;
&lt;br /&gt;
All that being said, it is definitely possible to run Nasal in the FDM update loop, so to make up your own mind, you could try this:&lt;br /&gt;
Alternatively, as a short-term solution that does not rely on editing C++ code, you could just trigger off an internal autopilot property.&lt;br /&gt;
Which is a pretty clever workaround: trigger a boolean property for each iteration, so that the Nasal listener can pick it up, which will get invoked at FDM update rate that way.&lt;br /&gt;
&lt;br /&gt;
Perhaps we could set up a trigger that is fired by the Autopilot subsystem, immediately before the autopilot executes. However, someone more familiar with FG's code base than me can probably come up with a more elegant solution. I feel like adding a new events system and a parameter to settimer is cleaner than a signal -- and that if a signal is added, the Autopilot subsystem is probably not the place to add it.&lt;br /&gt;
&lt;br /&gt;
Also see:&lt;br /&gt;
* http://forum.flightgear.org/viewtopic.php?f=66&amp;amp;t=15189&amp;amp;p=149376&amp;amp;#p149376&lt;br /&gt;
* http://forum.flightgear.org/viewtopic.php?f=46&amp;amp;t=17069&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg38170.html&lt;br /&gt;
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg13022.html&lt;br /&gt;
* https://code.google.com/p/flightgear-bugs/issues/detail?id=421&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Changelog_2020.1&amp;diff=124933</id>
		<title>Changelog 2020.1</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Changelog_2020.1&amp;diff=124933"/>
		<updated>2020-05-23T15:09:46Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* 2020.1.2 point release */ various fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{changelogs|prev=2019.1|next=2020.2}}&lt;br /&gt;
Available in: [[Changelog_2020.1|English]], [[Zh/2020.1|Chinese]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please help us translate in other languages!&lt;br /&gt;
&lt;br /&gt;
----&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Undocumented templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FlightGear development team is delighted to announce the v2020.1 release of FlightGear, the free, open-source flight simulator. This new version contains many exciting new features, enhancements and bugfixes.  Enhancements since 2019.1 include a developer preview of the upcoming Compositor graphical rendering framework as a separate pre-built binary, better aircraft carrier support, improvements to both the JSBSim and YASim flight dynamics models, better view options, more efficient and better looking OpenStreetMap buildings and translation of the UI into Polish.  Major aircraft updates include the Boeing 777, Airbus A320, Antonov AN-24, F-16, Piper J3Cub, Saab JA37 Viggen, Piper PA28 Cherokee, Bombardier Q-400, Space Shuttle.&lt;br /&gt;
&lt;br /&gt;
Founded in 1997, FlightGear is developed by a worldwide group of volunteers, brought together by a shared ambition to create the most realistic flight simulator possible that is free to use, modify and distribute. FlightGear is used all over the world by desktop flight simulator enthusiasts, for research in universities and for interactive exhibits in museums.&lt;br /&gt;
&lt;br /&gt;
FlightGear features more than 400 aircraft, a worldwide scenery database, a multiplayer environment, detailed sky modelling, a flexible and open aircraft modelling system, varied networking options, multiple display support, a powerful scripting language, and an open architecture. Best of all, being open-source, the simulator is owned by the community and everyone is encouraged to contribute.&lt;br /&gt;
&lt;br /&gt;
FlightGear - Fly Free! &lt;br /&gt;
&lt;br /&gt;
----&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Undocumented templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Launcher ==&lt;br /&gt;
* Aircraft can now be marked as Favourites, and filtered, making it easier to see find your favourite aircraft out of the hundreds available.&lt;br /&gt;
* The launcher now supports aircraft carriers, including selecting a carrier and setting a start position.&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
* The [[Compositor]] renderer is included as part of this release.  It provides a fully XML-configurable multi-pass rendering pipeline that is compatible with ALS and includes clustered shading.&lt;br /&gt;
* A new Tower AGL view has been added.  This is similar to Tower View, except that it keeps both the aircraft and the ground immediately below the aircraft in view, zooming and panning smoothly as the aircraft moves. Good for viewing landings.&lt;br /&gt;
* Use of non-directional point sprites as a fallback for drivers that do not support triangles of point sprites is now supported by setting &amp;lt;code&amp;gt;/rendering/triangle-directional-lights=false&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Regional textures for Asia, Iceland, Jan Mayen island.&lt;br /&gt;
* Active volcanoes - Katla, Eyjafjallajokull, Surtsey.  &lt;br /&gt;
* Instanced-based random and OpenStreetMap buildings, improving performance and graphical quality significantly.&lt;br /&gt;
* Improvements to the Wingflex Shader.&lt;br /&gt;
&lt;br /&gt;
== JSBSim ==&lt;br /&gt;
* [Backward compatibility breakage] Gyros are now measuring rotation rates instead of rotational accelerations. Gyros that measure rotational accelerations do not exist in the real world.&lt;br /&gt;
* Output properties of flight control elements are no longer tied. This saves a lot of spurious warning messages and allows direct references of the same properties among several flight controls.&lt;br /&gt;
* Water vapor in the atmosphere is now managed through its mass fraction rather than its partial pressure. The former being the physical quantity that is conserved when pressure and temperature vary.&lt;br /&gt;
* Check that there are at least 3 contacts before trying to trim on ground.&lt;br /&gt;
* ECEF to ECI frame conversion has been moved from FGLocation to FGPropagate and FGInitialConditions since not all FGLocation need to manage that.&lt;br /&gt;
* Gravity computations have been moved to FGInertial because it is where all the constants to compute gravity are stored. This reduces the amount of data transmitted between FGInertial and FGAccelerations.&lt;br /&gt;
* Added optional transmission of the simulation time for FG UDP interface&lt;br /&gt;
* Code cleanup and use more C++11 idioms (override, constexpr, range-based for loop, etc.)&lt;br /&gt;
* The existence of the property that is used for table independent vars is now checked during execution rather than when the XML definition is parsed. This relaxes the order in which filters, table and more generally flight controls need to be declared in the XML definition files.&lt;br /&gt;
* Functions &amp;lt;random/&amp;gt; and &amp;lt;urandom/&amp;gt; are no longer considered constant.&lt;br /&gt;
* &amp;lt;clipto type=&amp;quot;cyclic&amp;quot;&amp;gt; now clips negatives values correctly.&lt;br /&gt;
* Fixed the artificial displacements resulting from modifications of the mass distribution while the aircraft is sitting on ground&lt;br /&gt;
* Electric engines RPM is now exported in UDP sockets.&lt;br /&gt;
* The sign of the XZ inertia has been fixed in the property inertia/ixz-slug_ft2. was just an output error, the correct XZ inertia was used internally&lt;br /&gt;
* The parameter &amp;lt;ignitionn2&amp;gt; now affects N2 rather than N1. &lt;br /&gt;
* A warning is now given when max &amp;lt; min in a &amp;lt;clipto&amp;gt; rather than throwing an exception&lt;br /&gt;
* Added the ability to log properties in a CSV file with the new fgfs executable argument --jsbsim-output-directive-file&lt;br /&gt;
* Fixed uninitialized variables in FGPiston which could randomly generate invalid floating point values that would propagate to many places in JSBSim.&lt;br /&gt;
* Fixed a segfault occuring when changing the LOD ranges with a JSBSim aircraft&lt;br /&gt;
&lt;br /&gt;
== YASim ==&lt;br /&gt;
* Support for transonic flow effects.&lt;br /&gt;
* Control initial gear state directly by setting &amp;lt;code&amp;gt;/fdm/yasim/respect-external-gear-state=true&amp;lt;/code&amp;gt;, rather then YASim settings this depending on whether the aircraft is in the air or on the ground.&lt;br /&gt;
* Electric engines are now supported.&lt;br /&gt;
&lt;br /&gt;
== Carriers ==&lt;br /&gt;
* Two new standard state overlays are supported in the launcher: &amp;lt;code&amp;gt;carrier-takeoff&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;carrier-approach&amp;lt;/code&amp;gt;.&lt;br /&gt;
* A new &amp;lt;code&amp;gt;--carrier-position&amp;lt;/code&amp;gt; command-line argument has been added.  This can be used to select the aircraft start position on an aircraft carrier.  Either a catapult (e.g. &amp;lt;code&amp;gt;cat-1&amp;lt;/code&amp;gt;), a parking position (e.g. &amp;lt;code&amp;gt;park-1&amp;lt;/code&amp;gt;), on final approach on the FLOLS (&amp;lt;code&amp;gt;flols&amp;lt;/code&amp;gt;) or abeam the carrier (&amp;lt;code&amp;gt;abeam&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== AI ==&lt;br /&gt;
* New AI models for the CRJ900, SR-71, Saab 340.&lt;br /&gt;
* Updated AI models for the A-4, KA6-D, ERJ-195, CRJ-700, CRJ-200.&lt;br /&gt;
* Updated AI traffic for Aeormar Mexico, AirDolomiti, Air Tahiti, American Eagle, China Southern, Delta Connection, Horizon Air, IcelandAir, JetBlue, LoganAir, LOT, Lufthansa, Lufthansa CityLine, MNG (Cargo), SkyUp, United Parcel Service, Ural Airlines, Uzbekistan Airways, Westjet Regional.&lt;br /&gt;
* Updated AI liveries for Aeormar Mexico, Airbus, Air Canada, Air Europa, Air Tahiti, American Airlines, American Eagle, Alaska, Belavia, China Southern, Gulf Air, Hop!, Icelandair, JetBlue, LoganAir, LOT, Rusline, SkyUp, South African Express, United Express, Ural Airlines,  Uzbekistan Airways, Virgin Australia, Westjet, &lt;br /&gt;
* Space Shuttle TAEM and approach at KEDW scenario.&lt;br /&gt;
* Accurate Britten-Norman Islander performance data, from an Islander pilot.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer ==&lt;br /&gt;
* FGComm now supports both COM1 and COM2, as well as volume settings.&lt;br /&gt;
* The views defined by the user's aircraft (Pilot view, Helicopter view, Tower view etc) can now be used with multiplayer aircraft.  Viewing a particular multiplayer aircraft is done by clicking in the Pilot List dialogue's &amp;quot;view' column (see the &amp;quot;Multiplayer/Pilot List&amp;quot; menu).&lt;br /&gt;
* Connection to VATSIM via swift is now available via the GUI.&lt;br /&gt;
* &amp;lt;code&amp;gt;--disable-hold-short&amp;lt;/code&amp;gt; option which allows the user to force a start on the runway when multiplayer is enabled.  This option should be used with caution - it can give other pilots and ATC a nasty fright to find an aircraft materialize on the runway!&lt;br /&gt;
* MPCarrier can now be detected by the GUI even if not available on startup.  To enable this feature set &amp;lt;code&amp;gt;/sim/mp-carriers/auto-attach=true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Nasal Scripting ==&lt;br /&gt;
* Garbage collection improvements to reduce frame stuttering&lt;br /&gt;
* Re-loadable nasal modules&lt;br /&gt;
* Canvas EFIS framework&lt;br /&gt;
&lt;br /&gt;
== Canvas ==&lt;br /&gt;
* Three new methods in [[Canvas Image]] to set colors of pixels in the image.&lt;br /&gt;
&lt;br /&gt;
== Aircraft == &lt;br /&gt;
* Boeing 777&lt;br /&gt;
* Douglas A-26-Invader&lt;br /&gt;
* Airbus A320&lt;br /&gt;
* Antonov AN-24&lt;br /&gt;
* Diamond DA40 NG G1000&lt;br /&gt;
* Robin DR400 Ecoflyer&lt;br /&gt;
* General Dynamics F-16&lt;br /&gt;
* Piper J3 Cub&lt;br /&gt;
* Saab JA37 Viggen&lt;br /&gt;
* Piper PA 28 Cherokee&lt;br /&gt;
* Bombardier Q400&lt;br /&gt;
* Ryan Navion&lt;br /&gt;
* Space Shuttle&lt;br /&gt;
* Cirrus SR22&lt;br /&gt;
* Yak 52&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
* Increased turbulence will be encountered near active volcanoes.&lt;br /&gt;
* Configurable METAR URL.&lt;br /&gt;
* METAR strings are decoded and displayed in a human-readable form in the weather dialog.&lt;br /&gt;
* Polish translations of the UI are now available.&lt;br /&gt;
* Improved Chinese translations for the launcher.&lt;br /&gt;
* Improve glider vario instrument.&lt;br /&gt;
&lt;br /&gt;
== 2020.1.2 point release ==&lt;br /&gt;
* Adjust RelWithDebInfo optimisation for Clang (This should give a bit of speed boost to macOS official builds.)&lt;br /&gt;
* Enable old-style texture compression&lt;br /&gt;
* Launcher: basic Compositor support&lt;br /&gt;
* + various fixes&lt;br /&gt;
&lt;br /&gt;
[[Category:FlightGear changelogs‎]]&lt;br /&gt;
[[Zh:2020.1]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Changelog_2020.1&amp;diff=124932</id>
		<title>Changelog 2020.1</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Changelog_2020.1&amp;diff=124932"/>
		<updated>2020-05-23T12:22:27Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* Miscellaneous */ 2020.1.2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{changelogs|prev=2019.1|next=2020.2}}&lt;br /&gt;
Available in: [[Changelog_2020.1|English]], [[Zh/2020.1|Chinese]].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please help us translate in other languages!&lt;br /&gt;
&lt;br /&gt;
----&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Undocumented templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FlightGear development team is delighted to announce the v2020.1 release of FlightGear, the free, open-source flight simulator. This new version contains many exciting new features, enhancements and bugfixes.  Enhancements since 2019.1 include a developer preview of the upcoming Compositor graphical rendering framework as a separate pre-built binary, better aircraft carrier support, improvements to both the JSBSim and YASim flight dynamics models, better view options, more efficient and better looking OpenStreetMap buildings and translation of the UI into Polish.  Major aircraft updates include the Boeing 777, Airbus A320, Antonov AN-24, F-16, Piper J3Cub, Saab JA37 Viggen, Piper PA28 Cherokee, Bombardier Q-400, Space Shuttle.&lt;br /&gt;
&lt;br /&gt;
Founded in 1997, FlightGear is developed by a worldwide group of volunteers, brought together by a shared ambition to create the most realistic flight simulator possible that is free to use, modify and distribute. FlightGear is used all over the world by desktop flight simulator enthusiasts, for research in universities and for interactive exhibits in museums.&lt;br /&gt;
&lt;br /&gt;
FlightGear features more than 400 aircraft, a worldwide scenery database, a multiplayer environment, detailed sky modelling, a flexible and open aircraft modelling system, varied networking options, multiple display support, a powerful scripting language, and an open architecture. Best of all, being open-source, the simulator is owned by the community and everyone is encouraged to contribute.&lt;br /&gt;
&lt;br /&gt;
FlightGear - Fly Free! &lt;br /&gt;
&lt;br /&gt;
----&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Undocumented templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Launcher ==&lt;br /&gt;
* Aircraft can now be marked as Favourites, and filtered, making it easier to see find your favourite aircraft out of the hundreds available.&lt;br /&gt;
* The launcher now supports aircraft carriers, including selecting a carrier and setting a start position.&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
* The [[Compositor]] renderer is included as part of this release.  It provides a fully XML-configurable multi-pass rendering pipeline that is compatible with ALS and includes clustered shading.&lt;br /&gt;
* A new Tower AGL view has been added.  This is similar to Tower View, except that it keeps both the aircraft and the ground immediately below the aircraft in view, zooming and panning smoothly as the aircraft moves. Good for viewing landings.&lt;br /&gt;
* Use of non-directional point sprites as a fallback for drivers that do not support triangles of point sprites is now supported by setting &amp;lt;code&amp;gt;/rendering/triangle-directional-lights=false&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Regional textures for Asia, Iceland, Jan Mayen island.&lt;br /&gt;
* Active volcanoes - Katla, Eyjafjallajokull, Surtsey.  &lt;br /&gt;
* Instanced-based random and OpenStreetMap buildings, improving performance and graphical quality significantly.&lt;br /&gt;
* Improvements to the Wingflex Shader.&lt;br /&gt;
&lt;br /&gt;
== JSBSim ==&lt;br /&gt;
* [Backward compatibility breakage] Gyros are now measuring rotation rates instead of rotational accelerations. Gyros that measure rotational accelerations do not exist in the real world.&lt;br /&gt;
* Output properties of flight control elements are no longer tied. This saves a lot of spurious warning messages and allows direct references of the same properties among several flight controls.&lt;br /&gt;
* Water vapor in the atmosphere is now managed through its mass fraction rather than its partial pressure. The former being the physical quantity that is conserved when pressure and temperature vary.&lt;br /&gt;
* Check that there are at least 3 contacts before trying to trim on ground.&lt;br /&gt;
* ECEF to ECI frame conversion has been moved from FGLocation to FGPropagate and FGInitialConditions since not all FGLocation need to manage that.&lt;br /&gt;
* Gravity computations have been moved to FGInertial because it is where all the constants to compute gravity are stored. This reduces the amount of data transmitted between FGInertial and FGAccelerations.&lt;br /&gt;
* Added optional transmission of the simulation time for FG UDP interface&lt;br /&gt;
* Code cleanup and use more C++11 idioms (override, constexpr, range-based for loop, etc.)&lt;br /&gt;
* The existence of the property that is used for table independent vars is now checked during execution rather than when the XML definition is parsed. This relaxes the order in which filters, table and more generally flight controls need to be declared in the XML definition files.&lt;br /&gt;
* Functions &amp;lt;random/&amp;gt; and &amp;lt;urandom/&amp;gt; are no longer considered constant.&lt;br /&gt;
* &amp;lt;clipto type=&amp;quot;cyclic&amp;quot;&amp;gt; now clips negatives values correctly.&lt;br /&gt;
* Fixed the artificial displacements resulting from modifications of the mass distribution while the aircraft is sitting on ground&lt;br /&gt;
* Electric engines RPM is now exported in UDP sockets.&lt;br /&gt;
* The sign of the XZ inertia has been fixed in the property inertia/ixz-slug_ft2. was just an output error, the correct XZ inertia was used internally&lt;br /&gt;
* The parameter &amp;lt;ignitionn2&amp;gt; now affects N2 rather than N1. &lt;br /&gt;
* A warning is now given when max &amp;lt; min in a &amp;lt;clipto&amp;gt; rather than throwing an exception&lt;br /&gt;
* Added the ability to log properties in a CSV file with the new fgfs executable argument --jsbsim-output-directive-file&lt;br /&gt;
* Fixed uninitialized variables in FGPiston which could randomly generate invalid floating point values that would propagate to many places in JSBSim.&lt;br /&gt;
* Fixed a segfault occuring when changing the LOD ranges with a JSBSim aircraft&lt;br /&gt;
&lt;br /&gt;
== YASim ==&lt;br /&gt;
* Support for transonic flow effects.&lt;br /&gt;
* Control initial gear state directly by setting &amp;lt;code&amp;gt;/fdm/yasim/respect-external-gear-state=true&amp;lt;/code&amp;gt;, rather then YASim settings this depending on whether the aircraft is in the air or on the ground.&lt;br /&gt;
* Electric engines are now supported.&lt;br /&gt;
&lt;br /&gt;
== Carriers ==&lt;br /&gt;
* Two new standard state overlays are supported in the launcher: &amp;lt;code&amp;gt;carrier-takeoff&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;carrier-approach&amp;lt;/code&amp;gt;.&lt;br /&gt;
* A new &amp;lt;code&amp;gt;--carrier-position&amp;lt;/code&amp;gt; command-line argument has been added.  This can be used to select the aircraft start position on an aircraft carrier.  Either a catapult (e.g. &amp;lt;code&amp;gt;cat-1&amp;lt;/code&amp;gt;), a parking position (e.g. &amp;lt;code&amp;gt;park-1&amp;lt;/code&amp;gt;), on final approach on the FLOLS (&amp;lt;code&amp;gt;flols&amp;lt;/code&amp;gt;) or abeam the carrier (&amp;lt;code&amp;gt;abeam&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== AI ==&lt;br /&gt;
* New AI models for the CRJ900, SR-71, Saab 340.&lt;br /&gt;
* Updated AI models for the A-4, KA6-D, ERJ-195, CRJ-700, CRJ-200.&lt;br /&gt;
* Updated AI traffic for Aeormar Mexico, AirDolomiti, Air Tahiti, American Eagle, China Southern, Delta Connection, Horizon Air, IcelandAir, JetBlue, LoganAir, LOT, Lufthansa, Lufthansa CityLine, MNG (Cargo), SkyUp, United Parcel Service, Ural Airlines, Uzbekistan Airways, Westjet Regional.&lt;br /&gt;
* Updated AI liveries for Aeormar Mexico, Airbus, Air Canada, Air Europa, Air Tahiti, American Airlines, American Eagle, Alaska, Belavia, China Southern, Gulf Air, Hop!, Icelandair, JetBlue, LoganAir, LOT, Rusline, SkyUp, South African Express, United Express, Ural Airlines,  Uzbekistan Airways, Virgin Australia, Westjet, &lt;br /&gt;
* Space Shuttle TAEM and approach at KEDW scenario.&lt;br /&gt;
* Accurate Britten-Norman Islander performance data, from an Islander pilot.&lt;br /&gt;
&lt;br /&gt;
== Multiplayer ==&lt;br /&gt;
* FGComm now supports both COM1 and COM2, as well as volume settings.&lt;br /&gt;
* The views defined by the user's aircraft (Pilot view, Helicopter view, Tower view etc) can now be used with multiplayer aircraft.  Viewing a particular multiplayer aircraft is done by clicking in the Pilot List dialogue's &amp;quot;view' column (see the &amp;quot;Multiplayer/Pilot List&amp;quot; menu).&lt;br /&gt;
* Connection to VATSIM via swift is now available via the GUI.&lt;br /&gt;
* &amp;lt;code&amp;gt;--disable-hold-short&amp;lt;/code&amp;gt; option which allows the user to force a start on the runway when multiplayer is enabled.  This option should be used with caution - it can give other pilots and ATC a nasty fright to find an aircraft materialize on the runway!&lt;br /&gt;
* MPCarrier can now be detected by the GUI even if not available on startup.  To enable this feature set &amp;lt;code&amp;gt;/sim/mp-carriers/auto-attach=true&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Nasal Scripting ==&lt;br /&gt;
* Garbage collection improvements to reduce frame stuttering&lt;br /&gt;
* Re-loadable nasal modules&lt;br /&gt;
* Canvas EFIS framework&lt;br /&gt;
&lt;br /&gt;
== Canvas ==&lt;br /&gt;
* Three new methods in [[Canvas Image]] to set colors of pixels in the image.&lt;br /&gt;
&lt;br /&gt;
== Aircraft == &lt;br /&gt;
* Boeing 777&lt;br /&gt;
* Douglas A-26-Invader&lt;br /&gt;
* Airbus A320&lt;br /&gt;
* Antonov AN-24&lt;br /&gt;
* Diamond DA40 NG G1000&lt;br /&gt;
* Robin DR400 Ecoflyer&lt;br /&gt;
* General Dynamics F-16&lt;br /&gt;
* Piper J3 Cub&lt;br /&gt;
* Saab JA37 Viggen&lt;br /&gt;
* Piper PA 28 Cherokee&lt;br /&gt;
* Bombardier Q400&lt;br /&gt;
* Ryan Navion&lt;br /&gt;
* Space Shuttle&lt;br /&gt;
* Cirrus SR22&lt;br /&gt;
* Yak 52&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
* Increased turbulence will be encountered near active volcanoes.&lt;br /&gt;
* Configurable METAR URL.&lt;br /&gt;
* METAR strings are decoded and displayed in a human-readable form in the weather dialog.&lt;br /&gt;
* Polish translations of the UI are now available.&lt;br /&gt;
* Improved Chinese translations for the launcher.&lt;br /&gt;
* Improve glider vario instrument.&lt;br /&gt;
&lt;br /&gt;
== 2020.1.2 point release ==&lt;br /&gt;
* Adjust RelWithDebInfo optimisation for Clang (This should give a bit of speed boost to macOS official builds.)&lt;br /&gt;
* Enable old-style texture compression&lt;br /&gt;
&lt;br /&gt;
[[Category:FlightGear changelogs‎]]&lt;br /&gt;
[[Zh:2020.1]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124653</id>
		<title>Effect framework</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124653"/>
		<updated>2020-05-13T10:02:02Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* texture-unit */ added example of 3d texture&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
The effect framework as per version 2020.1&lt;br /&gt;
&lt;br /&gt;
Effects describe the graphical appearance of 3D objects and scenery in&lt;br /&gt;
FlightGear. The main motivation for effects is to support OpenGL&lt;br /&gt;
shaders and to provide different implementations for graphics hardware&lt;br /&gt;
of varying capabilities. Effects are similar to DirectX effects files&lt;br /&gt;
and Ogre3D material scripts.&lt;br /&gt;
&lt;br /&gt;
An effect is a property list. The property list syntax is extended&lt;br /&gt;
with new &amp;quot;vec3d&amp;quot; and &amp;quot;vec4d&amp;quot; types to support common computer graphics&lt;br /&gt;
values. Effects are read from files with a &amp;quot;.eff&amp;quot; extension or can be&lt;br /&gt;
created on-the-fly by FlightGear at runtime.  An effect consists of a&lt;br /&gt;
&amp;quot;parameters&amp;quot; section followed by &amp;quot;technique&amp;quot; descriptions.  The&lt;br /&gt;
&amp;quot;parameters&amp;quot; section is a tree of values that describe, abstractly,&lt;br /&gt;
the graphical characteristics of objects that use the effect. Techniques&lt;br /&gt;
refer to these parameters and use them to set OpenGL state or to set&lt;br /&gt;
parameters for shader programs. The names of properties in the&lt;br /&gt;
parameter section can be whatever the effects author chooses, although&lt;br /&gt;
some standard parameters  are set by FlightGear itself. On the other&lt;br /&gt;
hand, the properties in the techniques section are all defined by the&lt;br /&gt;
FlightGear. &lt;br /&gt;
&lt;br /&gt;
== Default Effects in Terrain Materials and Models ==&lt;br /&gt;
Effects for terrain work in this way: for each material type in&lt;br /&gt;
materials.xml an effect is created that inherits from a single default&lt;br /&gt;
terrain effect, Effects/terrain-default.eff. The parameters section of&lt;br /&gt;
the effect is filled in using the ambient, diffuse, specular,&lt;br /&gt;
emissive, shininess, and transparent fields of the material. The&lt;br /&gt;
parameters image, filter, wrap-s, and wrap-t are also initialized from&lt;br /&gt;
the material xml. Seperate effects are created for each texture&lt;br /&gt;
variant of a material.&lt;br /&gt;
&lt;br /&gt;
Model effects are created by walking the OpenSceneGraph scene graph&lt;br /&gt;
for a model and replacing nodes (osg::Geode) that have state sets with&lt;br /&gt;
node that uses an effect instead. Again, a small effect is created&lt;br /&gt;
with parameters extracted from OSG objects; this effect inherits, by&lt;br /&gt;
default, from Effects/model-default.eff. A larger set of parameters is&lt;br /&gt;
created for model effects than for terrain because there is more&lt;br /&gt;
variation possible from the OSG model loaders than from the terrain&lt;br /&gt;
system. The parameters created are: &lt;br /&gt;
&lt;br /&gt;
* material active, ambient, diffuse, specular, emissive, shininess, color mode&lt;br /&gt;
# blend active, source, destination&lt;br /&gt;
# shade-model&lt;br /&gt;
# cull-face&lt;br /&gt;
* rendering-hint&lt;br /&gt;
* texture type, image, filter, wrap-s, wrap-t&lt;br /&gt;
&lt;br /&gt;
== Specifying Custom Effects ==&lt;br /&gt;
You can specify the effects that will be used by FlightGear as the&lt;br /&gt;
base effect when it creates terrain and model effects.&lt;br /&gt;
&lt;br /&gt;
In the terrain materials.xml, an &amp;quot;effect&amp;quot; property specifies the name&lt;br /&gt;
of the model to use.&lt;br /&gt;
&lt;br /&gt;
Material animations will be implemented by creating a new effect&lt;br /&gt;
that inherits from one in a model, overriding the parameters that&lt;br /&gt;
will be animated.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The $FGDATA/Effects directory contains the effects definitions; look there for&lt;br /&gt;
examples. Effects/crop.eff is a good example of a complex effect.&lt;br /&gt;
&lt;br /&gt;
== Application ==&lt;br /&gt;
To apply an effect to a model or part of a model use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;effect&amp;gt;&lt;br /&gt;
		&amp;lt;inherits-from&amp;gt;Effects/light-cone&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
		&amp;lt;object-name&amp;gt;Cone&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;inherits-from&amp;gt; &amp;lt;/inherits-from&amp;gt; contains the path to the effect you want to apply.&lt;br /&gt;
The effect does not need the file extension.&lt;br /&gt;
&lt;br /&gt;
=== Parameters in model file ===&lt;br /&gt;
&lt;br /&gt;
Parameters can be put into the model files effect application as well. But only bool, int, float, string can be used there.&lt;br /&gt;
&lt;br /&gt;
=== Chrome old usage ===&lt;br /&gt;
&lt;br /&gt;
Chrome, although now implemented as an effect, still retains the old method of application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;shader&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;shader&amp;gt;chrome&amp;lt;/shader&amp;gt;&lt;br /&gt;
			&amp;lt;texture&amp;gt;glass_shader.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
			&amp;lt;object-name&amp;gt;windscreen&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in order to maintain backward compatibility.&lt;br /&gt;
&lt;br /&gt;
== Reload effects at runtime ==&lt;br /&gt;
To reload an effect applied in a model xml file (e.g. some parameters and what it enherits from) just go into debug menu and select Reload Model.&lt;br /&gt;
&lt;br /&gt;
To reload the entire effect framework including eff files, go into menu and debug and configure development extensions and reload shaders. This is broken in 2020.1 though, but works in earlier FG versions.&lt;br /&gt;
&lt;br /&gt;
== The xml tags of an effect ==&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
The name of the effect&lt;br /&gt;
&lt;br /&gt;
=== inherits-from ===&lt;br /&gt;
One feature not fully illustrated in the sample below is that&lt;br /&gt;
effects can inherit from each other. The parent effect is listed in&lt;br /&gt;
the &amp;quot;inherits-from&amp;quot; form. The child effect's property tree is&lt;br /&gt;
overlaid over that of the parent. Nodes that have the same name and&lt;br /&gt;
property index -- set by the &amp;quot;n=&amp;quot; attribute in the property tag --&lt;br /&gt;
are recursively merged. Leaf property nodes from the child have&lt;br /&gt;
precedence.  This means that effects that inherit from the example&lt;br /&gt;
effect below could be very short, listing just new&lt;br /&gt;
parameters and adding nothing to the techniques section;&lt;br /&gt;
alternatively, a technique could be altered or customized in a&lt;br /&gt;
child, listing (for example) a different shader program. An example&lt;br /&gt;
showing inheritance Effects/crop.eff, which inherits some if its&lt;br /&gt;
values from Effects/terrain-default.eff.&lt;br /&gt;
&lt;br /&gt;
FlightGear directly uses effects inheritance to assign effects to 3D&lt;br /&gt;
models and terrain. As described below, at runtime small effects are&lt;br /&gt;
created that contain material and texture values in a &amp;quot;parameters&amp;quot;&lt;br /&gt;
section. These effects inherit from another effect which references&lt;br /&gt;
those parameters in its &amp;quot;techniques&amp;quot; section. The derived effect&lt;br /&gt;
overrides any default values that might be in the base effect's&lt;br /&gt;
parameters section.&lt;br /&gt;
&lt;br /&gt;
=== parameters ===&lt;br /&gt;
Custom parameters that controls the effect.&lt;br /&gt;
&lt;br /&gt;
Note that parameters can use the &amp;lt;use&amp;gt; tags to enable properties to specify the values.&lt;br /&gt;
&lt;br /&gt;
=== generate ===&lt;br /&gt;
&lt;br /&gt;
Often shader effects need tangent vectors to work properly. These &lt;br /&gt;
tangent vectors, usually called tangent and binormal, are computed &lt;br /&gt;
on the CPU and given to the shader as vertex attributes. These &lt;br /&gt;
vectors are computed on demand on the geometry using the effect if &lt;br /&gt;
the 'generate' clause is present in the effect file.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;generate&amp;gt;&lt;br /&gt;
		&amp;lt;tangent type=&amp;quot;int&amp;quot;&amp;gt;6&amp;lt;/tangent&amp;gt;&lt;br /&gt;
		&amp;lt;binormal type=&amp;quot;int&amp;quot;&amp;gt;7&amp;lt;/binormal&amp;gt;&lt;br /&gt;
		&amp;lt;normal type=&amp;quot;int&amp;quot;&amp;gt;8&amp;lt;/normal&amp;gt;&lt;br /&gt;
	&amp;lt;/generate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.&lt;br /&gt;
The integer value of these subnode is the index of the attribute &lt;br /&gt;
that will hold the value of the vec3 vector.&lt;br /&gt;
&lt;br /&gt;
Normal is really redundant and should not be used, as that is already generated from loading the mesh.&lt;br /&gt;
&lt;br /&gt;
The generate clause is located under PropertyList in the xml file.&lt;br /&gt;
&lt;br /&gt;
In order to be available for the vertex shader, these data should &lt;br /&gt;
be bound to an attribute in the program clause, like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;program&amp;gt;&lt;br /&gt;
		&amp;lt;vertex-shader&amp;gt;my_vertex_shader&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_tangent_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_binormal_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;7&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
	&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
attribute names are whatever the shader use. The index is the one &lt;br /&gt;
declared in the 'generate' clause. So because generate/tangent has &lt;br /&gt;
value 6 and my_tangent_attribute has index 6, my_tangent_attribute &lt;br /&gt;
holds the tangent value for the vertex.&lt;br /&gt;
&lt;br /&gt;
=== technique ===&lt;br /&gt;
A certain way of rendering this effect. Different pipelines typically have their own techniques.&lt;br /&gt;
&lt;br /&gt;
==== scheme ====&lt;br /&gt;
Since 2020.1, is only usable in Compositor build.&lt;br /&gt;
&lt;br /&gt;
For the compositor ALS pipeline a scheme of als-lightning has to be specified for the technique to be considered for rendering.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;scheme&amp;gt;als-lighting&amp;lt;/scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== predicate ====&lt;br /&gt;
A technique can contain a predicate that describes the OpenGL&lt;br /&gt;
functionality required to support the technique. The first&lt;br /&gt;
technique with a valid predicate in the list of techniques is used&lt;br /&gt;
to set up the graphics state of the effect. A technique with no&lt;br /&gt;
predicate is always assumed to be valid. The predicate is written in a&lt;br /&gt;
little expression language that supports the following primitives:&lt;br /&gt;
&lt;br /&gt;
and, or, equal, less, less-equal&lt;br /&gt;
glversion - returns the version number of OpenGL&lt;br /&gt;
extension-supported - returns true if an OpenGL extension is supported&lt;br /&gt;
property - returns the boolean value of a property&lt;br /&gt;
float-property - returns the float value of a property, useful inside equal, less or less-equal nodes&lt;br /&gt;
shader-language - returns the version of GLSL supported, or 0 if there is none.&lt;br /&gt;
&lt;br /&gt;
The proper way to test whether to enable a shader-based technique is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;predicate&amp;gt;&lt;br /&gt;
	  &amp;lt;and&amp;gt;&lt;br /&gt;
		&amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
		&amp;lt;less-equal&amp;gt;&lt;br /&gt;
		  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
		  &amp;lt;shader-language/&amp;gt;&lt;br /&gt;
		&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;/and&amp;gt;&lt;br /&gt;
	&amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a property set by the user to indicate what is the level &lt;br /&gt;
of quality desired. This level of quality can be checked in the predicate&lt;br /&gt;
like this :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;predicate&amp;gt;&lt;br /&gt;
      &amp;lt;and&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
	&amp;lt;less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
	  &amp;lt;float-property&amp;gt;/sim/rendering/quality-level&amp;lt;/float-property&amp;gt;&lt;br /&gt;
	&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	&amp;lt;!-- other predicate conditions --&amp;gt;&lt;br /&gt;
      &amp;lt;/and&amp;gt;&lt;br /&gt;
    &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
The range of /sim/rendering/quality-level is [0..5]&lt;br /&gt;
 * 2.0 is the threshold for relief mapping effects,&lt;br /&gt;
 * 4.0 is the threshold for geometry shader usage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;predicate&amp;gt;&lt;br /&gt;
		&amp;lt;and&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/quality-level&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/model&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;or&amp;gt;&lt;br /&gt;
			&amp;lt;less-equal&amp;gt;&lt;br /&gt;
			  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
			  &amp;lt;glversion/&amp;gt;&lt;br /&gt;
			&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
			&amp;lt;and&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shader_objects&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shading_language_100&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_vertex_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_fragment_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			&amp;lt;/and&amp;gt;&lt;br /&gt;
		  &amp;lt;/or&amp;gt;&lt;br /&gt;
		&amp;lt;/and&amp;gt;&lt;br /&gt;
	  &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== pass ====&lt;br /&gt;
A technique can consist of several passes. A pass is basically an Open&lt;br /&gt;
Scene Graph StateSet. Ultimately all OpenGL and OSG modes and state&lt;br /&gt;
attributes  will be accessable in techniques. State attributes -- that&lt;br /&gt;
is, technique properties that have children and are not just boolean&lt;br /&gt;
modes -- have an &amp;lt;active&amp;gt; parameter which enables or disables the&lt;br /&gt;
attribute. In this way a technique can declare parameters it needs,&lt;br /&gt;
but not enable the attribute at all if it is not needed; the decision&lt;br /&gt;
can be based on a parameter in the parameters section of the&lt;br /&gt;
effect. For example, effects that support transparent and opaque&lt;br /&gt;
geometry could have as part of a technique:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;blend&amp;gt;&lt;br /&gt;
		&amp;lt;active&amp;gt;&amp;lt;use&amp;gt;blend/active&amp;lt;/use&amp;gt;&amp;lt;/active&amp;gt;&lt;br /&gt;
		&amp;lt;source&amp;gt;src-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
		&amp;lt;destination&amp;gt;one-minus-src-alpha&amp;lt;/destination&amp;gt;&lt;br /&gt;
	  &amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if the blend/active parameter is true blending will be activated&lt;br /&gt;
using the usual blending equation; otherwise blending is disabled.&lt;br /&gt;
&lt;br /&gt;
Values are assigned to technique properties in several ways:&lt;br /&gt;
&lt;br /&gt;
	* They can appear directly in the techniques section as a&lt;br /&gt;
		constant. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;uniform&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;ColorsTex&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;sampler-1d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
		&amp;lt;/uniform&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		* The name of a property in the parameters section can be&lt;br /&gt;
		referenced using a &amp;quot;use&amp;quot; clause. For example, in the technique&lt;br /&gt;
		section:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;material&amp;gt;&lt;br /&gt;
			&amp;lt;ambient&amp;gt;&amp;lt;use&amp;gt;material/ambient&amp;lt;/use&amp;gt;&amp;lt;/ambient&amp;gt;&lt;br /&gt;
		&amp;lt;/material&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		Then, in the parameters section of the effect:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;material&amp;gt;&lt;br /&gt;
				&amp;lt;ambient type=&amp;quot;vec4d&amp;quot;&amp;gt;0.2 0.2 0.2 1.0&amp;lt;/ambient&amp;gt;&lt;br /&gt;
			&amp;lt;/material&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		It's worth pointing out that the &amp;quot;material&amp;quot; property in a&lt;br /&gt;
		technique specifies part of OpenGL's state, whereas &amp;quot;material&amp;quot;&lt;br /&gt;
		in the parameters section is just a name, part of a&lt;br /&gt;
		hierarchical namespace.&lt;br /&gt;
&lt;br /&gt;
		* A property in the parameters section doesn't need to contain&lt;br /&gt;
		a constant value; it can also contain a &amp;quot;use&amp;quot; property. Here&lt;br /&gt;
		the value of the use clause is the name of a node in an&lt;br /&gt;
		external property tree which will be used as the source of a&lt;br /&gt;
		value. If the name begins with '/', the node is in&lt;br /&gt;
		FlightGear's global property tree; otherwise, it is in a local&lt;br /&gt;
		property tree, usually belonging to a model [NOT IMPLEMENTED&lt;br /&gt;
		YET]. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;chrome-light&amp;gt;&amp;lt;use&amp;gt;/rendering/scene/chrome-light&amp;lt;/use&amp;gt;&amp;lt;/chrome-light&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		The type is determined by what is expected by the technique&lt;br /&gt;
		attribute that will ultimately receive the value. [There is&lt;br /&gt;
		no way to get vector values out of the main property system&lt;br /&gt;
		yet; this will be fixed shortly.] Values that are declared&lt;br /&gt;
		this way are dynamically updated if the property node&lt;br /&gt;
		changes.&lt;br /&gt;
&lt;br /&gt;
===== lighting =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== material =====&lt;br /&gt;
children: active, ambient, ambient-front, ambient-back, diffuse,&lt;br /&gt;
		 diffuse-front, diffuse-back, specular, specular-front,&lt;br /&gt;
		 specular-back, emissive, emissive-front, emissive-back, shininess,&lt;br /&gt;
		 shininess-front, shininess-back, color-mode&lt;br /&gt;
&lt;br /&gt;
===== blend =====&lt;br /&gt;
Children: active, source, destination, source-rgb, source-alpha, destination-rgb, destination-alpha&lt;br /&gt;
&lt;br /&gt;
Children values: dst-alpha, dst-color, one, one-minus-dst-alpha, one-minus-dst-color, one-minus-src-alpha, one-minus-src-color, src-alpha, src-alpha-saturate, src-color, constant-color, one-minus-constant-color, constant-alpha, one-minus-constant-alpha, zero&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;&lt;br /&gt;
                        &amp;lt;active&amp;gt;true&amp;lt;/active&amp;gt;&lt;br /&gt;
                        &amp;lt;source&amp;gt;one-minus-dst-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
			&amp;lt;destination&amp;gt;src-alpha-saturate&amp;lt;/destination&amp;gt;&lt;br /&gt;
		&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== blend (simple) =====&lt;br /&gt;
A blend tag with 0 will do nothing.&lt;br /&gt;
A blend tag with 1 will do the same as source-alpha: one-minus-dst-alpha, in other words it will enable z transparency using alpha from the fragment shader.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;1&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== shade-model =====&lt;br /&gt;
flat or smooth&lt;br /&gt;
&lt;br /&gt;
===== cull-face =====&lt;br /&gt;
front, back, front-back, off&lt;br /&gt;
&lt;br /&gt;
===== texture-unit =====&lt;br /&gt;
unit: integer denoting which unit it is&lt;br /&gt;
&lt;br /&gt;
image: the texture path&lt;br /&gt;
&lt;br /&gt;
images: multiple texture paths&lt;br /&gt;
&lt;br /&gt;
type: 2d, noise, cubemap, 3d (3d was added in 2020.1 and is used for layers of 2d textures defining a volumetric 3d texture)&lt;br /&gt;
&lt;br /&gt;
filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
&lt;br /&gt;
mag-filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
&lt;br /&gt;
wrap: repeat, clamp-to-edge, clamp-to-border, clamp, mirror&lt;br /&gt;
&lt;br /&gt;
internal-format: normalized&lt;br /&gt;
&lt;br /&gt;
environment: mode, color&lt;br /&gt;
:mode: add,blend,decal,modulate,replace&lt;br /&gt;
:color: rgba&lt;br /&gt;
&lt;br /&gt;
texenv-combine: replace, modulate, add, add-signed, interpolate, subtract, dot3-rgb, dot3-rgba&lt;br /&gt;
&lt;br /&gt;
texenv-combine: combine-rgb, combine-alpha, source0-rgb, source1-rgb, source2-rgb, source0-alpha, source1-alpha,source2-alpha,operand0-rgb,operand1-rgb,operand2-rgb,operand0-alpha,operand1-alpha,operand2-alpha,scale-rgb,scale-alpha&lt;br /&gt;
&lt;br /&gt;
point-sprite: true, false&lt;br /&gt;
&lt;br /&gt;
mipmap-control functions: auto, average, sum, product, min, max&lt;br /&gt;
&lt;br /&gt;
texgen:&lt;br /&gt;
:mode: object-linear, eye-linear, sphere-map, normal-map, reflection-map&lt;br /&gt;
:planes: s, t, r, q as doubles&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;texture-unit&amp;gt;&lt;br /&gt;
                        &amp;lt;unit&amp;gt;3&amp;lt;/unit&amp;gt;&lt;br /&gt;
			&amp;lt;image&amp;gt;Textures/Terrain/void.png&amp;lt;/image&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
                        &amp;lt;mag-filter&amp;gt;linear-mipmap-linear&amp;lt;/mag-filter&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
                        &amp;lt;wrap-r&amp;gt;repeat&amp;lt;/wrap-r&amp;gt;&lt;br /&gt;
			&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
                        &amp;lt;mipmap-control&amp;gt;&lt;br /&gt;
                            &amp;lt;function-r&amp;gt;average&amp;lt;/function-r&amp;gt;&lt;br /&gt;
			    &amp;lt;function-g&amp;gt;min&amp;lt;/function-g&amp;gt;&lt;br /&gt;
                            &amp;lt;function-b&amp;gt;sum&amp;lt;/function-b&amp;gt;&lt;br /&gt;
			    &amp;lt;function-a&amp;gt;product&amp;lt;/function-a&amp;gt;&lt;br /&gt;
                        &amp;lt;/mipmap-control&amp;gt;&lt;br /&gt;
                        &amp;lt;environment&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;decal&amp;lt;/mode&amp;gt; &lt;br /&gt;
                            &amp;lt;color&amp;gt;0.0 0.1 0.6 1.0&amp;lt;/color&amp;gt;&lt;br /&gt;
                        &amp;lt;/environment&amp;gt;&lt;br /&gt;
                        &amp;lt;point-sprite&amp;gt;true&amp;lt;/point-sprite&amp;gt;&lt;br /&gt;
                        &amp;lt;texenv-combine&amp;gt;operand0-rgb&amp;lt;/texenv-combine&amp;gt;&lt;br /&gt;
                        &amp;lt;texgen&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;S&amp;lt;/mode&amp;gt;&lt;br /&gt;
                            &amp;lt;planes&amp;gt;0.075, 0.0, 0.0, 0.5&amp;lt;/planes&amp;gt;&lt;br /&gt;
                        &amp;lt;/texgen&amp;gt;&lt;br /&gt;
		&amp;lt;/texture-unit&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Textures of type 3d has to be packed on the x axis. Here is an example: [https://raw.githubusercontent.com/sebh/TileableVolumeNoise/master/Examples/noiseErosionPacked.jpg noiseErosionPacked.jpg]&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-two-side =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== polygon-mode =====&lt;br /&gt;
children: front, back&lt;br /&gt;
&lt;br /&gt;
Valid values:  fill, line, point&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-point-size =====&lt;br /&gt;
true, false&lt;br /&gt;
&lt;br /&gt;
===== uniform =====&lt;br /&gt;
Data accessible by shaders.&lt;br /&gt;
&lt;br /&gt;
name: the name&lt;br /&gt;
&lt;br /&gt;
type: bool, int, float, float-vec3, float-vec4, sampler-1d, sampler-2d, sampler-3d, sampler-1d-shadow, sampler-2d-shadow, sampler-cube&lt;br /&gt;
&lt;br /&gt;
===== alpha-test =====&lt;br /&gt;
&lt;br /&gt;
active: true, false&lt;br /&gt;
&lt;br /&gt;
comparison: never, less, equal, lequal, greater, notequal, gequal, always&lt;br /&gt;
&lt;br /&gt;
reference: 0 to 1&lt;br /&gt;
&lt;br /&gt;
===== render-bin =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
bin-number: This is an integer defining the order stuff will be rendered in, it can be negative also.&lt;br /&gt;
&lt;br /&gt;
bin-name: RenderBin, DepthSortedBin&lt;br /&gt;
&lt;br /&gt;
===== rendering-hint =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
default, opaque, transparent&lt;br /&gt;
&lt;br /&gt;
This basically just sets Renderbin:&lt;br /&gt;
&lt;br /&gt;
opaque = bin 10, depthsortedbin&lt;br /&gt;
&lt;br /&gt;
transparent = bin 0, renderbin&lt;br /&gt;
&lt;br /&gt;
default = inherit renderbin details from parent node&lt;br /&gt;
&lt;br /&gt;
===== program =====&lt;br /&gt;
* vertex-shader&lt;br /&gt;
* geometry-shader&lt;br /&gt;
* fragment-shader&lt;br /&gt;
* attribute&lt;br /&gt;
* geometry-vertices-out: integer, max number of vertices emitted by geometry shader&lt;br /&gt;
* geometry-input-type: points, lines, lines-adjacency, triangles, triangles-adjacency&lt;br /&gt;
* geometry-output-type: points, line-strip, triangle-strip&lt;br /&gt;
* uniform-block-binding: has name and index (since 2020.1)&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example for clustered lightning in compositor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;fragment-shader n=&amp;quot;3&amp;quot;&amp;gt;Shaders/ALS/clustered-include.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;PointLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;5&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
		                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;SpotLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See this page for more about shaders: [[Howto:Shader programming in FlightGear]]&lt;br /&gt;
&lt;br /&gt;
== Uniforms passed to shaders outside the xml effect framework ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Type&lt;br /&gt;
!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix used to transform from world to view space. Same as osg_ViewMatrix, but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix inverse used to transform from view to world space. Same as osg_ViewMatrixInverse but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ProjectionMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, projection matrix inverse&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionCart&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in cartesian coordinates&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionGeod&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in geodesic coordinates (longitude in radians, latitude in radians, elevation in meters)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunAmbientColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDiffuseColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunSpecularColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDirection&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogDensity&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowDistances&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_DepthInColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Tells if the depth is stored in a depth texture or a color texture&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_Planes&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Used to convert the value of the depth buffer to a depth that can be used to compute the eye space position of the fragment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_BufferSize&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Dimensions of the buffer, used to convert gl_FragCoord into the range [0..1][0..1]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from world to view space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from view to world space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_SimulationTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_DeltaFrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=37364|title=Application of effects}} - Testing which kind of groups an effect can be applied to and when&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124650</id>
		<title>Effect framework</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124650"/>
		<updated>2020-05-12T16:24:23Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* generate */ note about normal generation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
The effect framework as per version 2020.1&lt;br /&gt;
&lt;br /&gt;
Effects describe the graphical appearance of 3D objects and scenery in&lt;br /&gt;
FlightGear. The main motivation for effects is to support OpenGL&lt;br /&gt;
shaders and to provide different implementations for graphics hardware&lt;br /&gt;
of varying capabilities. Effects are similar to DirectX effects files&lt;br /&gt;
and Ogre3D material scripts.&lt;br /&gt;
&lt;br /&gt;
An effect is a property list. The property list syntax is extended&lt;br /&gt;
with new &amp;quot;vec3d&amp;quot; and &amp;quot;vec4d&amp;quot; types to support common computer graphics&lt;br /&gt;
values. Effects are read from files with a &amp;quot;.eff&amp;quot; extension or can be&lt;br /&gt;
created on-the-fly by FlightGear at runtime.  An effect consists of a&lt;br /&gt;
&amp;quot;parameters&amp;quot; section followed by &amp;quot;technique&amp;quot; descriptions.  The&lt;br /&gt;
&amp;quot;parameters&amp;quot; section is a tree of values that describe, abstractly,&lt;br /&gt;
the graphical characteristics of objects that use the effect. Techniques&lt;br /&gt;
refer to these parameters and use them to set OpenGL state or to set&lt;br /&gt;
parameters for shader programs. The names of properties in the&lt;br /&gt;
parameter section can be whatever the effects author chooses, although&lt;br /&gt;
some standard parameters  are set by FlightGear itself. On the other&lt;br /&gt;
hand, the properties in the techniques section are all defined by the&lt;br /&gt;
FlightGear. &lt;br /&gt;
&lt;br /&gt;
== Default Effects in Terrain Materials and Models ==&lt;br /&gt;
Effects for terrain work in this way: for each material type in&lt;br /&gt;
materials.xml an effect is created that inherits from a single default&lt;br /&gt;
terrain effect, Effects/terrain-default.eff. The parameters section of&lt;br /&gt;
the effect is filled in using the ambient, diffuse, specular,&lt;br /&gt;
emissive, shininess, and transparent fields of the material. The&lt;br /&gt;
parameters image, filter, wrap-s, and wrap-t are also initialized from&lt;br /&gt;
the material xml. Seperate effects are created for each texture&lt;br /&gt;
variant of a material.&lt;br /&gt;
&lt;br /&gt;
Model effects are created by walking the OpenSceneGraph scene graph&lt;br /&gt;
for a model and replacing nodes (osg::Geode) that have state sets with&lt;br /&gt;
node that uses an effect instead. Again, a small effect is created&lt;br /&gt;
with parameters extracted from OSG objects; this effect inherits, by&lt;br /&gt;
default, from Effects/model-default.eff. A larger set of parameters is&lt;br /&gt;
created for model effects than for terrain because there is more&lt;br /&gt;
variation possible from the OSG model loaders than from the terrain&lt;br /&gt;
system. The parameters created are: &lt;br /&gt;
&lt;br /&gt;
* material active, ambient, diffuse, specular, emissive, shininess, color mode&lt;br /&gt;
# blend active, source, destination&lt;br /&gt;
# shade-model&lt;br /&gt;
# cull-face&lt;br /&gt;
* rendering-hint&lt;br /&gt;
* texture type, image, filter, wrap-s, wrap-t&lt;br /&gt;
&lt;br /&gt;
== Specifying Custom Effects ==&lt;br /&gt;
You can specify the effects that will be used by FlightGear as the&lt;br /&gt;
base effect when it creates terrain and model effects.&lt;br /&gt;
&lt;br /&gt;
In the terrain materials.xml, an &amp;quot;effect&amp;quot; property specifies the name&lt;br /&gt;
of the model to use.&lt;br /&gt;
&lt;br /&gt;
Material animations will be implemented by creating a new effect&lt;br /&gt;
that inherits from one in a model, overriding the parameters that&lt;br /&gt;
will be animated.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The $FGDATA/Effects directory contains the effects definitions; look there for&lt;br /&gt;
examples. Effects/crop.eff is a good example of a complex effect.&lt;br /&gt;
&lt;br /&gt;
== Application ==&lt;br /&gt;
To apply an effect to a model or part of a model use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;effect&amp;gt;&lt;br /&gt;
		&amp;lt;inherits-from&amp;gt;Effects/light-cone&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
		&amp;lt;object-name&amp;gt;Cone&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;inherits-from&amp;gt; &amp;lt;/inherits-from&amp;gt; contains the path to the effect you want to apply.&lt;br /&gt;
The effect does not need the file extension.&lt;br /&gt;
&lt;br /&gt;
=== Parameters in model file ===&lt;br /&gt;
&lt;br /&gt;
Parameters can be put into the model files effect application as well. But only bool, int, float, string can be used there.&lt;br /&gt;
&lt;br /&gt;
=== Chrome old usage ===&lt;br /&gt;
&lt;br /&gt;
Chrome, although now implemented as an effect, still retains the old method of application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;shader&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;shader&amp;gt;chrome&amp;lt;/shader&amp;gt;&lt;br /&gt;
			&amp;lt;texture&amp;gt;glass_shader.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
			&amp;lt;object-name&amp;gt;windscreen&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in order to maintain backward compatibility.&lt;br /&gt;
&lt;br /&gt;
== Reload effects at runtime ==&lt;br /&gt;
To reload an effect applied in a model xml file (e.g. some parameters and what it enherits from) just go into debug menu and select Reload Model.&lt;br /&gt;
&lt;br /&gt;
To reload the entire effect framework including eff files, go into menu and debug and configure development extensions and reload shaders. This is broken in 2020.1 though, but works in earlier FG versions.&lt;br /&gt;
&lt;br /&gt;
== The xml tags of an effect ==&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
The name of the effect&lt;br /&gt;
&lt;br /&gt;
=== inherits-from ===&lt;br /&gt;
One feature not fully illustrated in the sample below is that&lt;br /&gt;
effects can inherit from each other. The parent effect is listed in&lt;br /&gt;
the &amp;quot;inherits-from&amp;quot; form. The child effect's property tree is&lt;br /&gt;
overlaid over that of the parent. Nodes that have the same name and&lt;br /&gt;
property index -- set by the &amp;quot;n=&amp;quot; attribute in the property tag --&lt;br /&gt;
are recursively merged. Leaf property nodes from the child have&lt;br /&gt;
precedence.  This means that effects that inherit from the example&lt;br /&gt;
effect below could be very short, listing just new&lt;br /&gt;
parameters and adding nothing to the techniques section;&lt;br /&gt;
alternatively, a technique could be altered or customized in a&lt;br /&gt;
child, listing (for example) a different shader program. An example&lt;br /&gt;
showing inheritance Effects/crop.eff, which inherits some if its&lt;br /&gt;
values from Effects/terrain-default.eff.&lt;br /&gt;
&lt;br /&gt;
FlightGear directly uses effects inheritance to assign effects to 3D&lt;br /&gt;
models and terrain. As described below, at runtime small effects are&lt;br /&gt;
created that contain material and texture values in a &amp;quot;parameters&amp;quot;&lt;br /&gt;
section. These effects inherit from another effect which references&lt;br /&gt;
those parameters in its &amp;quot;techniques&amp;quot; section. The derived effect&lt;br /&gt;
overrides any default values that might be in the base effect's&lt;br /&gt;
parameters section.&lt;br /&gt;
&lt;br /&gt;
=== parameters ===&lt;br /&gt;
Custom parameters that controls the effect.&lt;br /&gt;
&lt;br /&gt;
Note that parameters can use the &amp;lt;use&amp;gt; tags to enable properties to specify the values.&lt;br /&gt;
&lt;br /&gt;
=== generate ===&lt;br /&gt;
&lt;br /&gt;
Often shader effects need tangent vectors to work properly. These &lt;br /&gt;
tangent vectors, usually called tangent and binormal, are computed &lt;br /&gt;
on the CPU and given to the shader as vertex attributes. These &lt;br /&gt;
vectors are computed on demand on the geometry using the effect if &lt;br /&gt;
the 'generate' clause is present in the effect file.&lt;br /&gt;
&lt;br /&gt;
Example :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;generate&amp;gt;&lt;br /&gt;
		&amp;lt;tangent type=&amp;quot;int&amp;quot;&amp;gt;6&amp;lt;/tangent&amp;gt;&lt;br /&gt;
		&amp;lt;binormal type=&amp;quot;int&amp;quot;&amp;gt;7&amp;lt;/binormal&amp;gt;&lt;br /&gt;
		&amp;lt;normal type=&amp;quot;int&amp;quot;&amp;gt;8&amp;lt;/normal&amp;gt;&lt;br /&gt;
	&amp;lt;/generate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.&lt;br /&gt;
The integer value of these subnode is the index of the attribute &lt;br /&gt;
that will hold the value of the vec3 vector.&lt;br /&gt;
&lt;br /&gt;
Normal is really redundant and should not be used, as that is already generated from loading the mesh.&lt;br /&gt;
&lt;br /&gt;
The generate clause is located under PropertyList in the xml file.&lt;br /&gt;
&lt;br /&gt;
In order to be available for the vertex shader, these data should &lt;br /&gt;
be bound to an attribute in the program clause, like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;program&amp;gt;&lt;br /&gt;
		&amp;lt;vertex-shader&amp;gt;my_vertex_shader&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_tangent_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_binormal_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;7&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
	&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
attribute names are whatever the shader use. The index is the one &lt;br /&gt;
declared in the 'generate' clause. So because generate/tangent has &lt;br /&gt;
value 6 and my_tangent_attribute has index 6, my_tangent_attribute &lt;br /&gt;
holds the tangent value for the vertex.&lt;br /&gt;
&lt;br /&gt;
=== technique ===&lt;br /&gt;
A certain way of rendering this effect. Different pipelines typically have their own techniques.&lt;br /&gt;
&lt;br /&gt;
==== scheme ====&lt;br /&gt;
Since 2020.1, is only usable in Compositor build.&lt;br /&gt;
&lt;br /&gt;
For the compositor ALS pipeline a scheme of als-lightning has to be specified for the technique to be considered for rendering.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;scheme&amp;gt;als-lighting&amp;lt;/scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== predicate ====&lt;br /&gt;
A technique can contain a predicate that describes the OpenGL&lt;br /&gt;
functionality required to support the technique. The first&lt;br /&gt;
technique with a valid predicate in the list of techniques is used&lt;br /&gt;
to set up the graphics state of the effect. A technique with no&lt;br /&gt;
predicate is always assumed to be valid. The predicate is written in a&lt;br /&gt;
little expression language that supports the following primitives:&lt;br /&gt;
&lt;br /&gt;
and, or, equal, less, less-equal&lt;br /&gt;
glversion - returns the version number of OpenGL&lt;br /&gt;
extension-supported - returns true if an OpenGL extension is supported&lt;br /&gt;
property - returns the boolean value of a property&lt;br /&gt;
float-property - returns the float value of a property, useful inside equal, less or less-equal nodes&lt;br /&gt;
shader-language - returns the version of GLSL supported, or 0 if there is none.&lt;br /&gt;
&lt;br /&gt;
The proper way to test whether to enable a shader-based technique is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;predicate&amp;gt;&lt;br /&gt;
	  &amp;lt;and&amp;gt;&lt;br /&gt;
		&amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
		&amp;lt;less-equal&amp;gt;&lt;br /&gt;
		  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
		  &amp;lt;shader-language/&amp;gt;&lt;br /&gt;
		&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;/and&amp;gt;&lt;br /&gt;
	&amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a property set by the user to indicate what is the level &lt;br /&gt;
of quality desired. This level of quality can be checked in the predicate&lt;br /&gt;
like this :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;predicate&amp;gt;&lt;br /&gt;
      &amp;lt;and&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
	&amp;lt;less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
	  &amp;lt;float-property&amp;gt;/sim/rendering/quality-level&amp;lt;/float-property&amp;gt;&lt;br /&gt;
	&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	&amp;lt;!-- other predicate conditions --&amp;gt;&lt;br /&gt;
      &amp;lt;/and&amp;gt;&lt;br /&gt;
    &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
The range of /sim/rendering/quality-level is [0..5]&lt;br /&gt;
 * 2.0 is the threshold for relief mapping effects,&lt;br /&gt;
 * 4.0 is the threshold for geometry shader usage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;predicate&amp;gt;&lt;br /&gt;
		&amp;lt;and&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/quality-level&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/model&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;or&amp;gt;&lt;br /&gt;
			&amp;lt;less-equal&amp;gt;&lt;br /&gt;
			  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
			  &amp;lt;glversion/&amp;gt;&lt;br /&gt;
			&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
			&amp;lt;and&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shader_objects&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shading_language_100&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_vertex_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_fragment_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			&amp;lt;/and&amp;gt;&lt;br /&gt;
		  &amp;lt;/or&amp;gt;&lt;br /&gt;
		&amp;lt;/and&amp;gt;&lt;br /&gt;
	  &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== pass ====&lt;br /&gt;
A technique can consist of several passes. A pass is basically an Open&lt;br /&gt;
Scene Graph StateSet. Ultimately all OpenGL and OSG modes and state&lt;br /&gt;
attributes  will be accessable in techniques. State attributes -- that&lt;br /&gt;
is, technique properties that have children and are not just boolean&lt;br /&gt;
modes -- have an &amp;lt;active&amp;gt; parameter which enables or disables the&lt;br /&gt;
attribute. In this way a technique can declare parameters it needs,&lt;br /&gt;
but not enable the attribute at all if it is not needed; the decision&lt;br /&gt;
can be based on a parameter in the parameters section of the&lt;br /&gt;
effect. For example, effects that support transparent and opaque&lt;br /&gt;
geometry could have as part of a technique:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;blend&amp;gt;&lt;br /&gt;
		&amp;lt;active&amp;gt;&amp;lt;use&amp;gt;blend/active&amp;lt;/use&amp;gt;&amp;lt;/active&amp;gt;&lt;br /&gt;
		&amp;lt;source&amp;gt;src-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
		&amp;lt;destination&amp;gt;one-minus-src-alpha&amp;lt;/destination&amp;gt;&lt;br /&gt;
	  &amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if the blend/active parameter is true blending will be activated&lt;br /&gt;
using the usual blending equation; otherwise blending is disabled.&lt;br /&gt;
&lt;br /&gt;
Values are assigned to technique properties in several ways:&lt;br /&gt;
&lt;br /&gt;
	* They can appear directly in the techniques section as a&lt;br /&gt;
		constant. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;uniform&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;ColorsTex&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;sampler-1d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
		&amp;lt;/uniform&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		* The name of a property in the parameters section can be&lt;br /&gt;
		referenced using a &amp;quot;use&amp;quot; clause. For example, in the technique&lt;br /&gt;
		section:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;material&amp;gt;&lt;br /&gt;
			&amp;lt;ambient&amp;gt;&amp;lt;use&amp;gt;material/ambient&amp;lt;/use&amp;gt;&amp;lt;/ambient&amp;gt;&lt;br /&gt;
		&amp;lt;/material&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		Then, in the parameters section of the effect:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;material&amp;gt;&lt;br /&gt;
				&amp;lt;ambient type=&amp;quot;vec4d&amp;quot;&amp;gt;0.2 0.2 0.2 1.0&amp;lt;/ambient&amp;gt;&lt;br /&gt;
			&amp;lt;/material&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		It's worth pointing out that the &amp;quot;material&amp;quot; property in a&lt;br /&gt;
		technique specifies part of OpenGL's state, whereas &amp;quot;material&amp;quot;&lt;br /&gt;
		in the parameters section is just a name, part of a&lt;br /&gt;
		hierarchical namespace.&lt;br /&gt;
&lt;br /&gt;
		* A property in the parameters section doesn't need to contain&lt;br /&gt;
		a constant value; it can also contain a &amp;quot;use&amp;quot; property. Here&lt;br /&gt;
		the value of the use clause is the name of a node in an&lt;br /&gt;
		external property tree which will be used as the source of a&lt;br /&gt;
		value. If the name begins with '/', the node is in&lt;br /&gt;
		FlightGear's global property tree; otherwise, it is in a local&lt;br /&gt;
		property tree, usually belonging to a model [NOT IMPLEMENTED&lt;br /&gt;
		YET]. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;chrome-light&amp;gt;&amp;lt;use&amp;gt;/rendering/scene/chrome-light&amp;lt;/use&amp;gt;&amp;lt;/chrome-light&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		The type is determined by what is expected by the technique&lt;br /&gt;
		attribute that will ultimately receive the value. [There is&lt;br /&gt;
		no way to get vector values out of the main property system&lt;br /&gt;
		yet; this will be fixed shortly.] Values that are declared&lt;br /&gt;
		this way are dynamically updated if the property node&lt;br /&gt;
		changes.&lt;br /&gt;
&lt;br /&gt;
===== lighting =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== material =====&lt;br /&gt;
children: active, ambient, ambient-front, ambient-back, diffuse,&lt;br /&gt;
		 diffuse-front, diffuse-back, specular, specular-front,&lt;br /&gt;
		 specular-back, emissive, emissive-front, emissive-back, shininess,&lt;br /&gt;
		 shininess-front, shininess-back, color-mode&lt;br /&gt;
&lt;br /&gt;
===== blend =====&lt;br /&gt;
Children: active, source, destination, source-rgb, source-alpha, destination-rgb, destination-alpha&lt;br /&gt;
&lt;br /&gt;
Children values: dst-alpha, dst-color, one, one-minus-dst-alpha, one-minus-dst-color, one-minus-src-alpha, one-minus-src-color, src-alpha, src-alpha-saturate, src-color, constant-color, one-minus-constant-color, constant-alpha, one-minus-constant-alpha, zero&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;&lt;br /&gt;
                        &amp;lt;active&amp;gt;true&amp;lt;/active&amp;gt;&lt;br /&gt;
                        &amp;lt;source&amp;gt;one-minus-dst-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
			&amp;lt;destination&amp;gt;src-alpha-saturate&amp;lt;/destination&amp;gt;&lt;br /&gt;
		&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== blend (simple) =====&lt;br /&gt;
A blend tag with 0 will do nothing.&lt;br /&gt;
A blend tag with 1 will do the same as source-alpha: one-minus-dst-alpha, in other words it will enable z transparency using alpha from the fragment shader.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;1&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== shade-model =====&lt;br /&gt;
flat or smooth&lt;br /&gt;
&lt;br /&gt;
===== cull-face =====&lt;br /&gt;
front, back, front-back, off&lt;br /&gt;
&lt;br /&gt;
===== texture-unit =====&lt;br /&gt;
unit: integer denoting which unit it is&lt;br /&gt;
&lt;br /&gt;
image: the texture path&lt;br /&gt;
&lt;br /&gt;
images: multiple texture paths&lt;br /&gt;
&lt;br /&gt;
type: 2d, noise, cubemap, 3d (3d was added in 2020.1 and is used for layers of 2d textures defining a volumetric 3d texture)&lt;br /&gt;
&lt;br /&gt;
filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
&lt;br /&gt;
mag-filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
&lt;br /&gt;
wrap: repeat, clamp-to-edge, clamp-to-border, clamp, mirror&lt;br /&gt;
&lt;br /&gt;
internal-format: normalized&lt;br /&gt;
&lt;br /&gt;
environment: mode, color&lt;br /&gt;
:mode: add,blend,decal,modulate,replace&lt;br /&gt;
:color: rgba&lt;br /&gt;
&lt;br /&gt;
texenv-combine: replace, modulate, add, add-signed, interpolate, subtract, dot3-rgb, dot3-rgba&lt;br /&gt;
&lt;br /&gt;
texenv-combine: combine-rgb, combine-alpha, source0-rgb, source1-rgb, source2-rgb, source0-alpha, source1-alpha,source2-alpha,operand0-rgb,operand1-rgb,operand2-rgb,operand0-alpha,operand1-alpha,operand2-alpha,scale-rgb,scale-alpha&lt;br /&gt;
&lt;br /&gt;
point-sprite: true, false&lt;br /&gt;
&lt;br /&gt;
mipmap-control functions: auto, average, sum, product, min, max&lt;br /&gt;
&lt;br /&gt;
texgen:&lt;br /&gt;
:mode: object-linear, eye-linear, sphere-map, normal-map, reflection-map&lt;br /&gt;
:planes: s, t, r, q as doubles&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;texture-unit&amp;gt;&lt;br /&gt;
                        &amp;lt;unit&amp;gt;3&amp;lt;/unit&amp;gt;&lt;br /&gt;
			&amp;lt;image&amp;gt;Textures/Terrain/void.png&amp;lt;/image&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
                        &amp;lt;mag-filter&amp;gt;linear-mipmap-linear&amp;lt;/mag-filter&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
                        &amp;lt;wrap-r&amp;gt;repeat&amp;lt;/wrap-r&amp;gt;&lt;br /&gt;
			&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
                        &amp;lt;mipmap-control&amp;gt;&lt;br /&gt;
                            &amp;lt;function-r&amp;gt;average&amp;lt;/function-r&amp;gt;&lt;br /&gt;
			    &amp;lt;function-g&amp;gt;min&amp;lt;/function-g&amp;gt;&lt;br /&gt;
                            &amp;lt;function-b&amp;gt;sum&amp;lt;/function-b&amp;gt;&lt;br /&gt;
			    &amp;lt;function-a&amp;gt;product&amp;lt;/function-a&amp;gt;&lt;br /&gt;
                        &amp;lt;/mipmap-control&amp;gt;&lt;br /&gt;
                        &amp;lt;environment&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;decal&amp;lt;/mode&amp;gt; &lt;br /&gt;
                            &amp;lt;color&amp;gt;0.0 0.1 0.6 1.0&amp;lt;/color&amp;gt;&lt;br /&gt;
                        &amp;lt;/environment&amp;gt;&lt;br /&gt;
                        &amp;lt;point-sprite&amp;gt;true&amp;lt;/point-sprite&amp;gt;&lt;br /&gt;
                        &amp;lt;texenv-combine&amp;gt;operand0-rgb&amp;lt;/texenv-combine&amp;gt;&lt;br /&gt;
                        &amp;lt;texgen&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;S&amp;lt;/mode&amp;gt;&lt;br /&gt;
                            &amp;lt;planes&amp;gt;0.075, 0.0, 0.0, 0.5&amp;lt;/planes&amp;gt;&lt;br /&gt;
                        &amp;lt;/texgen&amp;gt;&lt;br /&gt;
		&amp;lt;/texture-unit&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-two-side =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== polygon-mode =====&lt;br /&gt;
children: front, back&lt;br /&gt;
&lt;br /&gt;
Valid values:  fill, line, point&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-point-size =====&lt;br /&gt;
true, false&lt;br /&gt;
&lt;br /&gt;
===== uniform =====&lt;br /&gt;
Data accessible by shaders.&lt;br /&gt;
&lt;br /&gt;
name: the name&lt;br /&gt;
&lt;br /&gt;
type: bool, int, float, float-vec3, float-vec4, sampler-1d, sampler-2d, sampler-3d, sampler-1d-shadow, sampler-2d-shadow, sampler-cube&lt;br /&gt;
&lt;br /&gt;
===== alpha-test =====&lt;br /&gt;
&lt;br /&gt;
active: true, false&lt;br /&gt;
&lt;br /&gt;
comparison: never, less, equal, lequal, greater, notequal, gequal, always&lt;br /&gt;
&lt;br /&gt;
reference: 0 to 1&lt;br /&gt;
&lt;br /&gt;
===== render-bin =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
bin-number: This is an integer defining the order stuff will be rendered in, it can be negative also.&lt;br /&gt;
&lt;br /&gt;
bin-name: RenderBin, DepthSortedBin&lt;br /&gt;
&lt;br /&gt;
===== rendering-hint =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
default, opaque, transparent&lt;br /&gt;
&lt;br /&gt;
This basically just sets Renderbin:&lt;br /&gt;
&lt;br /&gt;
opaque = bin 10, depthsortedbin&lt;br /&gt;
&lt;br /&gt;
transparent = bin 0, renderbin&lt;br /&gt;
&lt;br /&gt;
default = inherit renderbin details from parent node&lt;br /&gt;
&lt;br /&gt;
===== program =====&lt;br /&gt;
* vertex-shader&lt;br /&gt;
* geometry-shader&lt;br /&gt;
* fragment-shader&lt;br /&gt;
* attribute&lt;br /&gt;
* geometry-vertices-out: integer, max number of vertices emitted by geometry shader&lt;br /&gt;
* geometry-input-type: points, lines, lines-adjacency, triangles, triangles-adjacency&lt;br /&gt;
* geometry-output-type: points, line-strip, triangle-strip&lt;br /&gt;
* uniform-block-binding: has name and index (since 2020.1)&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example for clustered lightning in compositor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;fragment-shader n=&amp;quot;3&amp;quot;&amp;gt;Shaders/ALS/clustered-include.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;PointLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;5&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
		                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;SpotLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See this page for more about shaders: [[Howto:Shader programming in FlightGear]]&lt;br /&gt;
&lt;br /&gt;
== Uniforms passed to shaders outside the xml effect framework ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Type&lt;br /&gt;
!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix used to transform from world to view space. Same as osg_ViewMatrix, but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix inverse used to transform from view to world space. Same as osg_ViewMatrixInverse but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ProjectionMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, projection matrix inverse&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionCart&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in cartesian coordinates&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionGeod&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in geodesic coordinates (longitude in radians, latitude in radians, elevation in meters)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunAmbientColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDiffuseColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunSpecularColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDirection&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogDensity&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowDistances&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_DepthInColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Tells if the depth is stored in a depth texture or a color texture&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_Planes&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Used to convert the value of the depth buffer to a depth that can be used to compute the eye space position of the fragment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_BufferSize&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Dimensions of the buffer, used to convert gl_FragCoord into the range [0..1][0..1]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from world to view space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from view to world space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_SimulationTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_DeltaFrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=37364|title=Application of effects}} - Testing which kind of groups an effect can be applied to and when&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124649</id>
		<title>Effect framework</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124649"/>
		<updated>2020-05-12T16:22:46Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* The xml tags of an effect */ lowercase for tag names just for consistency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
The effect framework as per version 2020.1&lt;br /&gt;
&lt;br /&gt;
Effects describe the graphical appearance of 3D objects and scenery in&lt;br /&gt;
FlightGear. The main motivation for effects is to support OpenGL&lt;br /&gt;
shaders and to provide different implementations for graphics hardware&lt;br /&gt;
of varying capabilities. Effects are similar to DirectX effects files&lt;br /&gt;
and Ogre3D material scripts.&lt;br /&gt;
&lt;br /&gt;
An effect is a property list. The property list syntax is extended&lt;br /&gt;
with new &amp;quot;vec3d&amp;quot; and &amp;quot;vec4d&amp;quot; types to support common computer graphics&lt;br /&gt;
values. Effects are read from files with a &amp;quot;.eff&amp;quot; extension or can be&lt;br /&gt;
created on-the-fly by FlightGear at runtime.  An effect consists of a&lt;br /&gt;
&amp;quot;parameters&amp;quot; section followed by &amp;quot;technique&amp;quot; descriptions.  The&lt;br /&gt;
&amp;quot;parameters&amp;quot; section is a tree of values that describe, abstractly,&lt;br /&gt;
the graphical characteristics of objects that use the effect. Techniques&lt;br /&gt;
refer to these parameters and use them to set OpenGL state or to set&lt;br /&gt;
parameters for shader programs. The names of properties in the&lt;br /&gt;
parameter section can be whatever the effects author chooses, although&lt;br /&gt;
some standard parameters  are set by FlightGear itself. On the other&lt;br /&gt;
hand, the properties in the techniques section are all defined by the&lt;br /&gt;
FlightGear. &lt;br /&gt;
&lt;br /&gt;
== Default Effects in Terrain Materials and Models ==&lt;br /&gt;
Effects for terrain work in this way: for each material type in&lt;br /&gt;
materials.xml an effect is created that inherits from a single default&lt;br /&gt;
terrain effect, Effects/terrain-default.eff. The parameters section of&lt;br /&gt;
the effect is filled in using the ambient, diffuse, specular,&lt;br /&gt;
emissive, shininess, and transparent fields of the material. The&lt;br /&gt;
parameters image, filter, wrap-s, and wrap-t are also initialized from&lt;br /&gt;
the material xml. Seperate effects are created for each texture&lt;br /&gt;
variant of a material.&lt;br /&gt;
&lt;br /&gt;
Model effects are created by walking the OpenSceneGraph scene graph&lt;br /&gt;
for a model and replacing nodes (osg::Geode) that have state sets with&lt;br /&gt;
node that uses an effect instead. Again, a small effect is created&lt;br /&gt;
with parameters extracted from OSG objects; this effect inherits, by&lt;br /&gt;
default, from Effects/model-default.eff. A larger set of parameters is&lt;br /&gt;
created for model effects than for terrain because there is more&lt;br /&gt;
variation possible from the OSG model loaders than from the terrain&lt;br /&gt;
system. The parameters created are: &lt;br /&gt;
&lt;br /&gt;
* material active, ambient, diffuse, specular, emissive, shininess, color mode&lt;br /&gt;
# blend active, source, destination&lt;br /&gt;
# shade-model&lt;br /&gt;
# cull-face&lt;br /&gt;
* rendering-hint&lt;br /&gt;
* texture type, image, filter, wrap-s, wrap-t&lt;br /&gt;
&lt;br /&gt;
== Specifying Custom Effects ==&lt;br /&gt;
You can specify the effects that will be used by FlightGear as the&lt;br /&gt;
base effect when it creates terrain and model effects.&lt;br /&gt;
&lt;br /&gt;
In the terrain materials.xml, an &amp;quot;effect&amp;quot; property specifies the name&lt;br /&gt;
of the model to use.&lt;br /&gt;
&lt;br /&gt;
Material animations will be implemented by creating a new effect&lt;br /&gt;
that inherits from one in a model, overriding the parameters that&lt;br /&gt;
will be animated.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The $FGDATA/Effects directory contains the effects definitions; look there for&lt;br /&gt;
examples. Effects/crop.eff is a good example of a complex effect.&lt;br /&gt;
&lt;br /&gt;
== Application ==&lt;br /&gt;
To apply an effect to a model or part of a model use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;effect&amp;gt;&lt;br /&gt;
		&amp;lt;inherits-from&amp;gt;Effects/light-cone&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
		&amp;lt;object-name&amp;gt;Cone&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;inherits-from&amp;gt; &amp;lt;/inherits-from&amp;gt; contains the path to the effect you want to apply.&lt;br /&gt;
The effect does not need the file extension.&lt;br /&gt;
&lt;br /&gt;
=== Parameters in model file ===&lt;br /&gt;
&lt;br /&gt;
Parameters can be put into the model files effect application as well. But only bool, int, float, string can be used there.&lt;br /&gt;
&lt;br /&gt;
=== Chrome old usage ===&lt;br /&gt;
&lt;br /&gt;
Chrome, although now implemented as an effect, still retains the old method of application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;shader&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;shader&amp;gt;chrome&amp;lt;/shader&amp;gt;&lt;br /&gt;
			&amp;lt;texture&amp;gt;glass_shader.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
			&amp;lt;object-name&amp;gt;windscreen&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in order to maintain backward compatibility.&lt;br /&gt;
&lt;br /&gt;
== Reload effects at runtime ==&lt;br /&gt;
To reload an effect applied in a model xml file (e.g. some parameters and what it enherits from) just go into debug menu and select Reload Model.&lt;br /&gt;
&lt;br /&gt;
To reload the entire effect framework including eff files, go into menu and debug and configure development extensions and reload shaders. This is broken in 2020.1 though, but works in earlier FG versions.&lt;br /&gt;
&lt;br /&gt;
== The xml tags of an effect ==&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
The name of the effect&lt;br /&gt;
&lt;br /&gt;
=== inherits-from ===&lt;br /&gt;
One feature not fully illustrated in the sample below is that&lt;br /&gt;
effects can inherit from each other. The parent effect is listed in&lt;br /&gt;
the &amp;quot;inherits-from&amp;quot; form. The child effect's property tree is&lt;br /&gt;
overlaid over that of the parent. Nodes that have the same name and&lt;br /&gt;
property index -- set by the &amp;quot;n=&amp;quot; attribute in the property tag --&lt;br /&gt;
are recursively merged. Leaf property nodes from the child have&lt;br /&gt;
precedence.  This means that effects that inherit from the example&lt;br /&gt;
effect below could be very short, listing just new&lt;br /&gt;
parameters and adding nothing to the techniques section;&lt;br /&gt;
alternatively, a technique could be altered or customized in a&lt;br /&gt;
child, listing (for example) a different shader program. An example&lt;br /&gt;
showing inheritance Effects/crop.eff, which inherits some if its&lt;br /&gt;
values from Effects/terrain-default.eff.&lt;br /&gt;
&lt;br /&gt;
FlightGear directly uses effects inheritance to assign effects to 3D&lt;br /&gt;
models and terrain. As described below, at runtime small effects are&lt;br /&gt;
created that contain material and texture values in a &amp;quot;parameters&amp;quot;&lt;br /&gt;
section. These effects inherit from another effect which references&lt;br /&gt;
those parameters in its &amp;quot;techniques&amp;quot; section. The derived effect&lt;br /&gt;
overrides any default values that might be in the base effect's&lt;br /&gt;
parameters section.&lt;br /&gt;
&lt;br /&gt;
=== parameters ===&lt;br /&gt;
Custom parameters that controls the effect.&lt;br /&gt;
&lt;br /&gt;
Note that parameters can use the &amp;lt;use&amp;gt; tags to enable properties to specify the values.&lt;br /&gt;
&lt;br /&gt;
=== generate ===&lt;br /&gt;
&lt;br /&gt;
Often shader effects need tangent vectors to work properly. These &lt;br /&gt;
tangent vectors, usually called tangent and binormal, are computed &lt;br /&gt;
on the CPU and given to the shader as vertex attributes. These &lt;br /&gt;
vectors are computed on demand on the geometry using the effect if &lt;br /&gt;
the 'generate' clause is present in the effect file. Exemple :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;generate&amp;gt;&lt;br /&gt;
		&amp;lt;tangent type=&amp;quot;int&amp;quot;&amp;gt;6&amp;lt;/tangent&amp;gt;&lt;br /&gt;
		&amp;lt;binormal type=&amp;quot;int&amp;quot;&amp;gt;7&amp;lt;/binormal&amp;gt;&lt;br /&gt;
		&amp;lt;normal type=&amp;quot;int&amp;quot;&amp;gt;8&amp;lt;/normal&amp;gt;&lt;br /&gt;
	&amp;lt;/generate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.&lt;br /&gt;
The integer value of these subnode is the index of the attribute &lt;br /&gt;
that will hold the value of the vec3 vector.&lt;br /&gt;
&lt;br /&gt;
The generate clause is located under PropertyList in the xml file.&lt;br /&gt;
&lt;br /&gt;
In order to be available for the vertex shader, these data should &lt;br /&gt;
be bound to an attribute in the program clause, like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;program&amp;gt;&lt;br /&gt;
		&amp;lt;vertex-shader&amp;gt;my_vertex_shader&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_tangent_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_binormal_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;7&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
	&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
attribute names are whatever the shader use. The index is the one &lt;br /&gt;
declared in the 'generate' clause. So because generate/tangent has &lt;br /&gt;
value 6 and my_tangent_attribute has index 6, my_tangent_attribute &lt;br /&gt;
holds the tangent value for the vertex.&lt;br /&gt;
&lt;br /&gt;
=== technique ===&lt;br /&gt;
A certain way of rendering this effect. Different pipelines typically have their own techniques.&lt;br /&gt;
&lt;br /&gt;
==== scheme ====&lt;br /&gt;
Since 2020.1, is only usable in Compositor build.&lt;br /&gt;
&lt;br /&gt;
For the compositor ALS pipeline a scheme of als-lightning has to be specified for the technique to be considered for rendering.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;scheme&amp;gt;als-lighting&amp;lt;/scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== predicate ====&lt;br /&gt;
A technique can contain a predicate that describes the OpenGL&lt;br /&gt;
functionality required to support the technique. The first&lt;br /&gt;
technique with a valid predicate in the list of techniques is used&lt;br /&gt;
to set up the graphics state of the effect. A technique with no&lt;br /&gt;
predicate is always assumed to be valid. The predicate is written in a&lt;br /&gt;
little expression language that supports the following primitives:&lt;br /&gt;
&lt;br /&gt;
and, or, equal, less, less-equal&lt;br /&gt;
glversion - returns the version number of OpenGL&lt;br /&gt;
extension-supported - returns true if an OpenGL extension is supported&lt;br /&gt;
property - returns the boolean value of a property&lt;br /&gt;
float-property - returns the float value of a property, useful inside equal, less or less-equal nodes&lt;br /&gt;
shader-language - returns the version of GLSL supported, or 0 if there is none.&lt;br /&gt;
&lt;br /&gt;
The proper way to test whether to enable a shader-based technique is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;predicate&amp;gt;&lt;br /&gt;
	  &amp;lt;and&amp;gt;&lt;br /&gt;
		&amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
		&amp;lt;less-equal&amp;gt;&lt;br /&gt;
		  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
		  &amp;lt;shader-language/&amp;gt;&lt;br /&gt;
		&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;/and&amp;gt;&lt;br /&gt;
	&amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a property set by the user to indicate what is the level &lt;br /&gt;
of quality desired. This level of quality can be checked in the predicate&lt;br /&gt;
like this :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;predicate&amp;gt;&lt;br /&gt;
      &amp;lt;and&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
	&amp;lt;less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
	  &amp;lt;float-property&amp;gt;/sim/rendering/quality-level&amp;lt;/float-property&amp;gt;&lt;br /&gt;
	&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	&amp;lt;!-- other predicate conditions --&amp;gt;&lt;br /&gt;
      &amp;lt;/and&amp;gt;&lt;br /&gt;
    &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
The range of /sim/rendering/quality-level is [0..5]&lt;br /&gt;
 * 2.0 is the threshold for relief mapping effects,&lt;br /&gt;
 * 4.0 is the threshold for geometry shader usage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;predicate&amp;gt;&lt;br /&gt;
		&amp;lt;and&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/quality-level&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/model&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;or&amp;gt;&lt;br /&gt;
			&amp;lt;less-equal&amp;gt;&lt;br /&gt;
			  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
			  &amp;lt;glversion/&amp;gt;&lt;br /&gt;
			&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
			&amp;lt;and&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shader_objects&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shading_language_100&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_vertex_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_fragment_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			&amp;lt;/and&amp;gt;&lt;br /&gt;
		  &amp;lt;/or&amp;gt;&lt;br /&gt;
		&amp;lt;/and&amp;gt;&lt;br /&gt;
	  &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== pass ====&lt;br /&gt;
A technique can consist of several passes. A pass is basically an Open&lt;br /&gt;
Scene Graph StateSet. Ultimately all OpenGL and OSG modes and state&lt;br /&gt;
attributes  will be accessable in techniques. State attributes -- that&lt;br /&gt;
is, technique properties that have children and are not just boolean&lt;br /&gt;
modes -- have an &amp;lt;active&amp;gt; parameter which enables or disables the&lt;br /&gt;
attribute. In this way a technique can declare parameters it needs,&lt;br /&gt;
but not enable the attribute at all if it is not needed; the decision&lt;br /&gt;
can be based on a parameter in the parameters section of the&lt;br /&gt;
effect. For example, effects that support transparent and opaque&lt;br /&gt;
geometry could have as part of a technique:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;blend&amp;gt;&lt;br /&gt;
		&amp;lt;active&amp;gt;&amp;lt;use&amp;gt;blend/active&amp;lt;/use&amp;gt;&amp;lt;/active&amp;gt;&lt;br /&gt;
		&amp;lt;source&amp;gt;src-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
		&amp;lt;destination&amp;gt;one-minus-src-alpha&amp;lt;/destination&amp;gt;&lt;br /&gt;
	  &amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if the blend/active parameter is true blending will be activated&lt;br /&gt;
using the usual blending equation; otherwise blending is disabled.&lt;br /&gt;
&lt;br /&gt;
Values are assigned to technique properties in several ways:&lt;br /&gt;
&lt;br /&gt;
	* They can appear directly in the techniques section as a&lt;br /&gt;
		constant. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;uniform&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;ColorsTex&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;sampler-1d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
		&amp;lt;/uniform&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		* The name of a property in the parameters section can be&lt;br /&gt;
		referenced using a &amp;quot;use&amp;quot; clause. For example, in the technique&lt;br /&gt;
		section:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;material&amp;gt;&lt;br /&gt;
			&amp;lt;ambient&amp;gt;&amp;lt;use&amp;gt;material/ambient&amp;lt;/use&amp;gt;&amp;lt;/ambient&amp;gt;&lt;br /&gt;
		&amp;lt;/material&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		Then, in the parameters section of the effect:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;material&amp;gt;&lt;br /&gt;
				&amp;lt;ambient type=&amp;quot;vec4d&amp;quot;&amp;gt;0.2 0.2 0.2 1.0&amp;lt;/ambient&amp;gt;&lt;br /&gt;
			&amp;lt;/material&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		It's worth pointing out that the &amp;quot;material&amp;quot; property in a&lt;br /&gt;
		technique specifies part of OpenGL's state, whereas &amp;quot;material&amp;quot;&lt;br /&gt;
		in the parameters section is just a name, part of a&lt;br /&gt;
		hierarchical namespace.&lt;br /&gt;
&lt;br /&gt;
		* A property in the parameters section doesn't need to contain&lt;br /&gt;
		a constant value; it can also contain a &amp;quot;use&amp;quot; property. Here&lt;br /&gt;
		the value of the use clause is the name of a node in an&lt;br /&gt;
		external property tree which will be used as the source of a&lt;br /&gt;
		value. If the name begins with '/', the node is in&lt;br /&gt;
		FlightGear's global property tree; otherwise, it is in a local&lt;br /&gt;
		property tree, usually belonging to a model [NOT IMPLEMENTED&lt;br /&gt;
		YET]. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;chrome-light&amp;gt;&amp;lt;use&amp;gt;/rendering/scene/chrome-light&amp;lt;/use&amp;gt;&amp;lt;/chrome-light&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		The type is determined by what is expected by the technique&lt;br /&gt;
		attribute that will ultimately receive the value. [There is&lt;br /&gt;
		no way to get vector values out of the main property system&lt;br /&gt;
		yet; this will be fixed shortly.] Values that are declared&lt;br /&gt;
		this way are dynamically updated if the property node&lt;br /&gt;
		changes.&lt;br /&gt;
&lt;br /&gt;
===== lighting =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== material =====&lt;br /&gt;
children: active, ambient, ambient-front, ambient-back, diffuse,&lt;br /&gt;
		 diffuse-front, diffuse-back, specular, specular-front,&lt;br /&gt;
		 specular-back, emissive, emissive-front, emissive-back, shininess,&lt;br /&gt;
		 shininess-front, shininess-back, color-mode&lt;br /&gt;
&lt;br /&gt;
===== blend =====&lt;br /&gt;
Children: active, source, destination, source-rgb, source-alpha, destination-rgb, destination-alpha&lt;br /&gt;
&lt;br /&gt;
Children values: dst-alpha, dst-color, one, one-minus-dst-alpha, one-minus-dst-color, one-minus-src-alpha, one-minus-src-color, src-alpha, src-alpha-saturate, src-color, constant-color, one-minus-constant-color, constant-alpha, one-minus-constant-alpha, zero&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;&lt;br /&gt;
                        &amp;lt;active&amp;gt;true&amp;lt;/active&amp;gt;&lt;br /&gt;
                        &amp;lt;source&amp;gt;one-minus-dst-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
			&amp;lt;destination&amp;gt;src-alpha-saturate&amp;lt;/destination&amp;gt;&lt;br /&gt;
		&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== blend (simple) =====&lt;br /&gt;
A blend tag with 0 will do nothing.&lt;br /&gt;
A blend tag with 1 will do the same as source-alpha: one-minus-dst-alpha, in other words it will enable z transparency using alpha from the fragment shader.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;1&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== shade-model =====&lt;br /&gt;
flat or smooth&lt;br /&gt;
&lt;br /&gt;
===== cull-face =====&lt;br /&gt;
front, back, front-back, off&lt;br /&gt;
&lt;br /&gt;
===== texture-unit =====&lt;br /&gt;
unit: integer denoting which unit it is&lt;br /&gt;
&lt;br /&gt;
image: the texture path&lt;br /&gt;
&lt;br /&gt;
images: multiple texture paths&lt;br /&gt;
&lt;br /&gt;
type: 2d, noise, cubemap, 3d (3d was added in 2020.1 and is used for layers of 2d textures defining a volumetric 3d texture)&lt;br /&gt;
&lt;br /&gt;
filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
&lt;br /&gt;
mag-filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
&lt;br /&gt;
wrap: repeat, clamp-to-edge, clamp-to-border, clamp, mirror&lt;br /&gt;
&lt;br /&gt;
internal-format: normalized&lt;br /&gt;
&lt;br /&gt;
environment: mode, color&lt;br /&gt;
:mode: add,blend,decal,modulate,replace&lt;br /&gt;
:color: rgba&lt;br /&gt;
&lt;br /&gt;
texenv-combine: replace, modulate, add, add-signed, interpolate, subtract, dot3-rgb, dot3-rgba&lt;br /&gt;
&lt;br /&gt;
texenv-combine: combine-rgb, combine-alpha, source0-rgb, source1-rgb, source2-rgb, source0-alpha, source1-alpha,source2-alpha,operand0-rgb,operand1-rgb,operand2-rgb,operand0-alpha,operand1-alpha,operand2-alpha,scale-rgb,scale-alpha&lt;br /&gt;
&lt;br /&gt;
point-sprite: true, false&lt;br /&gt;
&lt;br /&gt;
mipmap-control functions: auto, average, sum, product, min, max&lt;br /&gt;
&lt;br /&gt;
texgen:&lt;br /&gt;
:mode: object-linear, eye-linear, sphere-map, normal-map, reflection-map&lt;br /&gt;
:planes: s, t, r, q as doubles&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;texture-unit&amp;gt;&lt;br /&gt;
                        &amp;lt;unit&amp;gt;3&amp;lt;/unit&amp;gt;&lt;br /&gt;
			&amp;lt;image&amp;gt;Textures/Terrain/void.png&amp;lt;/image&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
                        &amp;lt;mag-filter&amp;gt;linear-mipmap-linear&amp;lt;/mag-filter&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
                        &amp;lt;wrap-r&amp;gt;repeat&amp;lt;/wrap-r&amp;gt;&lt;br /&gt;
			&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
                        &amp;lt;mipmap-control&amp;gt;&lt;br /&gt;
                            &amp;lt;function-r&amp;gt;average&amp;lt;/function-r&amp;gt;&lt;br /&gt;
			    &amp;lt;function-g&amp;gt;min&amp;lt;/function-g&amp;gt;&lt;br /&gt;
                            &amp;lt;function-b&amp;gt;sum&amp;lt;/function-b&amp;gt;&lt;br /&gt;
			    &amp;lt;function-a&amp;gt;product&amp;lt;/function-a&amp;gt;&lt;br /&gt;
                        &amp;lt;/mipmap-control&amp;gt;&lt;br /&gt;
                        &amp;lt;environment&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;decal&amp;lt;/mode&amp;gt; &lt;br /&gt;
                            &amp;lt;color&amp;gt;0.0 0.1 0.6 1.0&amp;lt;/color&amp;gt;&lt;br /&gt;
                        &amp;lt;/environment&amp;gt;&lt;br /&gt;
                        &amp;lt;point-sprite&amp;gt;true&amp;lt;/point-sprite&amp;gt;&lt;br /&gt;
                        &amp;lt;texenv-combine&amp;gt;operand0-rgb&amp;lt;/texenv-combine&amp;gt;&lt;br /&gt;
                        &amp;lt;texgen&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;S&amp;lt;/mode&amp;gt;&lt;br /&gt;
                            &amp;lt;planes&amp;gt;0.075, 0.0, 0.0, 0.5&amp;lt;/planes&amp;gt;&lt;br /&gt;
                        &amp;lt;/texgen&amp;gt;&lt;br /&gt;
		&amp;lt;/texture-unit&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-two-side =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== polygon-mode =====&lt;br /&gt;
children: front, back&lt;br /&gt;
&lt;br /&gt;
Valid values:  fill, line, point&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-point-size =====&lt;br /&gt;
true, false&lt;br /&gt;
&lt;br /&gt;
===== uniform =====&lt;br /&gt;
Data accessible by shaders.&lt;br /&gt;
&lt;br /&gt;
name: the name&lt;br /&gt;
&lt;br /&gt;
type: bool, int, float, float-vec3, float-vec4, sampler-1d, sampler-2d, sampler-3d, sampler-1d-shadow, sampler-2d-shadow, sampler-cube&lt;br /&gt;
&lt;br /&gt;
===== alpha-test =====&lt;br /&gt;
&lt;br /&gt;
active: true, false&lt;br /&gt;
&lt;br /&gt;
comparison: never, less, equal, lequal, greater, notequal, gequal, always&lt;br /&gt;
&lt;br /&gt;
reference: 0 to 1&lt;br /&gt;
&lt;br /&gt;
===== render-bin =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
bin-number: This is an integer defining the order stuff will be rendered in, it can be negative also.&lt;br /&gt;
&lt;br /&gt;
bin-name: RenderBin, DepthSortedBin&lt;br /&gt;
&lt;br /&gt;
===== rendering-hint =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
default, opaque, transparent&lt;br /&gt;
&lt;br /&gt;
This basically just sets Renderbin:&lt;br /&gt;
&lt;br /&gt;
opaque = bin 10, depthsortedbin&lt;br /&gt;
&lt;br /&gt;
transparent = bin 0, renderbin&lt;br /&gt;
&lt;br /&gt;
default = inherit renderbin details from parent node&lt;br /&gt;
&lt;br /&gt;
===== program =====&lt;br /&gt;
* vertex-shader&lt;br /&gt;
* geometry-shader&lt;br /&gt;
* fragment-shader&lt;br /&gt;
* attribute&lt;br /&gt;
* geometry-vertices-out: integer, max number of vertices emitted by geometry shader&lt;br /&gt;
* geometry-input-type: points, lines, lines-adjacency, triangles, triangles-adjacency&lt;br /&gt;
* geometry-output-type: points, line-strip, triangle-strip&lt;br /&gt;
* uniform-block-binding: has name and index (since 2020.1)&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example for clustered lightning in compositor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;fragment-shader n=&amp;quot;3&amp;quot;&amp;gt;Shaders/ALS/clustered-include.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;PointLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;5&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
		                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;SpotLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See this page for more about shaders: [[Howto:Shader programming in FlightGear]]&lt;br /&gt;
&lt;br /&gt;
== Uniforms passed to shaders outside the xml effect framework ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Type&lt;br /&gt;
!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix used to transform from world to view space. Same as osg_ViewMatrix, but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix inverse used to transform from view to world space. Same as osg_ViewMatrixInverse but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ProjectionMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, projection matrix inverse&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionCart&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in cartesian coordinates&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionGeod&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in geodesic coordinates (longitude in radians, latitude in radians, elevation in meters)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunAmbientColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDiffuseColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunSpecularColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDirection&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogDensity&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowDistances&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_DepthInColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Tells if the depth is stored in a depth texture or a color texture&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_Planes&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Used to convert the value of the depth buffer to a depth that can be used to compute the eye space position of the fragment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_BufferSize&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Dimensions of the buffer, used to convert gl_FragCoord into the range [0..1][0..1]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from world to view space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from view to world space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_SimulationTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_DeltaFrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=37364|title=Application of effects}} - Testing which kind of groups an effect can be applied to and when&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124647</id>
		<title>Effect framework</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124647"/>
		<updated>2020-05-12T15:30:43Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* texture-unit */ more details&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
The effect framework as per version 2020.1&lt;br /&gt;
&lt;br /&gt;
Effects describe the graphical appearance of 3D objects and scenery in&lt;br /&gt;
FlightGear. The main motivation for effects is to support OpenGL&lt;br /&gt;
shaders and to provide different implementations for graphics hardware&lt;br /&gt;
of varying capabilities. Effects are similar to DirectX effects files&lt;br /&gt;
and Ogre3D material scripts.&lt;br /&gt;
&lt;br /&gt;
An effect is a property list. The property list syntax is extended&lt;br /&gt;
with new &amp;quot;vec3d&amp;quot; and &amp;quot;vec4d&amp;quot; types to support common computer graphics&lt;br /&gt;
values. Effects are read from files with a &amp;quot;.eff&amp;quot; extension or can be&lt;br /&gt;
created on-the-fly by FlightGear at runtime.  An effect consists of a&lt;br /&gt;
&amp;quot;parameters&amp;quot; section followed by &amp;quot;technique&amp;quot; descriptions.  The&lt;br /&gt;
&amp;quot;parameters&amp;quot; section is a tree of values that describe, abstractly,&lt;br /&gt;
the graphical characteristics of objects that use the effect. Techniques&lt;br /&gt;
refer to these parameters and use them to set OpenGL state or to set&lt;br /&gt;
parameters for shader programs. The names of properties in the&lt;br /&gt;
parameter section can be whatever the effects author chooses, although&lt;br /&gt;
some standard parameters  are set by FlightGear itself. On the other&lt;br /&gt;
hand, the properties in the techniques section are all defined by the&lt;br /&gt;
FlightGear. &lt;br /&gt;
&lt;br /&gt;
== Default Effects in Terrain Materials and Models ==&lt;br /&gt;
Effects for terrain work in this way: for each material type in&lt;br /&gt;
materials.xml an effect is created that inherits from a single default&lt;br /&gt;
terrain effect, Effects/terrain-default.eff. The parameters section of&lt;br /&gt;
the effect is filled in using the ambient, diffuse, specular,&lt;br /&gt;
emissive, shininess, and transparent fields of the material. The&lt;br /&gt;
parameters image, filter, wrap-s, and wrap-t are also initialized from&lt;br /&gt;
the material xml. Seperate effects are created for each texture&lt;br /&gt;
variant of a material.&lt;br /&gt;
&lt;br /&gt;
Model effects are created by walking the OpenSceneGraph scene graph&lt;br /&gt;
for a model and replacing nodes (osg::Geode) that have state sets with&lt;br /&gt;
node that uses an effect instead. Again, a small effect is created&lt;br /&gt;
with parameters extracted from OSG objects; this effect inherits, by&lt;br /&gt;
default, from Effects/model-default.eff. A larger set of parameters is&lt;br /&gt;
created for model effects than for terrain because there is more&lt;br /&gt;
variation possible from the OSG model loaders than from the terrain&lt;br /&gt;
system. The parameters created are: &lt;br /&gt;
&lt;br /&gt;
* material active, ambient, diffuse, specular, emissive, shininess, color mode&lt;br /&gt;
# blend active, source, destination&lt;br /&gt;
# shade-model&lt;br /&gt;
# cull-face&lt;br /&gt;
* rendering-hint&lt;br /&gt;
* texture type, image, filter, wrap-s, wrap-t&lt;br /&gt;
&lt;br /&gt;
== Specifying Custom Effects ==&lt;br /&gt;
You can specify the effects that will be used by FlightGear as the&lt;br /&gt;
base effect when it creates terrain and model effects.&lt;br /&gt;
&lt;br /&gt;
In the terrain materials.xml, an &amp;quot;effect&amp;quot; property specifies the name&lt;br /&gt;
of the model to use.&lt;br /&gt;
&lt;br /&gt;
Material animations will be implemented by creating a new effect&lt;br /&gt;
that inherits from one in a model, overriding the parameters that&lt;br /&gt;
will be animated.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The $FGDATA/Effects directory contains the effects definitions; look there for&lt;br /&gt;
examples. Effects/crop.eff is a good example of a complex effect.&lt;br /&gt;
&lt;br /&gt;
== Application ==&lt;br /&gt;
To apply an effect to a model or part of a model use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;effect&amp;gt;&lt;br /&gt;
		&amp;lt;inherits-from&amp;gt;Effects/light-cone&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
		&amp;lt;object-name&amp;gt;Cone&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;inherits-from&amp;gt; &amp;lt;/inherits-from&amp;gt; contains the path to the effect you want to apply.&lt;br /&gt;
The effect does not need the file extension.&lt;br /&gt;
&lt;br /&gt;
=== Parameters in model file ===&lt;br /&gt;
&lt;br /&gt;
Parameters can be put into the model files effect application as well. But only bool, int, float, string can be used there.&lt;br /&gt;
&lt;br /&gt;
=== Chrome old usage ===&lt;br /&gt;
&lt;br /&gt;
Chrome, although now implemented as an effect, still retains the old method of application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;shader&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;shader&amp;gt;chrome&amp;lt;/shader&amp;gt;&lt;br /&gt;
			&amp;lt;texture&amp;gt;glass_shader.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
			&amp;lt;object-name&amp;gt;windscreen&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in order to maintain backward compatibility.&lt;br /&gt;
&lt;br /&gt;
== Reload effects at runtime ==&lt;br /&gt;
To reload an effect applied in a model xml file (e.g. some parameters and what it enherits from) just go into debug menu and select Reload Model.&lt;br /&gt;
&lt;br /&gt;
To reload the entire effect framework including eff files, go into menu and debug and configure development extensions and reload shaders. This is broken in 2020.1 though, but works in earlier FG versions.&lt;br /&gt;
&lt;br /&gt;
== The xml tags of an effect ==&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
The name of the effect&lt;br /&gt;
&lt;br /&gt;
=== inherits-from ===&lt;br /&gt;
One feature not fully illustrated in the sample below is that&lt;br /&gt;
effects can inherit from each other. The parent effect is listed in&lt;br /&gt;
the &amp;quot;inherits-from&amp;quot; form. The child effect's property tree is&lt;br /&gt;
overlaid over that of the parent. Nodes that have the same name and&lt;br /&gt;
property index -- set by the &amp;quot;n=&amp;quot; attribute in the property tag --&lt;br /&gt;
are recursively merged. Leaf property nodes from the child have&lt;br /&gt;
precedence.  This means that effects that inherit from the example&lt;br /&gt;
effect below could be very short, listing just new&lt;br /&gt;
parameters and adding nothing to the techniques section;&lt;br /&gt;
alternatively, a technique could be altered or customized in a&lt;br /&gt;
child, listing (for example) a different shader program. An example&lt;br /&gt;
showing inheritance Effects/crop.eff, which inherits some if its&lt;br /&gt;
values from Effects/terrain-default.eff.&lt;br /&gt;
&lt;br /&gt;
FlightGear directly uses effects inheritance to assign effects to 3D&lt;br /&gt;
models and terrain. As described below, at runtime small effects are&lt;br /&gt;
created that contain material and texture values in a &amp;quot;parameters&amp;quot;&lt;br /&gt;
section. These effects inherit from another effect which references&lt;br /&gt;
those parameters in its &amp;quot;techniques&amp;quot; section. The derived effect&lt;br /&gt;
overrides any default values that might be in the base effect's&lt;br /&gt;
parameters section.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
Custom parameters that controls the effect.&lt;br /&gt;
&lt;br /&gt;
Note that parameters can use the &amp;lt;use&amp;gt; tags to enable properties to specify the values.&lt;br /&gt;
&lt;br /&gt;
=== Generate ===&lt;br /&gt;
&lt;br /&gt;
Often shader effects need tangent vectors to work properly. These &lt;br /&gt;
tangent vectors, usually called tangent and binormal, are computed &lt;br /&gt;
on the CPU and given to the shader as vertex attributes. These &lt;br /&gt;
vectors are computed on demand on the geometry using the effect if &lt;br /&gt;
the 'generate' clause is present in the effect file. Exemple :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;generate&amp;gt;&lt;br /&gt;
		&amp;lt;tangent type=&amp;quot;int&amp;quot;&amp;gt;6&amp;lt;/tangent&amp;gt;&lt;br /&gt;
		&amp;lt;binormal type=&amp;quot;int&amp;quot;&amp;gt;7&amp;lt;/binormal&amp;gt;&lt;br /&gt;
		&amp;lt;normal type=&amp;quot;int&amp;quot;&amp;gt;8&amp;lt;/normal&amp;gt;&lt;br /&gt;
	&amp;lt;/generate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.&lt;br /&gt;
The integer value of these subnode is the index of the attribute &lt;br /&gt;
that will hold the value of the vec3 vector.&lt;br /&gt;
&lt;br /&gt;
The generate clause is located under PropertyList in the xml file.&lt;br /&gt;
&lt;br /&gt;
In order to be available for the vertex shader, these data should &lt;br /&gt;
be bound to an attribute in the program clause, like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;program&amp;gt;&lt;br /&gt;
		&amp;lt;vertex-shader&amp;gt;my_vertex_shader&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_tangent_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_binormal_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;7&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
	&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
attribute names are whatever the shader use. The index is the one &lt;br /&gt;
declared in the 'generate' clause. So because generate/tangent has &lt;br /&gt;
value 6 and my_tangent_attribute has index 6, my_tangent_attribute &lt;br /&gt;
holds the tangent value for the vertex.&lt;br /&gt;
&lt;br /&gt;
=== technique ===&lt;br /&gt;
A certain way of rendering this effect. Different pipelines typically have their own techniques.&lt;br /&gt;
&lt;br /&gt;
==== scheme ====&lt;br /&gt;
Since 2020.1, is only usable in Compositor build.&lt;br /&gt;
&lt;br /&gt;
For the compositor ALS pipeline a scheme of als-lightning has to be specified for the technique to be considered for rendering.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;scheme&amp;gt;als-lighting&amp;lt;/scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== predicate ====&lt;br /&gt;
A technique can contain a predicate that describes the OpenGL&lt;br /&gt;
functionality required to support the technique. The first&lt;br /&gt;
technique with a valid predicate in the list of techniques is used&lt;br /&gt;
to set up the graphics state of the effect. A technique with no&lt;br /&gt;
predicate is always assumed to be valid. The predicate is written in a&lt;br /&gt;
little expression language that supports the following primitives:&lt;br /&gt;
&lt;br /&gt;
and, or, equal, less, less-equal&lt;br /&gt;
glversion - returns the version number of OpenGL&lt;br /&gt;
extension-supported - returns true if an OpenGL extension is supported&lt;br /&gt;
property - returns the boolean value of a property&lt;br /&gt;
float-property - returns the float value of a property, useful inside equal, less or less-equal nodes&lt;br /&gt;
shader-language - returns the version of GLSL supported, or 0 if there is none.&lt;br /&gt;
&lt;br /&gt;
The proper way to test whether to enable a shader-based technique is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;predicate&amp;gt;&lt;br /&gt;
	  &amp;lt;and&amp;gt;&lt;br /&gt;
		&amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
		&amp;lt;less-equal&amp;gt;&lt;br /&gt;
		  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
		  &amp;lt;shader-language/&amp;gt;&lt;br /&gt;
		&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;/and&amp;gt;&lt;br /&gt;
	&amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a property set by the user to indicate what is the level &lt;br /&gt;
of quality desired. This level of quality can be checked in the predicate&lt;br /&gt;
like this :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;predicate&amp;gt;&lt;br /&gt;
      &amp;lt;and&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
	&amp;lt;less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
	  &amp;lt;float-property&amp;gt;/sim/rendering/quality-level&amp;lt;/float-property&amp;gt;&lt;br /&gt;
	&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	&amp;lt;!-- other predicate conditions --&amp;gt;&lt;br /&gt;
      &amp;lt;/and&amp;gt;&lt;br /&gt;
    &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
The range of /sim/rendering/quality-level is [0..5]&lt;br /&gt;
 * 2.0 is the threshold for relief mapping effects,&lt;br /&gt;
 * 4.0 is the threshold for geometry shader usage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;predicate&amp;gt;&lt;br /&gt;
		&amp;lt;and&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/quality-level&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/model&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;or&amp;gt;&lt;br /&gt;
			&amp;lt;less-equal&amp;gt;&lt;br /&gt;
			  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
			  &amp;lt;glversion/&amp;gt;&lt;br /&gt;
			&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
			&amp;lt;and&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shader_objects&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shading_language_100&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_vertex_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_fragment_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			&amp;lt;/and&amp;gt;&lt;br /&gt;
		  &amp;lt;/or&amp;gt;&lt;br /&gt;
		&amp;lt;/and&amp;gt;&lt;br /&gt;
	  &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== pass ====&lt;br /&gt;
A technique can consist of several passes. A pass is basically an Open&lt;br /&gt;
Scene Graph StateSet. Ultimately all OpenGL and OSG modes and state&lt;br /&gt;
attributes  will be accessable in techniques. State attributes -- that&lt;br /&gt;
is, technique properties that have children and are not just boolean&lt;br /&gt;
modes -- have an &amp;lt;active&amp;gt; parameter which enables or disables the&lt;br /&gt;
attribute. In this way a technique can declare parameters it needs,&lt;br /&gt;
but not enable the attribute at all if it is not needed; the decision&lt;br /&gt;
can be based on a parameter in the parameters section of the&lt;br /&gt;
effect. For example, effects that support transparent and opaque&lt;br /&gt;
geometry could have as part of a technique:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;blend&amp;gt;&lt;br /&gt;
		&amp;lt;active&amp;gt;&amp;lt;use&amp;gt;blend/active&amp;lt;/use&amp;gt;&amp;lt;/active&amp;gt;&lt;br /&gt;
		&amp;lt;source&amp;gt;src-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
		&amp;lt;destination&amp;gt;one-minus-src-alpha&amp;lt;/destination&amp;gt;&lt;br /&gt;
	  &amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if the blend/active parameter is true blending will be activated&lt;br /&gt;
using the usual blending equation; otherwise blending is disabled.&lt;br /&gt;
&lt;br /&gt;
Values are assigned to technique properties in several ways:&lt;br /&gt;
&lt;br /&gt;
	* They can appear directly in the techniques section as a&lt;br /&gt;
		constant. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;uniform&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;ColorsTex&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;sampler-1d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
		&amp;lt;/uniform&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		* The name of a property in the parameters section can be&lt;br /&gt;
		referenced using a &amp;quot;use&amp;quot; clause. For example, in the technique&lt;br /&gt;
		section:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;material&amp;gt;&lt;br /&gt;
			&amp;lt;ambient&amp;gt;&amp;lt;use&amp;gt;material/ambient&amp;lt;/use&amp;gt;&amp;lt;/ambient&amp;gt;&lt;br /&gt;
		&amp;lt;/material&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		Then, in the parameters section of the effect:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;material&amp;gt;&lt;br /&gt;
				&amp;lt;ambient type=&amp;quot;vec4d&amp;quot;&amp;gt;0.2 0.2 0.2 1.0&amp;lt;/ambient&amp;gt;&lt;br /&gt;
			&amp;lt;/material&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		It's worth pointing out that the &amp;quot;material&amp;quot; property in a&lt;br /&gt;
		technique specifies part of OpenGL's state, whereas &amp;quot;material&amp;quot;&lt;br /&gt;
		in the parameters section is just a name, part of a&lt;br /&gt;
		hierarchical namespace.&lt;br /&gt;
&lt;br /&gt;
		* A property in the parameters section doesn't need to contain&lt;br /&gt;
		a constant value; it can also contain a &amp;quot;use&amp;quot; property. Here&lt;br /&gt;
		the value of the use clause is the name of a node in an&lt;br /&gt;
		external property tree which will be used as the source of a&lt;br /&gt;
		value. If the name begins with '/', the node is in&lt;br /&gt;
		FlightGear's global property tree; otherwise, it is in a local&lt;br /&gt;
		property tree, usually belonging to a model [NOT IMPLEMENTED&lt;br /&gt;
		YET]. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;chrome-light&amp;gt;&amp;lt;use&amp;gt;/rendering/scene/chrome-light&amp;lt;/use&amp;gt;&amp;lt;/chrome-light&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		The type is determined by what is expected by the technique&lt;br /&gt;
		attribute that will ultimately receive the value. [There is&lt;br /&gt;
		no way to get vector values out of the main property system&lt;br /&gt;
		yet; this will be fixed shortly.] Values that are declared&lt;br /&gt;
		this way are dynamically updated if the property node&lt;br /&gt;
		changes.&lt;br /&gt;
&lt;br /&gt;
===== lighting =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== material =====&lt;br /&gt;
children: active, ambient, ambient-front, ambient-back, diffuse,&lt;br /&gt;
		 diffuse-front, diffuse-back, specular, specular-front,&lt;br /&gt;
		 specular-back, emissive, emissive-front, emissive-back, shininess,&lt;br /&gt;
		 shininess-front, shininess-back, color-mode&lt;br /&gt;
&lt;br /&gt;
===== blend =====&lt;br /&gt;
Children: active, source, destination, source-rgb, source-alpha, destination-rgb, destination-alpha&lt;br /&gt;
&lt;br /&gt;
Children values: dst-alpha, dst-color, one, one-minus-dst-alpha, one-minus-dst-color, one-minus-src-alpha, one-minus-src-color, src-alpha, src-alpha-saturate, src-color, constant-color, one-minus-constant-color, constant-alpha, one-minus-constant-alpha, zero&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;&lt;br /&gt;
                        &amp;lt;active&amp;gt;true&amp;lt;/active&amp;gt;&lt;br /&gt;
                        &amp;lt;source&amp;gt;one-minus-dst-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
			&amp;lt;destination&amp;gt;src-alpha-saturate&amp;lt;/destination&amp;gt;&lt;br /&gt;
		&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== blend (simple) =====&lt;br /&gt;
A blend tag with 0 will do nothing.&lt;br /&gt;
A blend tag with 1 will do the same as source-alpha: one-minus-dst-alpha, in other words it will enable z transparency using alpha from the fragment shader.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;1&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== shade-model =====&lt;br /&gt;
flat or smooth&lt;br /&gt;
&lt;br /&gt;
===== cull-face =====&lt;br /&gt;
front, back, front-back, off&lt;br /&gt;
&lt;br /&gt;
===== texture-unit =====&lt;br /&gt;
unit: integer denoting which unit it is&lt;br /&gt;
&lt;br /&gt;
image: the texture path&lt;br /&gt;
&lt;br /&gt;
images: multiple texture paths&lt;br /&gt;
&lt;br /&gt;
type: 2d, noise, cubemap, 3d (3d was added in 2020.1 and is used for layers of 2d textures defining a volumetric 3d texture)&lt;br /&gt;
&lt;br /&gt;
filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
&lt;br /&gt;
mag-filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
&lt;br /&gt;
wrap: repeat, clamp-to-edge, clamp-to-border, clamp, mirror&lt;br /&gt;
&lt;br /&gt;
internal-format: normalized&lt;br /&gt;
&lt;br /&gt;
environment: mode, color&lt;br /&gt;
:mode: add,blend,decal,modulate,replace&lt;br /&gt;
:color: rgba&lt;br /&gt;
&lt;br /&gt;
texenv-combine: replace, modulate, add, add-signed, interpolate, subtract, dot3-rgb, dot3-rgba&lt;br /&gt;
&lt;br /&gt;
texenv-combine: combine-rgb, combine-alpha, source0-rgb, source1-rgb, source2-rgb, source0-alpha, source1-alpha,source2-alpha,operand0-rgb,operand1-rgb,operand2-rgb,operand0-alpha,operand1-alpha,operand2-alpha,scale-rgb,scale-alpha&lt;br /&gt;
&lt;br /&gt;
point-sprite: true, false&lt;br /&gt;
&lt;br /&gt;
mipmap-control functions: auto, average, sum, product, min, max&lt;br /&gt;
&lt;br /&gt;
texgen:&lt;br /&gt;
:mode: object-linear, eye-linear, sphere-map, normal-map, reflection-map&lt;br /&gt;
:planes: s, t, r, q as doubles&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;texture-unit&amp;gt;&lt;br /&gt;
                        &amp;lt;unit&amp;gt;3&amp;lt;/unit&amp;gt;&lt;br /&gt;
			&amp;lt;image&amp;gt;Textures/Terrain/void.png&amp;lt;/image&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
                        &amp;lt;mag-filter&amp;gt;linear-mipmap-linear&amp;lt;/mag-filter&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
                        &amp;lt;wrap-r&amp;gt;repeat&amp;lt;/wrap-r&amp;gt;&lt;br /&gt;
			&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
                        &amp;lt;mipmap-control&amp;gt;&lt;br /&gt;
                            &amp;lt;function-r&amp;gt;average&amp;lt;/function-r&amp;gt;&lt;br /&gt;
			    &amp;lt;function-g&amp;gt;min&amp;lt;/function-g&amp;gt;&lt;br /&gt;
                            &amp;lt;function-b&amp;gt;sum&amp;lt;/function-b&amp;gt;&lt;br /&gt;
			    &amp;lt;function-a&amp;gt;product&amp;lt;/function-a&amp;gt;&lt;br /&gt;
                        &amp;lt;/mipmap-control&amp;gt;&lt;br /&gt;
                        &amp;lt;environment&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;decal&amp;lt;/mode&amp;gt; &lt;br /&gt;
                            &amp;lt;color&amp;gt;0.0 0.1 0.6 1.0&amp;lt;/color&amp;gt;&lt;br /&gt;
                        &amp;lt;/environment&amp;gt;&lt;br /&gt;
                        &amp;lt;point-sprite&amp;gt;true&amp;lt;/point-sprite&amp;gt;&lt;br /&gt;
                        &amp;lt;texenv-combine&amp;gt;operand0-rgb&amp;lt;/texenv-combine&amp;gt;&lt;br /&gt;
                        &amp;lt;texgen&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;S&amp;lt;/mode&amp;gt;&lt;br /&gt;
                            &amp;lt;planes&amp;gt;0.075, 0.0, 0.0, 0.5&amp;lt;/planes&amp;gt;&lt;br /&gt;
                        &amp;lt;/texgen&amp;gt;&lt;br /&gt;
		&amp;lt;/texture-unit&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-two-side =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== polygon-mode =====&lt;br /&gt;
children: front, back&lt;br /&gt;
&lt;br /&gt;
Valid values:  fill, line, point&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-point-size =====&lt;br /&gt;
true, false&lt;br /&gt;
&lt;br /&gt;
===== uniform =====&lt;br /&gt;
Data accessible by shaders.&lt;br /&gt;
&lt;br /&gt;
name: the name&lt;br /&gt;
&lt;br /&gt;
type: bool, int, float, float-vec3, float-vec4, sampler-1d, sampler-2d, sampler-3d, sampler-1d-shadow, sampler-2d-shadow, sampler-cube&lt;br /&gt;
&lt;br /&gt;
===== alpha-test =====&lt;br /&gt;
&lt;br /&gt;
active: true, false&lt;br /&gt;
&lt;br /&gt;
comparison: never, less, equal, lequal, greater, notequal, gequal, always&lt;br /&gt;
&lt;br /&gt;
reference: 0 to 1&lt;br /&gt;
&lt;br /&gt;
===== render-bin =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
bin-number: This is an integer defining the order stuff will be rendered in, it can be negative also.&lt;br /&gt;
&lt;br /&gt;
bin-name: RenderBin, DepthSortedBin&lt;br /&gt;
&lt;br /&gt;
===== rendering-hint =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
default, opaque, transparent&lt;br /&gt;
&lt;br /&gt;
This basically just sets Renderbin:&lt;br /&gt;
&lt;br /&gt;
opaque = bin 10, depthsortedbin&lt;br /&gt;
&lt;br /&gt;
transparent = bin 0, renderbin&lt;br /&gt;
&lt;br /&gt;
default = inherit renderbin details from parent node&lt;br /&gt;
&lt;br /&gt;
===== program =====&lt;br /&gt;
* vertex-shader&lt;br /&gt;
* geometry-shader&lt;br /&gt;
* fragment-shader&lt;br /&gt;
* attribute&lt;br /&gt;
* geometry-vertices-out: integer, max number of vertices emitted by geometry shader&lt;br /&gt;
* geometry-input-type: points, lines, lines-adjacency, triangles, triangles-adjacency&lt;br /&gt;
* geometry-output-type: points, line-strip, triangle-strip&lt;br /&gt;
* uniform-block-binding: has name and index (since 2020.1)&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example for clustered lightning in compositor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;fragment-shader n=&amp;quot;3&amp;quot;&amp;gt;Shaders/ALS/clustered-include.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;PointLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;5&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
		                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;SpotLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See this page for more about shaders: [[Howto:Shader programming in FlightGear]]&lt;br /&gt;
&lt;br /&gt;
== Uniforms passed to shaders outside the xml effect framework ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Type&lt;br /&gt;
!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix used to transform from world to view space. Same as osg_ViewMatrix, but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix inverse used to transform from view to world space. Same as osg_ViewMatrixInverse but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ProjectionMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, projection matrix inverse&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionCart&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in cartesian coordinates&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionGeod&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in geodesic coordinates (longitude in radians, latitude in radians, elevation in meters)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunAmbientColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDiffuseColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunSpecularColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDirection&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogDensity&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowDistances&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_DepthInColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Tells if the depth is stored in a depth texture or a color texture&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_Planes&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Used to convert the value of the depth buffer to a depth that can be used to compute the eye space position of the fragment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_BufferSize&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Dimensions of the buffer, used to convert gl_FragCoord into the range [0..1][0..1]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from world to view space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from view to world space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_SimulationTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_DeltaFrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=37364|title=Application of effects}} - Testing which kind of groups an effect can be applied to and when&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124645</id>
		<title>Effect framework</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124645"/>
		<updated>2020-05-12T15:06:49Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* texture-unit */ cleanup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
The effect framework as per version 2020.1&lt;br /&gt;
&lt;br /&gt;
Effects describe the graphical appearance of 3D objects and scenery in&lt;br /&gt;
FlightGear. The main motivation for effects is to support OpenGL&lt;br /&gt;
shaders and to provide different implementations for graphics hardware&lt;br /&gt;
of varying capabilities. Effects are similar to DirectX effects files&lt;br /&gt;
and Ogre3D material scripts.&lt;br /&gt;
&lt;br /&gt;
An effect is a property list. The property list syntax is extended&lt;br /&gt;
with new &amp;quot;vec3d&amp;quot; and &amp;quot;vec4d&amp;quot; types to support common computer graphics&lt;br /&gt;
values. Effects are read from files with a &amp;quot;.eff&amp;quot; extension or can be&lt;br /&gt;
created on-the-fly by FlightGear at runtime.  An effect consists of a&lt;br /&gt;
&amp;quot;parameters&amp;quot; section followed by &amp;quot;technique&amp;quot; descriptions.  The&lt;br /&gt;
&amp;quot;parameters&amp;quot; section is a tree of values that describe, abstractly,&lt;br /&gt;
the graphical characteristics of objects that use the effect. Techniques&lt;br /&gt;
refer to these parameters and use them to set OpenGL state or to set&lt;br /&gt;
parameters for shader programs. The names of properties in the&lt;br /&gt;
parameter section can be whatever the effects author chooses, although&lt;br /&gt;
some standard parameters  are set by FlightGear itself. On the other&lt;br /&gt;
hand, the properties in the techniques section are all defined by the&lt;br /&gt;
FlightGear. &lt;br /&gt;
&lt;br /&gt;
== Default Effects in Terrain Materials and Models ==&lt;br /&gt;
Effects for terrain work in this way: for each material type in&lt;br /&gt;
materials.xml an effect is created that inherits from a single default&lt;br /&gt;
terrain effect, Effects/terrain-default.eff. The parameters section of&lt;br /&gt;
the effect is filled in using the ambient, diffuse, specular,&lt;br /&gt;
emissive, shininess, and transparent fields of the material. The&lt;br /&gt;
parameters image, filter, wrap-s, and wrap-t are also initialized from&lt;br /&gt;
the material xml. Seperate effects are created for each texture&lt;br /&gt;
variant of a material.&lt;br /&gt;
&lt;br /&gt;
Model effects are created by walking the OpenSceneGraph scene graph&lt;br /&gt;
for a model and replacing nodes (osg::Geode) that have state sets with&lt;br /&gt;
node that uses an effect instead. Again, a small effect is created&lt;br /&gt;
with parameters extracted from OSG objects; this effect inherits, by&lt;br /&gt;
default, from Effects/model-default.eff. A larger set of parameters is&lt;br /&gt;
created for model effects than for terrain because there is more&lt;br /&gt;
variation possible from the OSG model loaders than from the terrain&lt;br /&gt;
system. The parameters created are: &lt;br /&gt;
&lt;br /&gt;
* material active, ambient, diffuse, specular, emissive, shininess, color mode&lt;br /&gt;
# blend active, source, destination&lt;br /&gt;
# shade-model&lt;br /&gt;
# cull-face&lt;br /&gt;
* rendering-hint&lt;br /&gt;
* texture type, image, filter, wrap-s, wrap-t&lt;br /&gt;
&lt;br /&gt;
== Specifying Custom Effects ==&lt;br /&gt;
You can specify the effects that will be used by FlightGear as the&lt;br /&gt;
base effect when it creates terrain and model effects.&lt;br /&gt;
&lt;br /&gt;
In the terrain materials.xml, an &amp;quot;effect&amp;quot; property specifies the name&lt;br /&gt;
of the model to use.&lt;br /&gt;
&lt;br /&gt;
Material animations will be implemented by creating a new effect&lt;br /&gt;
that inherits from one in a model, overriding the parameters that&lt;br /&gt;
will be animated.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The $FGDATA/Effects directory contains the effects definitions; look there for&lt;br /&gt;
examples. Effects/crop.eff is a good example of a complex effect.&lt;br /&gt;
&lt;br /&gt;
== Application ==&lt;br /&gt;
To apply an effect to a model or part of a model use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;effect&amp;gt;&lt;br /&gt;
		&amp;lt;inherits-from&amp;gt;Effects/light-cone&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
		&amp;lt;object-name&amp;gt;Cone&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;inherits-from&amp;gt; &amp;lt;/inherits-from&amp;gt; contains the path to the effect you want to apply.&lt;br /&gt;
The effect does not need the file extension.&lt;br /&gt;
&lt;br /&gt;
=== Parameters in model file ===&lt;br /&gt;
&lt;br /&gt;
Parameters can be put into the model files effect application as well. But only bool, int, float, string can be used there.&lt;br /&gt;
&lt;br /&gt;
=== Chrome old usage ===&lt;br /&gt;
&lt;br /&gt;
Chrome, although now implemented as an effect, still retains the old method of application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;shader&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;shader&amp;gt;chrome&amp;lt;/shader&amp;gt;&lt;br /&gt;
			&amp;lt;texture&amp;gt;glass_shader.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
			&amp;lt;object-name&amp;gt;windscreen&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in order to maintain backward compatibility.&lt;br /&gt;
&lt;br /&gt;
== Reload effects at runtime ==&lt;br /&gt;
To reload an effect applied in a model xml file (e.g. some parameters and what it enherits from) just go into debug menu and select Reload Model.&lt;br /&gt;
&lt;br /&gt;
To reload the entire effect framework including eff files, go into menu and debug and configure development extensions and reload shaders. This is broken in 2020.1 though, but works in earlier FG versions.&lt;br /&gt;
&lt;br /&gt;
== The xml tags of an effect ==&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
The name of the effect&lt;br /&gt;
&lt;br /&gt;
=== inherits-from ===&lt;br /&gt;
One feature not fully illustrated in the sample below is that&lt;br /&gt;
effects can inherit from each other. The parent effect is listed in&lt;br /&gt;
the &amp;quot;inherits-from&amp;quot; form. The child effect's property tree is&lt;br /&gt;
overlaid over that of the parent. Nodes that have the same name and&lt;br /&gt;
property index -- set by the &amp;quot;n=&amp;quot; attribute in the property tag --&lt;br /&gt;
are recursively merged. Leaf property nodes from the child have&lt;br /&gt;
precedence.  This means that effects that inherit from the example&lt;br /&gt;
effect below could be very short, listing just new&lt;br /&gt;
parameters and adding nothing to the techniques section;&lt;br /&gt;
alternatively, a technique could be altered or customized in a&lt;br /&gt;
child, listing (for example) a different shader program. An example&lt;br /&gt;
showing inheritance Effects/crop.eff, which inherits some if its&lt;br /&gt;
values from Effects/terrain-default.eff.&lt;br /&gt;
&lt;br /&gt;
FlightGear directly uses effects inheritance to assign effects to 3D&lt;br /&gt;
models and terrain. As described below, at runtime small effects are&lt;br /&gt;
created that contain material and texture values in a &amp;quot;parameters&amp;quot;&lt;br /&gt;
section. These effects inherit from another effect which references&lt;br /&gt;
those parameters in its &amp;quot;techniques&amp;quot; section. The derived effect&lt;br /&gt;
overrides any default values that might be in the base effect's&lt;br /&gt;
parameters section.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
Custom parameters that controls the effect.&lt;br /&gt;
&lt;br /&gt;
Note that parameters can use the &amp;lt;use&amp;gt; tags to enable properties to specify the values.&lt;br /&gt;
&lt;br /&gt;
=== Generate ===&lt;br /&gt;
&lt;br /&gt;
Often shader effects need tangent vectors to work properly. These &lt;br /&gt;
tangent vectors, usually called tangent and binormal, are computed &lt;br /&gt;
on the CPU and given to the shader as vertex attributes. These &lt;br /&gt;
vectors are computed on demand on the geometry using the effect if &lt;br /&gt;
the 'generate' clause is present in the effect file. Exemple :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;generate&amp;gt;&lt;br /&gt;
		&amp;lt;tangent type=&amp;quot;int&amp;quot;&amp;gt;6&amp;lt;/tangent&amp;gt;&lt;br /&gt;
		&amp;lt;binormal type=&amp;quot;int&amp;quot;&amp;gt;7&amp;lt;/binormal&amp;gt;&lt;br /&gt;
		&amp;lt;normal type=&amp;quot;int&amp;quot;&amp;gt;8&amp;lt;/normal&amp;gt;&lt;br /&gt;
	&amp;lt;/generate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.&lt;br /&gt;
The integer value of these subnode is the index of the attribute &lt;br /&gt;
that will hold the value of the vec3 vector.&lt;br /&gt;
&lt;br /&gt;
The generate clause is located under PropertyList in the xml file.&lt;br /&gt;
&lt;br /&gt;
In order to be available for the vertex shader, these data should &lt;br /&gt;
be bound to an attribute in the program clause, like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;program&amp;gt;&lt;br /&gt;
		&amp;lt;vertex-shader&amp;gt;my_vertex_shader&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_tangent_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_binormal_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;7&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
	&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
attribute names are whatever the shader use. The index is the one &lt;br /&gt;
declared in the 'generate' clause. So because generate/tangent has &lt;br /&gt;
value 6 and my_tangent_attribute has index 6, my_tangent_attribute &lt;br /&gt;
holds the tangent value for the vertex.&lt;br /&gt;
&lt;br /&gt;
=== technique ===&lt;br /&gt;
A certain way of rendering this effect. Different pipelines typically have their own techniques.&lt;br /&gt;
&lt;br /&gt;
==== scheme ====&lt;br /&gt;
Since 2020.1, is only usable in Compositor build.&lt;br /&gt;
&lt;br /&gt;
For the compositor ALS pipeline a scheme of als-lightning has to be specified for the technique to be considered for rendering.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;scheme&amp;gt;als-lighting&amp;lt;/scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== predicate ====&lt;br /&gt;
A technique can contain a predicate that describes the OpenGL&lt;br /&gt;
functionality required to support the technique. The first&lt;br /&gt;
technique with a valid predicate in the list of techniques is used&lt;br /&gt;
to set up the graphics state of the effect. A technique with no&lt;br /&gt;
predicate is always assumed to be valid. The predicate is written in a&lt;br /&gt;
little expression language that supports the following primitives:&lt;br /&gt;
&lt;br /&gt;
and, or, equal, less, less-equal&lt;br /&gt;
glversion - returns the version number of OpenGL&lt;br /&gt;
extension-supported - returns true if an OpenGL extension is supported&lt;br /&gt;
property - returns the boolean value of a property&lt;br /&gt;
float-property - returns the float value of a property, useful inside equal, less or less-equal nodes&lt;br /&gt;
shader-language - returns the version of GLSL supported, or 0 if there is none.&lt;br /&gt;
&lt;br /&gt;
The proper way to test whether to enable a shader-based technique is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;predicate&amp;gt;&lt;br /&gt;
	  &amp;lt;and&amp;gt;&lt;br /&gt;
		&amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
		&amp;lt;less-equal&amp;gt;&lt;br /&gt;
		  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
		  &amp;lt;shader-language/&amp;gt;&lt;br /&gt;
		&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;/and&amp;gt;&lt;br /&gt;
	&amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a property set by the user to indicate what is the level &lt;br /&gt;
of quality desired. This level of quality can be checked in the predicate&lt;br /&gt;
like this :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;predicate&amp;gt;&lt;br /&gt;
      &amp;lt;and&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
	&amp;lt;less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
	  &amp;lt;float-property&amp;gt;/sim/rendering/quality-level&amp;lt;/float-property&amp;gt;&lt;br /&gt;
	&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	&amp;lt;!-- other predicate conditions --&amp;gt;&lt;br /&gt;
      &amp;lt;/and&amp;gt;&lt;br /&gt;
    &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
The range of /sim/rendering/quality-level is [0..5]&lt;br /&gt;
 * 2.0 is the threshold for relief mapping effects,&lt;br /&gt;
 * 4.0 is the threshold for geometry shader usage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;predicate&amp;gt;&lt;br /&gt;
		&amp;lt;and&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/quality-level&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/model&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;or&amp;gt;&lt;br /&gt;
			&amp;lt;less-equal&amp;gt;&lt;br /&gt;
			  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
			  &amp;lt;glversion/&amp;gt;&lt;br /&gt;
			&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
			&amp;lt;and&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shader_objects&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shading_language_100&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_vertex_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_fragment_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			&amp;lt;/and&amp;gt;&lt;br /&gt;
		  &amp;lt;/or&amp;gt;&lt;br /&gt;
		&amp;lt;/and&amp;gt;&lt;br /&gt;
	  &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== pass ====&lt;br /&gt;
A technique can consist of several passes. A pass is basically an Open&lt;br /&gt;
Scene Graph StateSet. Ultimately all OpenGL and OSG modes and state&lt;br /&gt;
attributes  will be accessable in techniques. State attributes -- that&lt;br /&gt;
is, technique properties that have children and are not just boolean&lt;br /&gt;
modes -- have an &amp;lt;active&amp;gt; parameter which enables or disables the&lt;br /&gt;
attribute. In this way a technique can declare parameters it needs,&lt;br /&gt;
but not enable the attribute at all if it is not needed; the decision&lt;br /&gt;
can be based on a parameter in the parameters section of the&lt;br /&gt;
effect. For example, effects that support transparent and opaque&lt;br /&gt;
geometry could have as part of a technique:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;blend&amp;gt;&lt;br /&gt;
		&amp;lt;active&amp;gt;&amp;lt;use&amp;gt;blend/active&amp;lt;/use&amp;gt;&amp;lt;/active&amp;gt;&lt;br /&gt;
		&amp;lt;source&amp;gt;src-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
		&amp;lt;destination&amp;gt;one-minus-src-alpha&amp;lt;/destination&amp;gt;&lt;br /&gt;
	  &amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if the blend/active parameter is true blending will be activated&lt;br /&gt;
using the usual blending equation; otherwise blending is disabled.&lt;br /&gt;
&lt;br /&gt;
Values are assigned to technique properties in several ways:&lt;br /&gt;
&lt;br /&gt;
	* They can appear directly in the techniques section as a&lt;br /&gt;
		constant. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;uniform&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;ColorsTex&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;sampler-1d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
		&amp;lt;/uniform&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		* The name of a property in the parameters section can be&lt;br /&gt;
		referenced using a &amp;quot;use&amp;quot; clause. For example, in the technique&lt;br /&gt;
		section:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;material&amp;gt;&lt;br /&gt;
			&amp;lt;ambient&amp;gt;&amp;lt;use&amp;gt;material/ambient&amp;lt;/use&amp;gt;&amp;lt;/ambient&amp;gt;&lt;br /&gt;
		&amp;lt;/material&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		Then, in the parameters section of the effect:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;material&amp;gt;&lt;br /&gt;
				&amp;lt;ambient type=&amp;quot;vec4d&amp;quot;&amp;gt;0.2 0.2 0.2 1.0&amp;lt;/ambient&amp;gt;&lt;br /&gt;
			&amp;lt;/material&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		It's worth pointing out that the &amp;quot;material&amp;quot; property in a&lt;br /&gt;
		technique specifies part of OpenGL's state, whereas &amp;quot;material&amp;quot;&lt;br /&gt;
		in the parameters section is just a name, part of a&lt;br /&gt;
		hierarchical namespace.&lt;br /&gt;
&lt;br /&gt;
		* A property in the parameters section doesn't need to contain&lt;br /&gt;
		a constant value; it can also contain a &amp;quot;use&amp;quot; property. Here&lt;br /&gt;
		the value of the use clause is the name of a node in an&lt;br /&gt;
		external property tree which will be used as the source of a&lt;br /&gt;
		value. If the name begins with '/', the node is in&lt;br /&gt;
		FlightGear's global property tree; otherwise, it is in a local&lt;br /&gt;
		property tree, usually belonging to a model [NOT IMPLEMENTED&lt;br /&gt;
		YET]. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;chrome-light&amp;gt;&amp;lt;use&amp;gt;/rendering/scene/chrome-light&amp;lt;/use&amp;gt;&amp;lt;/chrome-light&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		The type is determined by what is expected by the technique&lt;br /&gt;
		attribute that will ultimately receive the value. [There is&lt;br /&gt;
		no way to get vector values out of the main property system&lt;br /&gt;
		yet; this will be fixed shortly.] Values that are declared&lt;br /&gt;
		this way are dynamically updated if the property node&lt;br /&gt;
		changes.&lt;br /&gt;
&lt;br /&gt;
===== lighting =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== material =====&lt;br /&gt;
children: active, ambient, ambient-front, ambient-back, diffuse,&lt;br /&gt;
		 diffuse-front, diffuse-back, specular, specular-front,&lt;br /&gt;
		 specular-back, emissive, emissive-front, emissive-back, shininess,&lt;br /&gt;
		 shininess-front, shininess-back, color-mode&lt;br /&gt;
&lt;br /&gt;
===== blend =====&lt;br /&gt;
Children: active, source, destination, source-rgb, source-alpha, destination-rgb, destination-alpha&lt;br /&gt;
&lt;br /&gt;
Children values: dst-alpha, dst-color, one, one-minus-dst-alpha, one-minus-dst-color, one-minus-src-alpha, one-minus-src-color, src-alpha, src-alpha-saturate, src-color, constant-color, one-minus-constant-color, constant-alpha, one-minus-constant-alpha, zero&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;&lt;br /&gt;
                        &amp;lt;active&amp;gt;true&amp;lt;/active&amp;gt;&lt;br /&gt;
                        &amp;lt;source&amp;gt;one-minus-dst-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
			&amp;lt;destination&amp;gt;src-alpha-saturate&amp;lt;/destination&amp;gt;&lt;br /&gt;
		&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== blend (simple) =====&lt;br /&gt;
A blend tag with 0 will do nothing.&lt;br /&gt;
A blend tag with 1 will do the same as source-alpha: one-minus-dst-alpha, in other words it will enable z transparency using alpha from the fragment shader.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;1&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== shade-model =====&lt;br /&gt;
flat or smooth&lt;br /&gt;
&lt;br /&gt;
===== cull-face =====&lt;br /&gt;
front, back, front-back, off&lt;br /&gt;
&lt;br /&gt;
===== texture-unit =====&lt;br /&gt;
unit: integer denoting which unit it is&lt;br /&gt;
&lt;br /&gt;
image: the texture path&lt;br /&gt;
&lt;br /&gt;
images: multiple texture paths&lt;br /&gt;
&lt;br /&gt;
type: 2d, noise, cubemap, 3d (3d was added in 2020.1 and is used for layers of 2d textures defining a volumetric 3d texture)&lt;br /&gt;
&lt;br /&gt;
filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
&lt;br /&gt;
mag-filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
&lt;br /&gt;
wrap: repeat, clamp-to-edge, clamp-to-border, clamp, mirror&lt;br /&gt;
&lt;br /&gt;
internal-format: normalized&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;texture-unit&amp;gt;&lt;br /&gt;
                        &amp;lt;unit&amp;gt;3&amp;lt;/unit&amp;gt;&lt;br /&gt;
			&amp;lt;image&amp;gt;Textures/Terrain/void.png&amp;lt;/image&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
                        &amp;lt;mag-filter&amp;gt;linear-mipmap-linear&amp;lt;/mag-filter&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
                        &amp;lt;wrap-r&amp;gt;repeat&amp;lt;/wrap-r&amp;gt;&lt;br /&gt;
			&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
                        &amp;lt;mipmap-control&amp;gt;&lt;br /&gt;
                            &amp;lt;function-r&amp;gt;average&amp;lt;/function-r&amp;gt;&lt;br /&gt;
			    &amp;lt;function-g&amp;gt;min&amp;lt;/function-g&amp;gt;&lt;br /&gt;
                            &amp;lt;function-b&amp;gt;sum&amp;lt;/function-b&amp;gt;&lt;br /&gt;
			    &amp;lt;function-a&amp;gt;product&amp;lt;/function-a&amp;gt;&lt;br /&gt;
                        &amp;lt;/mipmap-control&amp;gt;&lt;br /&gt;
                        &amp;lt;environment&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;decal&amp;lt;/mode&amp;gt; &lt;br /&gt;
                            &amp;lt;color&amp;gt;0.0 0.1 0.6 1.0&amp;lt;/color&amp;gt;&lt;br /&gt;
                        &amp;lt;/environment&amp;gt;&lt;br /&gt;
                        &amp;lt;point-sprite&amp;gt;true&amp;lt;/point-sprite&amp;gt;&lt;br /&gt;
                        &amp;lt;texenv-combine&amp;gt;operand0-rgb&amp;lt;/texenv-combine&amp;gt;&lt;br /&gt;
                        &amp;lt;texgen&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;S&amp;lt;/mode&amp;gt;&lt;br /&gt;
                            &amp;lt;planes&amp;gt;0.075, 0.0, 0.0, 0.5&amp;lt;/planes&amp;gt;&lt;br /&gt;
                        &amp;lt;/texgen&amp;gt;&lt;br /&gt;
		&amp;lt;/texture-unit&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-two-side =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== polygon-mode =====&lt;br /&gt;
children: front, back&lt;br /&gt;
&lt;br /&gt;
Valid values:  fill, line, point&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-point-size =====&lt;br /&gt;
true, false&lt;br /&gt;
&lt;br /&gt;
===== uniform =====&lt;br /&gt;
Data accessible by shaders.&lt;br /&gt;
&lt;br /&gt;
name: the name&lt;br /&gt;
&lt;br /&gt;
type: bool, int, float, float-vec3, float-vec4, sampler-1d, sampler-2d, sampler-3d, sampler-1d-shadow, sampler-2d-shadow, sampler-cube&lt;br /&gt;
&lt;br /&gt;
===== alpha-test =====&lt;br /&gt;
&lt;br /&gt;
active: true, false&lt;br /&gt;
&lt;br /&gt;
comparison: never, less, equal, lequal, greater, notequal, gequal, always&lt;br /&gt;
&lt;br /&gt;
reference: 0 to 1&lt;br /&gt;
&lt;br /&gt;
===== render-bin =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
bin-number: This is an integer defining the order stuff will be rendered in, it can be negative also.&lt;br /&gt;
&lt;br /&gt;
bin-name: RenderBin, DepthSortedBin&lt;br /&gt;
&lt;br /&gt;
===== rendering-hint =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
default, opaque, transparent&lt;br /&gt;
&lt;br /&gt;
This basically just sets Renderbin:&lt;br /&gt;
&lt;br /&gt;
opaque = bin 10, depthsortedbin&lt;br /&gt;
&lt;br /&gt;
transparent = bin 0, renderbin&lt;br /&gt;
&lt;br /&gt;
default = inherit renderbin details from parent node&lt;br /&gt;
&lt;br /&gt;
===== program =====&lt;br /&gt;
* vertex-shader&lt;br /&gt;
* geometry-shader&lt;br /&gt;
* fragment-shader&lt;br /&gt;
* attribute&lt;br /&gt;
* geometry-vertices-out: integer, max number of vertices emitted by geometry shader&lt;br /&gt;
* geometry-input-type: points, lines, lines-adjacency, triangles, triangles-adjacency&lt;br /&gt;
* geometry-output-type: points, line-strip, triangle-strip&lt;br /&gt;
* uniform-block-binding: has name and index (since 2020.1)&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example for clustered lightning in compositor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;fragment-shader n=&amp;quot;3&amp;quot;&amp;gt;Shaders/ALS/clustered-include.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;PointLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;5&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
		                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;SpotLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See this page for more about shaders: [[Howto:Shader programming in FlightGear]]&lt;br /&gt;
&lt;br /&gt;
== Uniforms passed to shaders outside the xml effect framework ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Type&lt;br /&gt;
!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix used to transform from world to view space. Same as osg_ViewMatrix, but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix inverse used to transform from view to world space. Same as osg_ViewMatrixInverse but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ProjectionMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, projection matrix inverse&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionCart&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in cartesian coordinates&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionGeod&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in geodesic coordinates (longitude in radians, latitude in radians, elevation in meters)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunAmbientColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDiffuseColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunSpecularColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDirection&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogDensity&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowDistances&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_DepthInColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Tells if the depth is stored in a depth texture or a color texture&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_Planes&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Used to convert the value of the depth buffer to a depth that can be used to compute the eye space position of the fragment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_BufferSize&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Dimensions of the buffer, used to convert gl_FragCoord into the range [0..1][0..1]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from world to view space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from view to world space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_SimulationTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_DeltaFrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=37364|title=Application of effects}} - Testing which kind of groups an effect can be applied to and when&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124644</id>
		<title>Effect framework</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124644"/>
		<updated>2020-05-12T15:06:27Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* texture-unit */ added more info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
The effect framework as per version 2020.1&lt;br /&gt;
&lt;br /&gt;
Effects describe the graphical appearance of 3D objects and scenery in&lt;br /&gt;
FlightGear. The main motivation for effects is to support OpenGL&lt;br /&gt;
shaders and to provide different implementations for graphics hardware&lt;br /&gt;
of varying capabilities. Effects are similar to DirectX effects files&lt;br /&gt;
and Ogre3D material scripts.&lt;br /&gt;
&lt;br /&gt;
An effect is a property list. The property list syntax is extended&lt;br /&gt;
with new &amp;quot;vec3d&amp;quot; and &amp;quot;vec4d&amp;quot; types to support common computer graphics&lt;br /&gt;
values. Effects are read from files with a &amp;quot;.eff&amp;quot; extension or can be&lt;br /&gt;
created on-the-fly by FlightGear at runtime.  An effect consists of a&lt;br /&gt;
&amp;quot;parameters&amp;quot; section followed by &amp;quot;technique&amp;quot; descriptions.  The&lt;br /&gt;
&amp;quot;parameters&amp;quot; section is a tree of values that describe, abstractly,&lt;br /&gt;
the graphical characteristics of objects that use the effect. Techniques&lt;br /&gt;
refer to these parameters and use them to set OpenGL state or to set&lt;br /&gt;
parameters for shader programs. The names of properties in the&lt;br /&gt;
parameter section can be whatever the effects author chooses, although&lt;br /&gt;
some standard parameters  are set by FlightGear itself. On the other&lt;br /&gt;
hand, the properties in the techniques section are all defined by the&lt;br /&gt;
FlightGear. &lt;br /&gt;
&lt;br /&gt;
== Default Effects in Terrain Materials and Models ==&lt;br /&gt;
Effects for terrain work in this way: for each material type in&lt;br /&gt;
materials.xml an effect is created that inherits from a single default&lt;br /&gt;
terrain effect, Effects/terrain-default.eff. The parameters section of&lt;br /&gt;
the effect is filled in using the ambient, diffuse, specular,&lt;br /&gt;
emissive, shininess, and transparent fields of the material. The&lt;br /&gt;
parameters image, filter, wrap-s, and wrap-t are also initialized from&lt;br /&gt;
the material xml. Seperate effects are created for each texture&lt;br /&gt;
variant of a material.&lt;br /&gt;
&lt;br /&gt;
Model effects are created by walking the OpenSceneGraph scene graph&lt;br /&gt;
for a model and replacing nodes (osg::Geode) that have state sets with&lt;br /&gt;
node that uses an effect instead. Again, a small effect is created&lt;br /&gt;
with parameters extracted from OSG objects; this effect inherits, by&lt;br /&gt;
default, from Effects/model-default.eff. A larger set of parameters is&lt;br /&gt;
created for model effects than for terrain because there is more&lt;br /&gt;
variation possible from the OSG model loaders than from the terrain&lt;br /&gt;
system. The parameters created are: &lt;br /&gt;
&lt;br /&gt;
* material active, ambient, diffuse, specular, emissive, shininess, color mode&lt;br /&gt;
# blend active, source, destination&lt;br /&gt;
# shade-model&lt;br /&gt;
# cull-face&lt;br /&gt;
* rendering-hint&lt;br /&gt;
* texture type, image, filter, wrap-s, wrap-t&lt;br /&gt;
&lt;br /&gt;
== Specifying Custom Effects ==&lt;br /&gt;
You can specify the effects that will be used by FlightGear as the&lt;br /&gt;
base effect when it creates terrain and model effects.&lt;br /&gt;
&lt;br /&gt;
In the terrain materials.xml, an &amp;quot;effect&amp;quot; property specifies the name&lt;br /&gt;
of the model to use.&lt;br /&gt;
&lt;br /&gt;
Material animations will be implemented by creating a new effect&lt;br /&gt;
that inherits from one in a model, overriding the parameters that&lt;br /&gt;
will be animated.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The $FGDATA/Effects directory contains the effects definitions; look there for&lt;br /&gt;
examples. Effects/crop.eff is a good example of a complex effect.&lt;br /&gt;
&lt;br /&gt;
== Application ==&lt;br /&gt;
To apply an effect to a model or part of a model use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;effect&amp;gt;&lt;br /&gt;
		&amp;lt;inherits-from&amp;gt;Effects/light-cone&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
		&amp;lt;object-name&amp;gt;Cone&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;inherits-from&amp;gt; &amp;lt;/inherits-from&amp;gt; contains the path to the effect you want to apply.&lt;br /&gt;
The effect does not need the file extension.&lt;br /&gt;
&lt;br /&gt;
=== Parameters in model file ===&lt;br /&gt;
&lt;br /&gt;
Parameters can be put into the model files effect application as well. But only bool, int, float, string can be used there.&lt;br /&gt;
&lt;br /&gt;
=== Chrome old usage ===&lt;br /&gt;
&lt;br /&gt;
Chrome, although now implemented as an effect, still retains the old method of application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;shader&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;shader&amp;gt;chrome&amp;lt;/shader&amp;gt;&lt;br /&gt;
			&amp;lt;texture&amp;gt;glass_shader.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
			&amp;lt;object-name&amp;gt;windscreen&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in order to maintain backward compatibility.&lt;br /&gt;
&lt;br /&gt;
== Reload effects at runtime ==&lt;br /&gt;
To reload an effect applied in a model xml file (e.g. some parameters and what it enherits from) just go into debug menu and select Reload Model.&lt;br /&gt;
&lt;br /&gt;
To reload the entire effect framework including eff files, go into menu and debug and configure development extensions and reload shaders. This is broken in 2020.1 though, but works in earlier FG versions.&lt;br /&gt;
&lt;br /&gt;
== The xml tags of an effect ==&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
The name of the effect&lt;br /&gt;
&lt;br /&gt;
=== inherits-from ===&lt;br /&gt;
One feature not fully illustrated in the sample below is that&lt;br /&gt;
effects can inherit from each other. The parent effect is listed in&lt;br /&gt;
the &amp;quot;inherits-from&amp;quot; form. The child effect's property tree is&lt;br /&gt;
overlaid over that of the parent. Nodes that have the same name and&lt;br /&gt;
property index -- set by the &amp;quot;n=&amp;quot; attribute in the property tag --&lt;br /&gt;
are recursively merged. Leaf property nodes from the child have&lt;br /&gt;
precedence.  This means that effects that inherit from the example&lt;br /&gt;
effect below could be very short, listing just new&lt;br /&gt;
parameters and adding nothing to the techniques section;&lt;br /&gt;
alternatively, a technique could be altered or customized in a&lt;br /&gt;
child, listing (for example) a different shader program. An example&lt;br /&gt;
showing inheritance Effects/crop.eff, which inherits some if its&lt;br /&gt;
values from Effects/terrain-default.eff.&lt;br /&gt;
&lt;br /&gt;
FlightGear directly uses effects inheritance to assign effects to 3D&lt;br /&gt;
models and terrain. As described below, at runtime small effects are&lt;br /&gt;
created that contain material and texture values in a &amp;quot;parameters&amp;quot;&lt;br /&gt;
section. These effects inherit from another effect which references&lt;br /&gt;
those parameters in its &amp;quot;techniques&amp;quot; section. The derived effect&lt;br /&gt;
overrides any default values that might be in the base effect's&lt;br /&gt;
parameters section.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
Custom parameters that controls the effect.&lt;br /&gt;
&lt;br /&gt;
Note that parameters can use the &amp;lt;use&amp;gt; tags to enable properties to specify the values.&lt;br /&gt;
&lt;br /&gt;
=== Generate ===&lt;br /&gt;
&lt;br /&gt;
Often shader effects need tangent vectors to work properly. These &lt;br /&gt;
tangent vectors, usually called tangent and binormal, are computed &lt;br /&gt;
on the CPU and given to the shader as vertex attributes. These &lt;br /&gt;
vectors are computed on demand on the geometry using the effect if &lt;br /&gt;
the 'generate' clause is present in the effect file. Exemple :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;generate&amp;gt;&lt;br /&gt;
		&amp;lt;tangent type=&amp;quot;int&amp;quot;&amp;gt;6&amp;lt;/tangent&amp;gt;&lt;br /&gt;
		&amp;lt;binormal type=&amp;quot;int&amp;quot;&amp;gt;7&amp;lt;/binormal&amp;gt;&lt;br /&gt;
		&amp;lt;normal type=&amp;quot;int&amp;quot;&amp;gt;8&amp;lt;/normal&amp;gt;&lt;br /&gt;
	&amp;lt;/generate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.&lt;br /&gt;
The integer value of these subnode is the index of the attribute &lt;br /&gt;
that will hold the value of the vec3 vector.&lt;br /&gt;
&lt;br /&gt;
The generate clause is located under PropertyList in the xml file.&lt;br /&gt;
&lt;br /&gt;
In order to be available for the vertex shader, these data should &lt;br /&gt;
be bound to an attribute in the program clause, like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;program&amp;gt;&lt;br /&gt;
		&amp;lt;vertex-shader&amp;gt;my_vertex_shader&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_tangent_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_binormal_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;7&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
	&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
attribute names are whatever the shader use. The index is the one &lt;br /&gt;
declared in the 'generate' clause. So because generate/tangent has &lt;br /&gt;
value 6 and my_tangent_attribute has index 6, my_tangent_attribute &lt;br /&gt;
holds the tangent value for the vertex.&lt;br /&gt;
&lt;br /&gt;
=== technique ===&lt;br /&gt;
A certain way of rendering this effect. Different pipelines typically have their own techniques.&lt;br /&gt;
&lt;br /&gt;
==== scheme ====&lt;br /&gt;
Since 2020.1, is only usable in Compositor build.&lt;br /&gt;
&lt;br /&gt;
For the compositor ALS pipeline a scheme of als-lightning has to be specified for the technique to be considered for rendering.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;scheme&amp;gt;als-lighting&amp;lt;/scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== predicate ====&lt;br /&gt;
A technique can contain a predicate that describes the OpenGL&lt;br /&gt;
functionality required to support the technique. The first&lt;br /&gt;
technique with a valid predicate in the list of techniques is used&lt;br /&gt;
to set up the graphics state of the effect. A technique with no&lt;br /&gt;
predicate is always assumed to be valid. The predicate is written in a&lt;br /&gt;
little expression language that supports the following primitives:&lt;br /&gt;
&lt;br /&gt;
and, or, equal, less, less-equal&lt;br /&gt;
glversion - returns the version number of OpenGL&lt;br /&gt;
extension-supported - returns true if an OpenGL extension is supported&lt;br /&gt;
property - returns the boolean value of a property&lt;br /&gt;
float-property - returns the float value of a property, useful inside equal, less or less-equal nodes&lt;br /&gt;
shader-language - returns the version of GLSL supported, or 0 if there is none.&lt;br /&gt;
&lt;br /&gt;
The proper way to test whether to enable a shader-based technique is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;predicate&amp;gt;&lt;br /&gt;
	  &amp;lt;and&amp;gt;&lt;br /&gt;
		&amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
		&amp;lt;less-equal&amp;gt;&lt;br /&gt;
		  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
		  &amp;lt;shader-language/&amp;gt;&lt;br /&gt;
		&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;/and&amp;gt;&lt;br /&gt;
	&amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a property set by the user to indicate what is the level &lt;br /&gt;
of quality desired. This level of quality can be checked in the predicate&lt;br /&gt;
like this :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;predicate&amp;gt;&lt;br /&gt;
      &amp;lt;and&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
	&amp;lt;less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
	  &amp;lt;float-property&amp;gt;/sim/rendering/quality-level&amp;lt;/float-property&amp;gt;&lt;br /&gt;
	&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	&amp;lt;!-- other predicate conditions --&amp;gt;&lt;br /&gt;
      &amp;lt;/and&amp;gt;&lt;br /&gt;
    &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
The range of /sim/rendering/quality-level is [0..5]&lt;br /&gt;
 * 2.0 is the threshold for relief mapping effects,&lt;br /&gt;
 * 4.0 is the threshold for geometry shader usage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;predicate&amp;gt;&lt;br /&gt;
		&amp;lt;and&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/quality-level&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/model&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;or&amp;gt;&lt;br /&gt;
			&amp;lt;less-equal&amp;gt;&lt;br /&gt;
			  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
			  &amp;lt;glversion/&amp;gt;&lt;br /&gt;
			&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
			&amp;lt;and&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shader_objects&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shading_language_100&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_vertex_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_fragment_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			&amp;lt;/and&amp;gt;&lt;br /&gt;
		  &amp;lt;/or&amp;gt;&lt;br /&gt;
		&amp;lt;/and&amp;gt;&lt;br /&gt;
	  &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== pass ====&lt;br /&gt;
A technique can consist of several passes. A pass is basically an Open&lt;br /&gt;
Scene Graph StateSet. Ultimately all OpenGL and OSG modes and state&lt;br /&gt;
attributes  will be accessable in techniques. State attributes -- that&lt;br /&gt;
is, technique properties that have children and are not just boolean&lt;br /&gt;
modes -- have an &amp;lt;active&amp;gt; parameter which enables or disables the&lt;br /&gt;
attribute. In this way a technique can declare parameters it needs,&lt;br /&gt;
but not enable the attribute at all if it is not needed; the decision&lt;br /&gt;
can be based on a parameter in the parameters section of the&lt;br /&gt;
effect. For example, effects that support transparent and opaque&lt;br /&gt;
geometry could have as part of a technique:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;blend&amp;gt;&lt;br /&gt;
		&amp;lt;active&amp;gt;&amp;lt;use&amp;gt;blend/active&amp;lt;/use&amp;gt;&amp;lt;/active&amp;gt;&lt;br /&gt;
		&amp;lt;source&amp;gt;src-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
		&amp;lt;destination&amp;gt;one-minus-src-alpha&amp;lt;/destination&amp;gt;&lt;br /&gt;
	  &amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if the blend/active parameter is true blending will be activated&lt;br /&gt;
using the usual blending equation; otherwise blending is disabled.&lt;br /&gt;
&lt;br /&gt;
Values are assigned to technique properties in several ways:&lt;br /&gt;
&lt;br /&gt;
	* They can appear directly in the techniques section as a&lt;br /&gt;
		constant. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;uniform&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;ColorsTex&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;sampler-1d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
		&amp;lt;/uniform&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		* The name of a property in the parameters section can be&lt;br /&gt;
		referenced using a &amp;quot;use&amp;quot; clause. For example, in the technique&lt;br /&gt;
		section:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;material&amp;gt;&lt;br /&gt;
			&amp;lt;ambient&amp;gt;&amp;lt;use&amp;gt;material/ambient&amp;lt;/use&amp;gt;&amp;lt;/ambient&amp;gt;&lt;br /&gt;
		&amp;lt;/material&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		Then, in the parameters section of the effect:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;material&amp;gt;&lt;br /&gt;
				&amp;lt;ambient type=&amp;quot;vec4d&amp;quot;&amp;gt;0.2 0.2 0.2 1.0&amp;lt;/ambient&amp;gt;&lt;br /&gt;
			&amp;lt;/material&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		It's worth pointing out that the &amp;quot;material&amp;quot; property in a&lt;br /&gt;
		technique specifies part of OpenGL's state, whereas &amp;quot;material&amp;quot;&lt;br /&gt;
		in the parameters section is just a name, part of a&lt;br /&gt;
		hierarchical namespace.&lt;br /&gt;
&lt;br /&gt;
		* A property in the parameters section doesn't need to contain&lt;br /&gt;
		a constant value; it can also contain a &amp;quot;use&amp;quot; property. Here&lt;br /&gt;
		the value of the use clause is the name of a node in an&lt;br /&gt;
		external property tree which will be used as the source of a&lt;br /&gt;
		value. If the name begins with '/', the node is in&lt;br /&gt;
		FlightGear's global property tree; otherwise, it is in a local&lt;br /&gt;
		property tree, usually belonging to a model [NOT IMPLEMENTED&lt;br /&gt;
		YET]. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;chrome-light&amp;gt;&amp;lt;use&amp;gt;/rendering/scene/chrome-light&amp;lt;/use&amp;gt;&amp;lt;/chrome-light&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		The type is determined by what is expected by the technique&lt;br /&gt;
		attribute that will ultimately receive the value. [There is&lt;br /&gt;
		no way to get vector values out of the main property system&lt;br /&gt;
		yet; this will be fixed shortly.] Values that are declared&lt;br /&gt;
		this way are dynamically updated if the property node&lt;br /&gt;
		changes.&lt;br /&gt;
&lt;br /&gt;
===== lighting =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== material =====&lt;br /&gt;
children: active, ambient, ambient-front, ambient-back, diffuse,&lt;br /&gt;
		 diffuse-front, diffuse-back, specular, specular-front,&lt;br /&gt;
		 specular-back, emissive, emissive-front, emissive-back, shininess,&lt;br /&gt;
		 shininess-front, shininess-back, color-mode&lt;br /&gt;
&lt;br /&gt;
===== blend =====&lt;br /&gt;
Children: active, source, destination, source-rgb, source-alpha, destination-rgb, destination-alpha&lt;br /&gt;
&lt;br /&gt;
Children values: dst-alpha, dst-color, one, one-minus-dst-alpha, one-minus-dst-color, one-minus-src-alpha, one-minus-src-color, src-alpha, src-alpha-saturate, src-color, constant-color, one-minus-constant-color, constant-alpha, one-minus-constant-alpha, zero&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;&lt;br /&gt;
                        &amp;lt;active&amp;gt;true&amp;lt;/active&amp;gt;&lt;br /&gt;
                        &amp;lt;source&amp;gt;one-minus-dst-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
			&amp;lt;destination&amp;gt;src-alpha-saturate&amp;lt;/destination&amp;gt;&lt;br /&gt;
		&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== blend (simple) =====&lt;br /&gt;
A blend tag with 0 will do nothing.&lt;br /&gt;
A blend tag with 1 will do the same as source-alpha: one-minus-dst-alpha, in other words it will enable z transparency using alpha from the fragment shader.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;1&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== shade-model =====&lt;br /&gt;
flat or smooth&lt;br /&gt;
&lt;br /&gt;
===== cull-face =====&lt;br /&gt;
front, back, front-back, off&lt;br /&gt;
&lt;br /&gt;
===== texture-unit =====&lt;br /&gt;
unit: integer denoting which unit it is&lt;br /&gt;
image: the texture path&lt;br /&gt;
images: multiple texture paths&lt;br /&gt;
type: 2d, noise, cubemap, 3d (3d was added in 2020.1 and is used for layers of 2d textures defining a volumetric 3d texture)&lt;br /&gt;
filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
mag-filter: linear, linear-mipmap-linear, linear-mipmap-nearest&amp;quot;, nearest, nearest-mipmap-linear, nearest-mipmap-nearest&lt;br /&gt;
wrap: repeat, clamp-to-edge, clamp-to-border, clamp, mirror&lt;br /&gt;
internal-format: normalized&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;texture-unit&amp;gt;&lt;br /&gt;
                        &amp;lt;unit&amp;gt;3&amp;lt;/unit&amp;gt;&lt;br /&gt;
			&amp;lt;image&amp;gt;Textures/Terrain/void.png&amp;lt;/image&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
                        &amp;lt;mag-filter&amp;gt;linear-mipmap-linear&amp;lt;/mag-filter&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
                        &amp;lt;wrap-r&amp;gt;repeat&amp;lt;/wrap-r&amp;gt;&lt;br /&gt;
			&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
                        &amp;lt;mipmap-control&amp;gt;&lt;br /&gt;
                            &amp;lt;function-r&amp;gt;average&amp;lt;/function-r&amp;gt;&lt;br /&gt;
			    &amp;lt;function-g&amp;gt;min&amp;lt;/function-g&amp;gt;&lt;br /&gt;
                            &amp;lt;function-b&amp;gt;sum&amp;lt;/function-b&amp;gt;&lt;br /&gt;
			    &amp;lt;function-a&amp;gt;product&amp;lt;/function-a&amp;gt;&lt;br /&gt;
                        &amp;lt;/mipmap-control&amp;gt;&lt;br /&gt;
                        &amp;lt;environment&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;decal&amp;lt;/mode&amp;gt; &lt;br /&gt;
                            &amp;lt;color&amp;gt;0.0 0.1 0.6 1.0&amp;lt;/color&amp;gt;&lt;br /&gt;
                        &amp;lt;/environment&amp;gt;&lt;br /&gt;
                        &amp;lt;point-sprite&amp;gt;true&amp;lt;/point-sprite&amp;gt;&lt;br /&gt;
                        &amp;lt;texenv-combine&amp;gt;operand0-rgb&amp;lt;/texenv-combine&amp;gt;&lt;br /&gt;
                        &amp;lt;texgen&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;S&amp;lt;/mode&amp;gt;&lt;br /&gt;
                            &amp;lt;planes&amp;gt;0.075, 0.0, 0.0, 0.5&amp;lt;/planes&amp;gt;&lt;br /&gt;
                        &amp;lt;/texgen&amp;gt;&lt;br /&gt;
		&amp;lt;/texture-unit&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-two-side =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== polygon-mode =====&lt;br /&gt;
children: front, back&lt;br /&gt;
&lt;br /&gt;
Valid values:  fill, line, point&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-point-size =====&lt;br /&gt;
true, false&lt;br /&gt;
&lt;br /&gt;
===== uniform =====&lt;br /&gt;
Data accessible by shaders.&lt;br /&gt;
&lt;br /&gt;
name: the name&lt;br /&gt;
&lt;br /&gt;
type: bool, int, float, float-vec3, float-vec4, sampler-1d, sampler-2d, sampler-3d, sampler-1d-shadow, sampler-2d-shadow, sampler-cube&lt;br /&gt;
&lt;br /&gt;
===== alpha-test =====&lt;br /&gt;
&lt;br /&gt;
active: true, false&lt;br /&gt;
&lt;br /&gt;
comparison: never, less, equal, lequal, greater, notequal, gequal, always&lt;br /&gt;
&lt;br /&gt;
reference: 0 to 1&lt;br /&gt;
&lt;br /&gt;
===== render-bin =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
bin-number: This is an integer defining the order stuff will be rendered in, it can be negative also.&lt;br /&gt;
&lt;br /&gt;
bin-name: RenderBin, DepthSortedBin&lt;br /&gt;
&lt;br /&gt;
===== rendering-hint =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
default, opaque, transparent&lt;br /&gt;
&lt;br /&gt;
This basically just sets Renderbin:&lt;br /&gt;
&lt;br /&gt;
opaque = bin 10, depthsortedbin&lt;br /&gt;
&lt;br /&gt;
transparent = bin 0, renderbin&lt;br /&gt;
&lt;br /&gt;
default = inherit renderbin details from parent node&lt;br /&gt;
&lt;br /&gt;
===== program =====&lt;br /&gt;
* vertex-shader&lt;br /&gt;
* geometry-shader&lt;br /&gt;
* fragment-shader&lt;br /&gt;
* attribute&lt;br /&gt;
* geometry-vertices-out: integer, max number of vertices emitted by geometry shader&lt;br /&gt;
* geometry-input-type: points, lines, lines-adjacency, triangles, triangles-adjacency&lt;br /&gt;
* geometry-output-type: points, line-strip, triangle-strip&lt;br /&gt;
* uniform-block-binding: has name and index (since 2020.1)&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example for clustered lightning in compositor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;fragment-shader n=&amp;quot;3&amp;quot;&amp;gt;Shaders/ALS/clustered-include.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;PointLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;5&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
		                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;SpotLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See this page for more about shaders: [[Howto:Shader programming in FlightGear]]&lt;br /&gt;
&lt;br /&gt;
== Uniforms passed to shaders outside the xml effect framework ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Type&lt;br /&gt;
!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix used to transform from world to view space. Same as osg_ViewMatrix, but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix inverse used to transform from view to world space. Same as osg_ViewMatrixInverse but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ProjectionMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, projection matrix inverse&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionCart&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in cartesian coordinates&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionGeod&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in geodesic coordinates (longitude in radians, latitude in radians, elevation in meters)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunAmbientColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDiffuseColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunSpecularColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDirection&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogDensity&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowDistances&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_DepthInColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Tells if the depth is stored in a depth texture or a color texture&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_Planes&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Used to convert the value of the depth buffer to a depth that can be used to compute the eye space position of the fragment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_BufferSize&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Dimensions of the buffer, used to convert gl_FragCoord into the range [0..1][0..1]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from world to view space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from view to world space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_SimulationTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_DeltaFrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=37364|title=Application of effects}} - Testing which kind of groups an effect can be applied to and when&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124643</id>
		<title>Effect framework</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124643"/>
		<updated>2020-05-12T14:50:13Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* program */ beautify&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
The effect framework as per version 2020.1&lt;br /&gt;
&lt;br /&gt;
Effects describe the graphical appearance of 3D objects and scenery in&lt;br /&gt;
FlightGear. The main motivation for effects is to support OpenGL&lt;br /&gt;
shaders and to provide different implementations for graphics hardware&lt;br /&gt;
of varying capabilities. Effects are similar to DirectX effects files&lt;br /&gt;
and Ogre3D material scripts.&lt;br /&gt;
&lt;br /&gt;
An effect is a property list. The property list syntax is extended&lt;br /&gt;
with new &amp;quot;vec3d&amp;quot; and &amp;quot;vec4d&amp;quot; types to support common computer graphics&lt;br /&gt;
values. Effects are read from files with a &amp;quot;.eff&amp;quot; extension or can be&lt;br /&gt;
created on-the-fly by FlightGear at runtime.  An effect consists of a&lt;br /&gt;
&amp;quot;parameters&amp;quot; section followed by &amp;quot;technique&amp;quot; descriptions.  The&lt;br /&gt;
&amp;quot;parameters&amp;quot; section is a tree of values that describe, abstractly,&lt;br /&gt;
the graphical characteristics of objects that use the effect. Techniques&lt;br /&gt;
refer to these parameters and use them to set OpenGL state or to set&lt;br /&gt;
parameters for shader programs. The names of properties in the&lt;br /&gt;
parameter section can be whatever the effects author chooses, although&lt;br /&gt;
some standard parameters  are set by FlightGear itself. On the other&lt;br /&gt;
hand, the properties in the techniques section are all defined by the&lt;br /&gt;
FlightGear. &lt;br /&gt;
&lt;br /&gt;
== Default Effects in Terrain Materials and Models ==&lt;br /&gt;
Effects for terrain work in this way: for each material type in&lt;br /&gt;
materials.xml an effect is created that inherits from a single default&lt;br /&gt;
terrain effect, Effects/terrain-default.eff. The parameters section of&lt;br /&gt;
the effect is filled in using the ambient, diffuse, specular,&lt;br /&gt;
emissive, shininess, and transparent fields of the material. The&lt;br /&gt;
parameters image, filter, wrap-s, and wrap-t are also initialized from&lt;br /&gt;
the material xml. Seperate effects are created for each texture&lt;br /&gt;
variant of a material.&lt;br /&gt;
&lt;br /&gt;
Model effects are created by walking the OpenSceneGraph scene graph&lt;br /&gt;
for a model and replacing nodes (osg::Geode) that have state sets with&lt;br /&gt;
node that uses an effect instead. Again, a small effect is created&lt;br /&gt;
with parameters extracted from OSG objects; this effect inherits, by&lt;br /&gt;
default, from Effects/model-default.eff. A larger set of parameters is&lt;br /&gt;
created for model effects than for terrain because there is more&lt;br /&gt;
variation possible from the OSG model loaders than from the terrain&lt;br /&gt;
system. The parameters created are: &lt;br /&gt;
&lt;br /&gt;
* material active, ambient, diffuse, specular, emissive, shininess, color mode&lt;br /&gt;
# blend active, source, destination&lt;br /&gt;
# shade-model&lt;br /&gt;
# cull-face&lt;br /&gt;
* rendering-hint&lt;br /&gt;
* texture type, image, filter, wrap-s, wrap-t&lt;br /&gt;
&lt;br /&gt;
== Specifying Custom Effects ==&lt;br /&gt;
You can specify the effects that will be used by FlightGear as the&lt;br /&gt;
base effect when it creates terrain and model effects.&lt;br /&gt;
&lt;br /&gt;
In the terrain materials.xml, an &amp;quot;effect&amp;quot; property specifies the name&lt;br /&gt;
of the model to use.&lt;br /&gt;
&lt;br /&gt;
Material animations will be implemented by creating a new effect&lt;br /&gt;
that inherits from one in a model, overriding the parameters that&lt;br /&gt;
will be animated.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The $FGDATA/Effects directory contains the effects definitions; look there for&lt;br /&gt;
examples. Effects/crop.eff is a good example of a complex effect.&lt;br /&gt;
&lt;br /&gt;
== Application ==&lt;br /&gt;
To apply an effect to a model or part of a model use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;effect&amp;gt;&lt;br /&gt;
		&amp;lt;inherits-from&amp;gt;Effects/light-cone&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
		&amp;lt;object-name&amp;gt;Cone&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;inherits-from&amp;gt; &amp;lt;/inherits-from&amp;gt; contains the path to the effect you want to apply.&lt;br /&gt;
The effect does not need the file extension.&lt;br /&gt;
&lt;br /&gt;
=== Parameters in model file ===&lt;br /&gt;
&lt;br /&gt;
Parameters can be put into the model files effect application as well. But only bool, int, float, string can be used there.&lt;br /&gt;
&lt;br /&gt;
=== Chrome old usage ===&lt;br /&gt;
&lt;br /&gt;
Chrome, although now implemented as an effect, still retains the old method of application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;shader&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;shader&amp;gt;chrome&amp;lt;/shader&amp;gt;&lt;br /&gt;
			&amp;lt;texture&amp;gt;glass_shader.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
			&amp;lt;object-name&amp;gt;windscreen&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in order to maintain backward compatibility.&lt;br /&gt;
&lt;br /&gt;
== Reload effects at runtime ==&lt;br /&gt;
To reload an effect applied in a model xml file (e.g. some parameters and what it enherits from) just go into debug menu and select Reload Model.&lt;br /&gt;
&lt;br /&gt;
To reload the entire effect framework including eff files, go into menu and debug and configure development extensions and reload shaders. This is broken in 2020.1 though, but works in earlier FG versions.&lt;br /&gt;
&lt;br /&gt;
== The xml tags of an effect ==&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
The name of the effect&lt;br /&gt;
&lt;br /&gt;
=== inherits-from ===&lt;br /&gt;
One feature not fully illustrated in the sample below is that&lt;br /&gt;
effects can inherit from each other. The parent effect is listed in&lt;br /&gt;
the &amp;quot;inherits-from&amp;quot; form. The child effect's property tree is&lt;br /&gt;
overlaid over that of the parent. Nodes that have the same name and&lt;br /&gt;
property index -- set by the &amp;quot;n=&amp;quot; attribute in the property tag --&lt;br /&gt;
are recursively merged. Leaf property nodes from the child have&lt;br /&gt;
precedence.  This means that effects that inherit from the example&lt;br /&gt;
effect below could be very short, listing just new&lt;br /&gt;
parameters and adding nothing to the techniques section;&lt;br /&gt;
alternatively, a technique could be altered or customized in a&lt;br /&gt;
child, listing (for example) a different shader program. An example&lt;br /&gt;
showing inheritance Effects/crop.eff, which inherits some if its&lt;br /&gt;
values from Effects/terrain-default.eff.&lt;br /&gt;
&lt;br /&gt;
FlightGear directly uses effects inheritance to assign effects to 3D&lt;br /&gt;
models and terrain. As described below, at runtime small effects are&lt;br /&gt;
created that contain material and texture values in a &amp;quot;parameters&amp;quot;&lt;br /&gt;
section. These effects inherit from another effect which references&lt;br /&gt;
those parameters in its &amp;quot;techniques&amp;quot; section. The derived effect&lt;br /&gt;
overrides any default values that might be in the base effect's&lt;br /&gt;
parameters section.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
Custom parameters that controls the effect.&lt;br /&gt;
&lt;br /&gt;
Note that parameters can use the &amp;lt;use&amp;gt; tags to enable properties to specify the values.&lt;br /&gt;
&lt;br /&gt;
=== Generate ===&lt;br /&gt;
&lt;br /&gt;
Often shader effects need tangent vectors to work properly. These &lt;br /&gt;
tangent vectors, usually called tangent and binormal, are computed &lt;br /&gt;
on the CPU and given to the shader as vertex attributes. These &lt;br /&gt;
vectors are computed on demand on the geometry using the effect if &lt;br /&gt;
the 'generate' clause is present in the effect file. Exemple :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;generate&amp;gt;&lt;br /&gt;
		&amp;lt;tangent type=&amp;quot;int&amp;quot;&amp;gt;6&amp;lt;/tangent&amp;gt;&lt;br /&gt;
		&amp;lt;binormal type=&amp;quot;int&amp;quot;&amp;gt;7&amp;lt;/binormal&amp;gt;&lt;br /&gt;
		&amp;lt;normal type=&amp;quot;int&amp;quot;&amp;gt;8&amp;lt;/normal&amp;gt;&lt;br /&gt;
	&amp;lt;/generate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.&lt;br /&gt;
The integer value of these subnode is the index of the attribute &lt;br /&gt;
that will hold the value of the vec3 vector.&lt;br /&gt;
&lt;br /&gt;
The generate clause is located under PropertyList in the xml file.&lt;br /&gt;
&lt;br /&gt;
In order to be available for the vertex shader, these data should &lt;br /&gt;
be bound to an attribute in the program clause, like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;program&amp;gt;&lt;br /&gt;
		&amp;lt;vertex-shader&amp;gt;my_vertex_shader&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_tangent_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_binormal_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;7&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
	&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
attribute names are whatever the shader use. The index is the one &lt;br /&gt;
declared in the 'generate' clause. So because generate/tangent has &lt;br /&gt;
value 6 and my_tangent_attribute has index 6, my_tangent_attribute &lt;br /&gt;
holds the tangent value for the vertex.&lt;br /&gt;
&lt;br /&gt;
=== technique ===&lt;br /&gt;
A certain way of rendering this effect. Different pipelines typically have their own techniques.&lt;br /&gt;
&lt;br /&gt;
==== scheme ====&lt;br /&gt;
Since 2020.1, is only usable in Compositor build.&lt;br /&gt;
&lt;br /&gt;
For the compositor ALS pipeline a scheme of als-lightning has to be specified for the technique to be considered for rendering.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;scheme&amp;gt;als-lighting&amp;lt;/scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== predicate ====&lt;br /&gt;
A technique can contain a predicate that describes the OpenGL&lt;br /&gt;
functionality required to support the technique. The first&lt;br /&gt;
technique with a valid predicate in the list of techniques is used&lt;br /&gt;
to set up the graphics state of the effect. A technique with no&lt;br /&gt;
predicate is always assumed to be valid. The predicate is written in a&lt;br /&gt;
little expression language that supports the following primitives:&lt;br /&gt;
&lt;br /&gt;
and, or, equal, less, less-equal&lt;br /&gt;
glversion - returns the version number of OpenGL&lt;br /&gt;
extension-supported - returns true if an OpenGL extension is supported&lt;br /&gt;
property - returns the boolean value of a property&lt;br /&gt;
float-property - returns the float value of a property, useful inside equal, less or less-equal nodes&lt;br /&gt;
shader-language - returns the version of GLSL supported, or 0 if there is none.&lt;br /&gt;
&lt;br /&gt;
The proper way to test whether to enable a shader-based technique is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;predicate&amp;gt;&lt;br /&gt;
	  &amp;lt;and&amp;gt;&lt;br /&gt;
		&amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
		&amp;lt;less-equal&amp;gt;&lt;br /&gt;
		  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
		  &amp;lt;shader-language/&amp;gt;&lt;br /&gt;
		&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;/and&amp;gt;&lt;br /&gt;
	&amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a property set by the user to indicate what is the level &lt;br /&gt;
of quality desired. This level of quality can be checked in the predicate&lt;br /&gt;
like this :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;predicate&amp;gt;&lt;br /&gt;
      &amp;lt;and&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
	&amp;lt;less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
	  &amp;lt;float-property&amp;gt;/sim/rendering/quality-level&amp;lt;/float-property&amp;gt;&lt;br /&gt;
	&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	&amp;lt;!-- other predicate conditions --&amp;gt;&lt;br /&gt;
      &amp;lt;/and&amp;gt;&lt;br /&gt;
    &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
The range of /sim/rendering/quality-level is [0..5]&lt;br /&gt;
 * 2.0 is the threshold for relief mapping effects,&lt;br /&gt;
 * 4.0 is the threshold for geometry shader usage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;predicate&amp;gt;&lt;br /&gt;
		&amp;lt;and&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/quality-level&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/model&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;or&amp;gt;&lt;br /&gt;
			&amp;lt;less-equal&amp;gt;&lt;br /&gt;
			  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
			  &amp;lt;glversion/&amp;gt;&lt;br /&gt;
			&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
			&amp;lt;and&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shader_objects&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shading_language_100&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_vertex_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_fragment_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			&amp;lt;/and&amp;gt;&lt;br /&gt;
		  &amp;lt;/or&amp;gt;&lt;br /&gt;
		&amp;lt;/and&amp;gt;&lt;br /&gt;
	  &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== pass ====&lt;br /&gt;
A technique can consist of several passes. A pass is basically an Open&lt;br /&gt;
Scene Graph StateSet. Ultimately all OpenGL and OSG modes and state&lt;br /&gt;
attributes  will be accessable in techniques. State attributes -- that&lt;br /&gt;
is, technique properties that have children and are not just boolean&lt;br /&gt;
modes -- have an &amp;lt;active&amp;gt; parameter which enables or disables the&lt;br /&gt;
attribute. In this way a technique can declare parameters it needs,&lt;br /&gt;
but not enable the attribute at all if it is not needed; the decision&lt;br /&gt;
can be based on a parameter in the parameters section of the&lt;br /&gt;
effect. For example, effects that support transparent and opaque&lt;br /&gt;
geometry could have as part of a technique:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;blend&amp;gt;&lt;br /&gt;
		&amp;lt;active&amp;gt;&amp;lt;use&amp;gt;blend/active&amp;lt;/use&amp;gt;&amp;lt;/active&amp;gt;&lt;br /&gt;
		&amp;lt;source&amp;gt;src-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
		&amp;lt;destination&amp;gt;one-minus-src-alpha&amp;lt;/destination&amp;gt;&lt;br /&gt;
	  &amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if the blend/active parameter is true blending will be activated&lt;br /&gt;
using the usual blending equation; otherwise blending is disabled.&lt;br /&gt;
&lt;br /&gt;
Values are assigned to technique properties in several ways:&lt;br /&gt;
&lt;br /&gt;
	* They can appear directly in the techniques section as a&lt;br /&gt;
		constant. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;uniform&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;ColorsTex&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;sampler-1d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
		&amp;lt;/uniform&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		* The name of a property in the parameters section can be&lt;br /&gt;
		referenced using a &amp;quot;use&amp;quot; clause. For example, in the technique&lt;br /&gt;
		section:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;material&amp;gt;&lt;br /&gt;
			&amp;lt;ambient&amp;gt;&amp;lt;use&amp;gt;material/ambient&amp;lt;/use&amp;gt;&amp;lt;/ambient&amp;gt;&lt;br /&gt;
		&amp;lt;/material&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		Then, in the parameters section of the effect:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;material&amp;gt;&lt;br /&gt;
				&amp;lt;ambient type=&amp;quot;vec4d&amp;quot;&amp;gt;0.2 0.2 0.2 1.0&amp;lt;/ambient&amp;gt;&lt;br /&gt;
			&amp;lt;/material&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		It's worth pointing out that the &amp;quot;material&amp;quot; property in a&lt;br /&gt;
		technique specifies part of OpenGL's state, whereas &amp;quot;material&amp;quot;&lt;br /&gt;
		in the parameters section is just a name, part of a&lt;br /&gt;
		hierarchical namespace.&lt;br /&gt;
&lt;br /&gt;
		* A property in the parameters section doesn't need to contain&lt;br /&gt;
		a constant value; it can also contain a &amp;quot;use&amp;quot; property. Here&lt;br /&gt;
		the value of the use clause is the name of a node in an&lt;br /&gt;
		external property tree which will be used as the source of a&lt;br /&gt;
		value. If the name begins with '/', the node is in&lt;br /&gt;
		FlightGear's global property tree; otherwise, it is in a local&lt;br /&gt;
		property tree, usually belonging to a model [NOT IMPLEMENTED&lt;br /&gt;
		YET]. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;chrome-light&amp;gt;&amp;lt;use&amp;gt;/rendering/scene/chrome-light&amp;lt;/use&amp;gt;&amp;lt;/chrome-light&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		The type is determined by what is expected by the technique&lt;br /&gt;
		attribute that will ultimately receive the value. [There is&lt;br /&gt;
		no way to get vector values out of the main property system&lt;br /&gt;
		yet; this will be fixed shortly.] Values that are declared&lt;br /&gt;
		this way are dynamically updated if the property node&lt;br /&gt;
		changes.&lt;br /&gt;
&lt;br /&gt;
===== lighting =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== material =====&lt;br /&gt;
children: active, ambient, ambient-front, ambient-back, diffuse,&lt;br /&gt;
		 diffuse-front, diffuse-back, specular, specular-front,&lt;br /&gt;
		 specular-back, emissive, emissive-front, emissive-back, shininess,&lt;br /&gt;
		 shininess-front, shininess-back, color-mode&lt;br /&gt;
&lt;br /&gt;
===== blend =====&lt;br /&gt;
Children: active, source, destination, source-rgb, source-alpha, destination-rgb, destination-alpha&lt;br /&gt;
&lt;br /&gt;
Children values: dst-alpha, dst-color, one, one-minus-dst-alpha, one-minus-dst-color, one-minus-src-alpha, one-minus-src-color, src-alpha, src-alpha-saturate, src-color, constant-color, one-minus-constant-color, constant-alpha, one-minus-constant-alpha, zero&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;&lt;br /&gt;
                        &amp;lt;active&amp;gt;true&amp;lt;/active&amp;gt;&lt;br /&gt;
                        &amp;lt;source&amp;gt;one-minus-dst-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
			&amp;lt;destination&amp;gt;src-alpha-saturate&amp;lt;/destination&amp;gt;&lt;br /&gt;
		&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== blend (simple) =====&lt;br /&gt;
A blend tag with 0 will do nothing.&lt;br /&gt;
A blend tag with 1 will do the same as source-alpha: one-minus-dst-alpha, in other words it will enable z transparency using alpha from the fragment shader.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;1&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== shade-model =====&lt;br /&gt;
flat or smooth&lt;br /&gt;
&lt;br /&gt;
===== cull-face =====&lt;br /&gt;
front, back, front-back, off&lt;br /&gt;
&lt;br /&gt;
===== texture-unit =====&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;texture-unit&amp;gt;&lt;br /&gt;
                        &amp;lt;unit&amp;gt;3&amp;lt;/unit&amp;gt;&lt;br /&gt;
			&amp;lt;image&amp;gt;Textures/Terrain/void.png&amp;lt;/image&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
                        &amp;lt;mag-filter&amp;gt;linear-mipmap-linear&amp;lt;/mag-filter&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
                        &amp;lt;wrap-r&amp;gt;repeat&amp;lt;/wrap-r&amp;gt;&lt;br /&gt;
			&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
                        &amp;lt;mipmap-control&amp;gt;&lt;br /&gt;
                            &amp;lt;function-r&amp;gt;average&amp;lt;/function-r&amp;gt;&lt;br /&gt;
			    &amp;lt;function-g&amp;gt;min&amp;lt;/function-g&amp;gt;&lt;br /&gt;
                            &amp;lt;function-b&amp;gt;sum&amp;lt;/function-b&amp;gt;&lt;br /&gt;
			    &amp;lt;function-a&amp;gt;product&amp;lt;/function-a&amp;gt;&lt;br /&gt;
                        &amp;lt;/mipmap-control&amp;gt;&lt;br /&gt;
                        &amp;lt;environment&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;decal&amp;lt;/mode&amp;gt; &lt;br /&gt;
                            &amp;lt;color&amp;gt;0.0 0.1 0.6 1.0&amp;lt;/color&amp;gt;&lt;br /&gt;
                        &amp;lt;/environment&amp;gt;&lt;br /&gt;
                        &amp;lt;point-sprite&amp;gt;true&amp;lt;/point-sprite&amp;gt;&lt;br /&gt;
                        &amp;lt;texenv-combine&amp;gt;operand0-rgb&amp;lt;/texenv-combine&amp;gt;&lt;br /&gt;
                        &amp;lt;texgen&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;S&amp;lt;/mode&amp;gt;&lt;br /&gt;
                            &amp;lt;planes&amp;gt;0.075, 0.0, 0.0, 0.5&amp;lt;/planes&amp;gt;&lt;br /&gt;
                        &amp;lt;/texgen&amp;gt;&lt;br /&gt;
		&amp;lt;/texture-unit&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-two-side =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== polygon-mode =====&lt;br /&gt;
children: front, back&lt;br /&gt;
&lt;br /&gt;
Valid values:  fill, line, point&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-point-size =====&lt;br /&gt;
true, false&lt;br /&gt;
&lt;br /&gt;
===== uniform =====&lt;br /&gt;
Data accessible by shaders.&lt;br /&gt;
&lt;br /&gt;
name: the name&lt;br /&gt;
&lt;br /&gt;
type: bool, int, float, float-vec3, float-vec4, sampler-1d, sampler-2d, sampler-3d, sampler-1d-shadow, sampler-2d-shadow, sampler-cube&lt;br /&gt;
&lt;br /&gt;
===== alpha-test =====&lt;br /&gt;
&lt;br /&gt;
active: true, false&lt;br /&gt;
&lt;br /&gt;
comparison: never, less, equal, lequal, greater, notequal, gequal, always&lt;br /&gt;
&lt;br /&gt;
reference: 0 to 1&lt;br /&gt;
&lt;br /&gt;
===== render-bin =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
bin-number: This is an integer defining the order stuff will be rendered in, it can be negative also.&lt;br /&gt;
&lt;br /&gt;
bin-name: RenderBin, DepthSortedBin&lt;br /&gt;
&lt;br /&gt;
===== rendering-hint =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
default, opaque, transparent&lt;br /&gt;
&lt;br /&gt;
This basically just sets Renderbin:&lt;br /&gt;
&lt;br /&gt;
opaque = bin 10, depthsortedbin&lt;br /&gt;
&lt;br /&gt;
transparent = bin 0, renderbin&lt;br /&gt;
&lt;br /&gt;
default = inherit renderbin details from parent node&lt;br /&gt;
&lt;br /&gt;
===== program =====&lt;br /&gt;
* vertex-shader&lt;br /&gt;
* geometry-shader&lt;br /&gt;
* fragment-shader&lt;br /&gt;
* attribute&lt;br /&gt;
* geometry-vertices-out: integer, max number of vertices emitted by geometry shader&lt;br /&gt;
* geometry-input-type: points, lines, lines-adjacency, triangles, triangles-adjacency&lt;br /&gt;
* geometry-output-type: points, line-strip, triangle-strip&lt;br /&gt;
* uniform-block-binding: has name and index (since 2020.1)&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example for clustered lightning in compositor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;fragment-shader n=&amp;quot;3&amp;quot;&amp;gt;Shaders/ALS/clustered-include.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;PointLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;5&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
		                &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		                   &amp;lt;name&amp;gt;SpotLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		                   &amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		                &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See this page for more about shaders: [[Howto:Shader programming in FlightGear]]&lt;br /&gt;
&lt;br /&gt;
== Uniforms passed to shaders outside the xml effect framework ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Type&lt;br /&gt;
!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix used to transform from world to view space. Same as osg_ViewMatrix, but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix inverse used to transform from view to world space. Same as osg_ViewMatrixInverse but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ProjectionMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, projection matrix inverse&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionCart&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in cartesian coordinates&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionGeod&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in geodesic coordinates (longitude in radians, latitude in radians, elevation in meters)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunAmbientColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDiffuseColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunSpecularColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDirection&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogDensity&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowDistances&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_DepthInColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Tells if the depth is stored in a depth texture or a color texture&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_Planes&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Used to convert the value of the depth buffer to a depth that can be used to compute the eye space position of the fragment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_BufferSize&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Dimensions of the buffer, used to convert gl_FragCoord into the range [0..1][0..1]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from world to view space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from view to world space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_SimulationTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_DeltaFrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=37364|title=Application of effects}} - Testing which kind of groups an effect can be applied to and when&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124642</id>
		<title>Effect framework</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124642"/>
		<updated>2020-05-12T14:49:24Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* program */ added uniform-block-binding&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
The effect framework as per version 2020.1&lt;br /&gt;
&lt;br /&gt;
Effects describe the graphical appearance of 3D objects and scenery in&lt;br /&gt;
FlightGear. The main motivation for effects is to support OpenGL&lt;br /&gt;
shaders and to provide different implementations for graphics hardware&lt;br /&gt;
of varying capabilities. Effects are similar to DirectX effects files&lt;br /&gt;
and Ogre3D material scripts.&lt;br /&gt;
&lt;br /&gt;
An effect is a property list. The property list syntax is extended&lt;br /&gt;
with new &amp;quot;vec3d&amp;quot; and &amp;quot;vec4d&amp;quot; types to support common computer graphics&lt;br /&gt;
values. Effects are read from files with a &amp;quot;.eff&amp;quot; extension or can be&lt;br /&gt;
created on-the-fly by FlightGear at runtime.  An effect consists of a&lt;br /&gt;
&amp;quot;parameters&amp;quot; section followed by &amp;quot;technique&amp;quot; descriptions.  The&lt;br /&gt;
&amp;quot;parameters&amp;quot; section is a tree of values that describe, abstractly,&lt;br /&gt;
the graphical characteristics of objects that use the effect. Techniques&lt;br /&gt;
refer to these parameters and use them to set OpenGL state or to set&lt;br /&gt;
parameters for shader programs. The names of properties in the&lt;br /&gt;
parameter section can be whatever the effects author chooses, although&lt;br /&gt;
some standard parameters  are set by FlightGear itself. On the other&lt;br /&gt;
hand, the properties in the techniques section are all defined by the&lt;br /&gt;
FlightGear. &lt;br /&gt;
&lt;br /&gt;
== Default Effects in Terrain Materials and Models ==&lt;br /&gt;
Effects for terrain work in this way: for each material type in&lt;br /&gt;
materials.xml an effect is created that inherits from a single default&lt;br /&gt;
terrain effect, Effects/terrain-default.eff. The parameters section of&lt;br /&gt;
the effect is filled in using the ambient, diffuse, specular,&lt;br /&gt;
emissive, shininess, and transparent fields of the material. The&lt;br /&gt;
parameters image, filter, wrap-s, and wrap-t are also initialized from&lt;br /&gt;
the material xml. Seperate effects are created for each texture&lt;br /&gt;
variant of a material.&lt;br /&gt;
&lt;br /&gt;
Model effects are created by walking the OpenSceneGraph scene graph&lt;br /&gt;
for a model and replacing nodes (osg::Geode) that have state sets with&lt;br /&gt;
node that uses an effect instead. Again, a small effect is created&lt;br /&gt;
with parameters extracted from OSG objects; this effect inherits, by&lt;br /&gt;
default, from Effects/model-default.eff. A larger set of parameters is&lt;br /&gt;
created for model effects than for terrain because there is more&lt;br /&gt;
variation possible from the OSG model loaders than from the terrain&lt;br /&gt;
system. The parameters created are: &lt;br /&gt;
&lt;br /&gt;
* material active, ambient, diffuse, specular, emissive, shininess, color mode&lt;br /&gt;
# blend active, source, destination&lt;br /&gt;
# shade-model&lt;br /&gt;
# cull-face&lt;br /&gt;
* rendering-hint&lt;br /&gt;
* texture type, image, filter, wrap-s, wrap-t&lt;br /&gt;
&lt;br /&gt;
== Specifying Custom Effects ==&lt;br /&gt;
You can specify the effects that will be used by FlightGear as the&lt;br /&gt;
base effect when it creates terrain and model effects.&lt;br /&gt;
&lt;br /&gt;
In the terrain materials.xml, an &amp;quot;effect&amp;quot; property specifies the name&lt;br /&gt;
of the model to use.&lt;br /&gt;
&lt;br /&gt;
Material animations will be implemented by creating a new effect&lt;br /&gt;
that inherits from one in a model, overriding the parameters that&lt;br /&gt;
will be animated.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The $FGDATA/Effects directory contains the effects definitions; look there for&lt;br /&gt;
examples. Effects/crop.eff is a good example of a complex effect.&lt;br /&gt;
&lt;br /&gt;
== Application ==&lt;br /&gt;
To apply an effect to a model or part of a model use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;effect&amp;gt;&lt;br /&gt;
		&amp;lt;inherits-from&amp;gt;Effects/light-cone&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
		&amp;lt;object-name&amp;gt;Cone&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;inherits-from&amp;gt; &amp;lt;/inherits-from&amp;gt; contains the path to the effect you want to apply.&lt;br /&gt;
The effect does not need the file extension.&lt;br /&gt;
&lt;br /&gt;
=== Parameters in model file ===&lt;br /&gt;
&lt;br /&gt;
Parameters can be put into the model files effect application as well. But only bool, int, float, string can be used there.&lt;br /&gt;
&lt;br /&gt;
=== Chrome old usage ===&lt;br /&gt;
&lt;br /&gt;
Chrome, although now implemented as an effect, still retains the old method of application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;shader&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;shader&amp;gt;chrome&amp;lt;/shader&amp;gt;&lt;br /&gt;
			&amp;lt;texture&amp;gt;glass_shader.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
			&amp;lt;object-name&amp;gt;windscreen&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in order to maintain backward compatibility.&lt;br /&gt;
&lt;br /&gt;
== Reload effects at runtime ==&lt;br /&gt;
To reload an effect applied in a model xml file (e.g. some parameters and what it enherits from) just go into debug menu and select Reload Model.&lt;br /&gt;
&lt;br /&gt;
To reload the entire effect framework including eff files, go into menu and debug and configure development extensions and reload shaders. This is broken in 2020.1 though, but works in earlier FG versions.&lt;br /&gt;
&lt;br /&gt;
== The xml tags of an effect ==&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
The name of the effect&lt;br /&gt;
&lt;br /&gt;
=== inherits-from ===&lt;br /&gt;
One feature not fully illustrated in the sample below is that&lt;br /&gt;
effects can inherit from each other. The parent effect is listed in&lt;br /&gt;
the &amp;quot;inherits-from&amp;quot; form. The child effect's property tree is&lt;br /&gt;
overlaid over that of the parent. Nodes that have the same name and&lt;br /&gt;
property index -- set by the &amp;quot;n=&amp;quot; attribute in the property tag --&lt;br /&gt;
are recursively merged. Leaf property nodes from the child have&lt;br /&gt;
precedence.  This means that effects that inherit from the example&lt;br /&gt;
effect below could be very short, listing just new&lt;br /&gt;
parameters and adding nothing to the techniques section;&lt;br /&gt;
alternatively, a technique could be altered or customized in a&lt;br /&gt;
child, listing (for example) a different shader program. An example&lt;br /&gt;
showing inheritance Effects/crop.eff, which inherits some if its&lt;br /&gt;
values from Effects/terrain-default.eff.&lt;br /&gt;
&lt;br /&gt;
FlightGear directly uses effects inheritance to assign effects to 3D&lt;br /&gt;
models and terrain. As described below, at runtime small effects are&lt;br /&gt;
created that contain material and texture values in a &amp;quot;parameters&amp;quot;&lt;br /&gt;
section. These effects inherit from another effect which references&lt;br /&gt;
those parameters in its &amp;quot;techniques&amp;quot; section. The derived effect&lt;br /&gt;
overrides any default values that might be in the base effect's&lt;br /&gt;
parameters section.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
Custom parameters that controls the effect.&lt;br /&gt;
&lt;br /&gt;
Note that parameters can use the &amp;lt;use&amp;gt; tags to enable properties to specify the values.&lt;br /&gt;
&lt;br /&gt;
=== Generate ===&lt;br /&gt;
&lt;br /&gt;
Often shader effects need tangent vectors to work properly. These &lt;br /&gt;
tangent vectors, usually called tangent and binormal, are computed &lt;br /&gt;
on the CPU and given to the shader as vertex attributes. These &lt;br /&gt;
vectors are computed on demand on the geometry using the effect if &lt;br /&gt;
the 'generate' clause is present in the effect file. Exemple :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;generate&amp;gt;&lt;br /&gt;
		&amp;lt;tangent type=&amp;quot;int&amp;quot;&amp;gt;6&amp;lt;/tangent&amp;gt;&lt;br /&gt;
		&amp;lt;binormal type=&amp;quot;int&amp;quot;&amp;gt;7&amp;lt;/binormal&amp;gt;&lt;br /&gt;
		&amp;lt;normal type=&amp;quot;int&amp;quot;&amp;gt;8&amp;lt;/normal&amp;gt;&lt;br /&gt;
	&amp;lt;/generate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.&lt;br /&gt;
The integer value of these subnode is the index of the attribute &lt;br /&gt;
that will hold the value of the vec3 vector.&lt;br /&gt;
&lt;br /&gt;
The generate clause is located under PropertyList in the xml file.&lt;br /&gt;
&lt;br /&gt;
In order to be available for the vertex shader, these data should &lt;br /&gt;
be bound to an attribute in the program clause, like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;program&amp;gt;&lt;br /&gt;
		&amp;lt;vertex-shader&amp;gt;my_vertex_shader&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_tangent_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_binormal_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;7&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
	&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
attribute names are whatever the shader use. The index is the one &lt;br /&gt;
declared in the 'generate' clause. So because generate/tangent has &lt;br /&gt;
value 6 and my_tangent_attribute has index 6, my_tangent_attribute &lt;br /&gt;
holds the tangent value for the vertex.&lt;br /&gt;
&lt;br /&gt;
=== technique ===&lt;br /&gt;
A certain way of rendering this effect. Different pipelines typically have their own techniques.&lt;br /&gt;
&lt;br /&gt;
==== scheme ====&lt;br /&gt;
Since 2020.1, is only usable in Compositor build.&lt;br /&gt;
&lt;br /&gt;
For the compositor ALS pipeline a scheme of als-lightning has to be specified for the technique to be considered for rendering.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;scheme&amp;gt;als-lighting&amp;lt;/scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== predicate ====&lt;br /&gt;
A technique can contain a predicate that describes the OpenGL&lt;br /&gt;
functionality required to support the technique. The first&lt;br /&gt;
technique with a valid predicate in the list of techniques is used&lt;br /&gt;
to set up the graphics state of the effect. A technique with no&lt;br /&gt;
predicate is always assumed to be valid. The predicate is written in a&lt;br /&gt;
little expression language that supports the following primitives:&lt;br /&gt;
&lt;br /&gt;
and, or, equal, less, less-equal&lt;br /&gt;
glversion - returns the version number of OpenGL&lt;br /&gt;
extension-supported - returns true if an OpenGL extension is supported&lt;br /&gt;
property - returns the boolean value of a property&lt;br /&gt;
float-property - returns the float value of a property, useful inside equal, less or less-equal nodes&lt;br /&gt;
shader-language - returns the version of GLSL supported, or 0 if there is none.&lt;br /&gt;
&lt;br /&gt;
The proper way to test whether to enable a shader-based technique is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;predicate&amp;gt;&lt;br /&gt;
	  &amp;lt;and&amp;gt;&lt;br /&gt;
		&amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
		&amp;lt;less-equal&amp;gt;&lt;br /&gt;
		  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
		  &amp;lt;shader-language/&amp;gt;&lt;br /&gt;
		&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;/and&amp;gt;&lt;br /&gt;
	&amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a property set by the user to indicate what is the level &lt;br /&gt;
of quality desired. This level of quality can be checked in the predicate&lt;br /&gt;
like this :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;predicate&amp;gt;&lt;br /&gt;
      &amp;lt;and&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
	&amp;lt;less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
	  &amp;lt;float-property&amp;gt;/sim/rendering/quality-level&amp;lt;/float-property&amp;gt;&lt;br /&gt;
	&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	&amp;lt;!-- other predicate conditions --&amp;gt;&lt;br /&gt;
      &amp;lt;/and&amp;gt;&lt;br /&gt;
    &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
The range of /sim/rendering/quality-level is [0..5]&lt;br /&gt;
 * 2.0 is the threshold for relief mapping effects,&lt;br /&gt;
 * 4.0 is the threshold for geometry shader usage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;predicate&amp;gt;&lt;br /&gt;
		&amp;lt;and&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/quality-level&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/model&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;or&amp;gt;&lt;br /&gt;
			&amp;lt;less-equal&amp;gt;&lt;br /&gt;
			  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
			  &amp;lt;glversion/&amp;gt;&lt;br /&gt;
			&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
			&amp;lt;and&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shader_objects&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shading_language_100&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_vertex_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_fragment_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			&amp;lt;/and&amp;gt;&lt;br /&gt;
		  &amp;lt;/or&amp;gt;&lt;br /&gt;
		&amp;lt;/and&amp;gt;&lt;br /&gt;
	  &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== pass ====&lt;br /&gt;
A technique can consist of several passes. A pass is basically an Open&lt;br /&gt;
Scene Graph StateSet. Ultimately all OpenGL and OSG modes and state&lt;br /&gt;
attributes  will be accessable in techniques. State attributes -- that&lt;br /&gt;
is, technique properties that have children and are not just boolean&lt;br /&gt;
modes -- have an &amp;lt;active&amp;gt; parameter which enables or disables the&lt;br /&gt;
attribute. In this way a technique can declare parameters it needs,&lt;br /&gt;
but not enable the attribute at all if it is not needed; the decision&lt;br /&gt;
can be based on a parameter in the parameters section of the&lt;br /&gt;
effect. For example, effects that support transparent and opaque&lt;br /&gt;
geometry could have as part of a technique:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;blend&amp;gt;&lt;br /&gt;
		&amp;lt;active&amp;gt;&amp;lt;use&amp;gt;blend/active&amp;lt;/use&amp;gt;&amp;lt;/active&amp;gt;&lt;br /&gt;
		&amp;lt;source&amp;gt;src-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
		&amp;lt;destination&amp;gt;one-minus-src-alpha&amp;lt;/destination&amp;gt;&lt;br /&gt;
	  &amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if the blend/active parameter is true blending will be activated&lt;br /&gt;
using the usual blending equation; otherwise blending is disabled.&lt;br /&gt;
&lt;br /&gt;
Values are assigned to technique properties in several ways:&lt;br /&gt;
&lt;br /&gt;
	* They can appear directly in the techniques section as a&lt;br /&gt;
		constant. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;uniform&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;ColorsTex&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;sampler-1d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
		&amp;lt;/uniform&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		* The name of a property in the parameters section can be&lt;br /&gt;
		referenced using a &amp;quot;use&amp;quot; clause. For example, in the technique&lt;br /&gt;
		section:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;material&amp;gt;&lt;br /&gt;
			&amp;lt;ambient&amp;gt;&amp;lt;use&amp;gt;material/ambient&amp;lt;/use&amp;gt;&amp;lt;/ambient&amp;gt;&lt;br /&gt;
		&amp;lt;/material&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		Then, in the parameters section of the effect:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;material&amp;gt;&lt;br /&gt;
				&amp;lt;ambient type=&amp;quot;vec4d&amp;quot;&amp;gt;0.2 0.2 0.2 1.0&amp;lt;/ambient&amp;gt;&lt;br /&gt;
			&amp;lt;/material&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		It's worth pointing out that the &amp;quot;material&amp;quot; property in a&lt;br /&gt;
		technique specifies part of OpenGL's state, whereas &amp;quot;material&amp;quot;&lt;br /&gt;
		in the parameters section is just a name, part of a&lt;br /&gt;
		hierarchical namespace.&lt;br /&gt;
&lt;br /&gt;
		* A property in the parameters section doesn't need to contain&lt;br /&gt;
		a constant value; it can also contain a &amp;quot;use&amp;quot; property. Here&lt;br /&gt;
		the value of the use clause is the name of a node in an&lt;br /&gt;
		external property tree which will be used as the source of a&lt;br /&gt;
		value. If the name begins with '/', the node is in&lt;br /&gt;
		FlightGear's global property tree; otherwise, it is in a local&lt;br /&gt;
		property tree, usually belonging to a model [NOT IMPLEMENTED&lt;br /&gt;
		YET]. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;chrome-light&amp;gt;&amp;lt;use&amp;gt;/rendering/scene/chrome-light&amp;lt;/use&amp;gt;&amp;lt;/chrome-light&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		The type is determined by what is expected by the technique&lt;br /&gt;
		attribute that will ultimately receive the value. [There is&lt;br /&gt;
		no way to get vector values out of the main property system&lt;br /&gt;
		yet; this will be fixed shortly.] Values that are declared&lt;br /&gt;
		this way are dynamically updated if the property node&lt;br /&gt;
		changes.&lt;br /&gt;
&lt;br /&gt;
===== lighting =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== material =====&lt;br /&gt;
children: active, ambient, ambient-front, ambient-back, diffuse,&lt;br /&gt;
		 diffuse-front, diffuse-back, specular, specular-front,&lt;br /&gt;
		 specular-back, emissive, emissive-front, emissive-back, shininess,&lt;br /&gt;
		 shininess-front, shininess-back, color-mode&lt;br /&gt;
&lt;br /&gt;
===== blend =====&lt;br /&gt;
Children: active, source, destination, source-rgb, source-alpha, destination-rgb, destination-alpha&lt;br /&gt;
&lt;br /&gt;
Children values: dst-alpha, dst-color, one, one-minus-dst-alpha, one-minus-dst-color, one-minus-src-alpha, one-minus-src-color, src-alpha, src-alpha-saturate, src-color, constant-color, one-minus-constant-color, constant-alpha, one-minus-constant-alpha, zero&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;&lt;br /&gt;
                        &amp;lt;active&amp;gt;true&amp;lt;/active&amp;gt;&lt;br /&gt;
                        &amp;lt;source&amp;gt;one-minus-dst-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
			&amp;lt;destination&amp;gt;src-alpha-saturate&amp;lt;/destination&amp;gt;&lt;br /&gt;
		&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== blend (simple) =====&lt;br /&gt;
A blend tag with 0 will do nothing.&lt;br /&gt;
A blend tag with 1 will do the same as source-alpha: one-minus-dst-alpha, in other words it will enable z transparency using alpha from the fragment shader.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;1&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== shade-model =====&lt;br /&gt;
flat or smooth&lt;br /&gt;
&lt;br /&gt;
===== cull-face =====&lt;br /&gt;
front, back, front-back, off&lt;br /&gt;
&lt;br /&gt;
===== texture-unit =====&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;texture-unit&amp;gt;&lt;br /&gt;
                        &amp;lt;unit&amp;gt;3&amp;lt;/unit&amp;gt;&lt;br /&gt;
			&amp;lt;image&amp;gt;Textures/Terrain/void.png&amp;lt;/image&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
                        &amp;lt;mag-filter&amp;gt;linear-mipmap-linear&amp;lt;/mag-filter&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
                        &amp;lt;wrap-r&amp;gt;repeat&amp;lt;/wrap-r&amp;gt;&lt;br /&gt;
			&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
                        &amp;lt;mipmap-control&amp;gt;&lt;br /&gt;
                            &amp;lt;function-r&amp;gt;average&amp;lt;/function-r&amp;gt;&lt;br /&gt;
			    &amp;lt;function-g&amp;gt;min&amp;lt;/function-g&amp;gt;&lt;br /&gt;
                            &amp;lt;function-b&amp;gt;sum&amp;lt;/function-b&amp;gt;&lt;br /&gt;
			    &amp;lt;function-a&amp;gt;product&amp;lt;/function-a&amp;gt;&lt;br /&gt;
                        &amp;lt;/mipmap-control&amp;gt;&lt;br /&gt;
                        &amp;lt;environment&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;decal&amp;lt;/mode&amp;gt; &lt;br /&gt;
                            &amp;lt;color&amp;gt;0.0 0.1 0.6 1.0&amp;lt;/color&amp;gt;&lt;br /&gt;
                        &amp;lt;/environment&amp;gt;&lt;br /&gt;
                        &amp;lt;point-sprite&amp;gt;true&amp;lt;/point-sprite&amp;gt;&lt;br /&gt;
                        &amp;lt;texenv-combine&amp;gt;operand0-rgb&amp;lt;/texenv-combine&amp;gt;&lt;br /&gt;
                        &amp;lt;texgen&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;S&amp;lt;/mode&amp;gt;&lt;br /&gt;
                            &amp;lt;planes&amp;gt;0.075, 0.0, 0.0, 0.5&amp;lt;/planes&amp;gt;&lt;br /&gt;
                        &amp;lt;/texgen&amp;gt;&lt;br /&gt;
		&amp;lt;/texture-unit&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-two-side =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== polygon-mode =====&lt;br /&gt;
children: front, back&lt;br /&gt;
&lt;br /&gt;
Valid values:  fill, line, point&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-point-size =====&lt;br /&gt;
true, false&lt;br /&gt;
&lt;br /&gt;
===== uniform =====&lt;br /&gt;
Data accessible by shaders.&lt;br /&gt;
&lt;br /&gt;
name: the name&lt;br /&gt;
&lt;br /&gt;
type: bool, int, float, float-vec3, float-vec4, sampler-1d, sampler-2d, sampler-3d, sampler-1d-shadow, sampler-2d-shadow, sampler-cube&lt;br /&gt;
&lt;br /&gt;
===== alpha-test =====&lt;br /&gt;
&lt;br /&gt;
active: true, false&lt;br /&gt;
&lt;br /&gt;
comparison: never, less, equal, lequal, greater, notequal, gequal, always&lt;br /&gt;
&lt;br /&gt;
reference: 0 to 1&lt;br /&gt;
&lt;br /&gt;
===== render-bin =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
bin-number: This is an integer defining the order stuff will be rendered in, it can be negative also.&lt;br /&gt;
&lt;br /&gt;
bin-name: RenderBin, DepthSortedBin&lt;br /&gt;
&lt;br /&gt;
===== rendering-hint =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
default, opaque, transparent&lt;br /&gt;
&lt;br /&gt;
This basically just sets Renderbin:&lt;br /&gt;
&lt;br /&gt;
opaque = bin 10, depthsortedbin&lt;br /&gt;
&lt;br /&gt;
transparent = bin 0, renderbin&lt;br /&gt;
&lt;br /&gt;
default = inherit renderbin details from parent node&lt;br /&gt;
&lt;br /&gt;
===== program =====&lt;br /&gt;
* vertex-shader&lt;br /&gt;
* geometry-shader&lt;br /&gt;
* fragment-shader&lt;br /&gt;
* attribute&lt;br /&gt;
* geometry-vertices-out: integer, max number of vertices emitted by geometry shader&lt;br /&gt;
* geometry-input-type: points, lines, lines-adjacency, triangles, triangles-adjacency&lt;br /&gt;
* geometry-output-type: points, line-strip, triangle-strip&lt;br /&gt;
* uniform-block-binding: has name and index (since 2020.1)&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example for clustered lightning in compositor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                                &amp;lt;fragment-shader n=&amp;quot;3&amp;quot;&amp;gt;Shaders/ALS/clustered-include.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
                            &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		          &amp;lt;name&amp;gt;PointLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		          &amp;lt;index&amp;gt;5&amp;lt;/index&amp;gt;&lt;br /&gt;
		        &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
		        &amp;lt;uniform-block-binding&amp;gt;&lt;br /&gt;
		          &amp;lt;name&amp;gt;SpotLightBlock&amp;lt;/name&amp;gt;&lt;br /&gt;
		          &amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		        &amp;lt;/uniform-block-binding&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See this page for more about shaders: [[Howto:Shader programming in FlightGear]]&lt;br /&gt;
&lt;br /&gt;
== Uniforms passed to shaders outside the xml effect framework ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Type&lt;br /&gt;
!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix used to transform from world to view space. Same as osg_ViewMatrix, but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix inverse used to transform from view to world space. Same as osg_ViewMatrixInverse but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ProjectionMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, projection matrix inverse&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionCart&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in cartesian coordinates&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionGeod&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in geodesic coordinates (longitude in radians, latitude in radians, elevation in meters)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunAmbientColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDiffuseColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunSpecularColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDirection&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogDensity&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowDistances&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_DepthInColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Tells if the depth is stored in a depth texture or a color texture&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_Planes&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Used to convert the value of the depth buffer to a depth that can be used to compute the eye space position of the fragment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_BufferSize&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Dimensions of the buffer, used to convert gl_FragCoord into the range [0..1][0..1]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from world to view space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from view to world space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_SimulationTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_DeltaFrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=37364|title=Application of effects}} - Testing which kind of groups an effect can be applied to and when&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124641</id>
		<title>Effect framework</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Effect_framework&amp;diff=124641"/>
		<updated>2020-05-12T14:44:15Z</updated>

		<summary type="html">&lt;p&gt;Necolatis: /* scheme */ added section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{forum|47|Effects &amp;amp; Shaders}}&lt;br /&gt;
{{Rendering}}&lt;br /&gt;
The effect framework as per version 2020.1&lt;br /&gt;
&lt;br /&gt;
Effects describe the graphical appearance of 3D objects and scenery in&lt;br /&gt;
FlightGear. The main motivation for effects is to support OpenGL&lt;br /&gt;
shaders and to provide different implementations for graphics hardware&lt;br /&gt;
of varying capabilities. Effects are similar to DirectX effects files&lt;br /&gt;
and Ogre3D material scripts.&lt;br /&gt;
&lt;br /&gt;
An effect is a property list. The property list syntax is extended&lt;br /&gt;
with new &amp;quot;vec3d&amp;quot; and &amp;quot;vec4d&amp;quot; types to support common computer graphics&lt;br /&gt;
values. Effects are read from files with a &amp;quot;.eff&amp;quot; extension or can be&lt;br /&gt;
created on-the-fly by FlightGear at runtime.  An effect consists of a&lt;br /&gt;
&amp;quot;parameters&amp;quot; section followed by &amp;quot;technique&amp;quot; descriptions.  The&lt;br /&gt;
&amp;quot;parameters&amp;quot; section is a tree of values that describe, abstractly,&lt;br /&gt;
the graphical characteristics of objects that use the effect. Techniques&lt;br /&gt;
refer to these parameters and use them to set OpenGL state or to set&lt;br /&gt;
parameters for shader programs. The names of properties in the&lt;br /&gt;
parameter section can be whatever the effects author chooses, although&lt;br /&gt;
some standard parameters  are set by FlightGear itself. On the other&lt;br /&gt;
hand, the properties in the techniques section are all defined by the&lt;br /&gt;
FlightGear. &lt;br /&gt;
&lt;br /&gt;
== Default Effects in Terrain Materials and Models ==&lt;br /&gt;
Effects for terrain work in this way: for each material type in&lt;br /&gt;
materials.xml an effect is created that inherits from a single default&lt;br /&gt;
terrain effect, Effects/terrain-default.eff. The parameters section of&lt;br /&gt;
the effect is filled in using the ambient, diffuse, specular,&lt;br /&gt;
emissive, shininess, and transparent fields of the material. The&lt;br /&gt;
parameters image, filter, wrap-s, and wrap-t are also initialized from&lt;br /&gt;
the material xml. Seperate effects are created for each texture&lt;br /&gt;
variant of a material.&lt;br /&gt;
&lt;br /&gt;
Model effects are created by walking the OpenSceneGraph scene graph&lt;br /&gt;
for a model and replacing nodes (osg::Geode) that have state sets with&lt;br /&gt;
node that uses an effect instead. Again, a small effect is created&lt;br /&gt;
with parameters extracted from OSG objects; this effect inherits, by&lt;br /&gt;
default, from Effects/model-default.eff. A larger set of parameters is&lt;br /&gt;
created for model effects than for terrain because there is more&lt;br /&gt;
variation possible from the OSG model loaders than from the terrain&lt;br /&gt;
system. The parameters created are: &lt;br /&gt;
&lt;br /&gt;
* material active, ambient, diffuse, specular, emissive, shininess, color mode&lt;br /&gt;
# blend active, source, destination&lt;br /&gt;
# shade-model&lt;br /&gt;
# cull-face&lt;br /&gt;
* rendering-hint&lt;br /&gt;
* texture type, image, filter, wrap-s, wrap-t&lt;br /&gt;
&lt;br /&gt;
== Specifying Custom Effects ==&lt;br /&gt;
You can specify the effects that will be used by FlightGear as the&lt;br /&gt;
base effect when it creates terrain and model effects.&lt;br /&gt;
&lt;br /&gt;
In the terrain materials.xml, an &amp;quot;effect&amp;quot; property specifies the name&lt;br /&gt;
of the model to use.&lt;br /&gt;
&lt;br /&gt;
Material animations will be implemented by creating a new effect&lt;br /&gt;
that inherits from one in a model, overriding the parameters that&lt;br /&gt;
will be animated.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The $FGDATA/Effects directory contains the effects definitions; look there for&lt;br /&gt;
examples. Effects/crop.eff is a good example of a complex effect.&lt;br /&gt;
&lt;br /&gt;
== Application ==&lt;br /&gt;
To apply an effect to a model or part of a model use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;effect&amp;gt;&lt;br /&gt;
		&amp;lt;inherits-from&amp;gt;Effects/light-cone&amp;lt;/inherits-from&amp;gt;&lt;br /&gt;
		&amp;lt;object-name&amp;gt;Cone&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/effect&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;inherits-from&amp;gt; &amp;lt;/inherits-from&amp;gt; contains the path to the effect you want to apply.&lt;br /&gt;
The effect does not need the file extension.&lt;br /&gt;
&lt;br /&gt;
=== Parameters in model file ===&lt;br /&gt;
&lt;br /&gt;
Parameters can be put into the model files effect application as well. But only bool, int, float, string can be used there.&lt;br /&gt;
&lt;br /&gt;
=== Chrome old usage ===&lt;br /&gt;
&lt;br /&gt;
Chrome, although now implemented as an effect, still retains the old method of application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;animation&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;shader&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;shader&amp;gt;chrome&amp;lt;/shader&amp;gt;&lt;br /&gt;
			&amp;lt;texture&amp;gt;glass_shader.png&amp;lt;/texture&amp;gt;&lt;br /&gt;
			&amp;lt;object-name&amp;gt;windscreen&amp;lt;/object-name&amp;gt;&lt;br /&gt;
	&amp;lt;/animation&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in order to maintain backward compatibility.&lt;br /&gt;
&lt;br /&gt;
== Reload effects at runtime ==&lt;br /&gt;
To reload an effect applied in a model xml file (e.g. some parameters and what it enherits from) just go into debug menu and select Reload Model.&lt;br /&gt;
&lt;br /&gt;
To reload the entire effect framework including eff files, go into menu and debug and configure development extensions and reload shaders. This is broken in 2020.1 though, but works in earlier FG versions.&lt;br /&gt;
&lt;br /&gt;
== The xml tags of an effect ==&lt;br /&gt;
&lt;br /&gt;
=== name ===&lt;br /&gt;
The name of the effect&lt;br /&gt;
&lt;br /&gt;
=== inherits-from ===&lt;br /&gt;
One feature not fully illustrated in the sample below is that&lt;br /&gt;
effects can inherit from each other. The parent effect is listed in&lt;br /&gt;
the &amp;quot;inherits-from&amp;quot; form. The child effect's property tree is&lt;br /&gt;
overlaid over that of the parent. Nodes that have the same name and&lt;br /&gt;
property index -- set by the &amp;quot;n=&amp;quot; attribute in the property tag --&lt;br /&gt;
are recursively merged. Leaf property nodes from the child have&lt;br /&gt;
precedence.  This means that effects that inherit from the example&lt;br /&gt;
effect below could be very short, listing just new&lt;br /&gt;
parameters and adding nothing to the techniques section;&lt;br /&gt;
alternatively, a technique could be altered or customized in a&lt;br /&gt;
child, listing (for example) a different shader program. An example&lt;br /&gt;
showing inheritance Effects/crop.eff, which inherits some if its&lt;br /&gt;
values from Effects/terrain-default.eff.&lt;br /&gt;
&lt;br /&gt;
FlightGear directly uses effects inheritance to assign effects to 3D&lt;br /&gt;
models and terrain. As described below, at runtime small effects are&lt;br /&gt;
created that contain material and texture values in a &amp;quot;parameters&amp;quot;&lt;br /&gt;
section. These effects inherit from another effect which references&lt;br /&gt;
those parameters in its &amp;quot;techniques&amp;quot; section. The derived effect&lt;br /&gt;
overrides any default values that might be in the base effect's&lt;br /&gt;
parameters section.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
Custom parameters that controls the effect.&lt;br /&gt;
&lt;br /&gt;
Note that parameters can use the &amp;lt;use&amp;gt; tags to enable properties to specify the values.&lt;br /&gt;
&lt;br /&gt;
=== Generate ===&lt;br /&gt;
&lt;br /&gt;
Often shader effects need tangent vectors to work properly. These &lt;br /&gt;
tangent vectors, usually called tangent and binormal, are computed &lt;br /&gt;
on the CPU and given to the shader as vertex attributes. These &lt;br /&gt;
vectors are computed on demand on the geometry using the effect if &lt;br /&gt;
the 'generate' clause is present in the effect file. Exemple :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;generate&amp;gt;&lt;br /&gt;
		&amp;lt;tangent type=&amp;quot;int&amp;quot;&amp;gt;6&amp;lt;/tangent&amp;gt;&lt;br /&gt;
		&amp;lt;binormal type=&amp;quot;int&amp;quot;&amp;gt;7&amp;lt;/binormal&amp;gt;&lt;br /&gt;
		&amp;lt;normal type=&amp;quot;int&amp;quot;&amp;gt;8&amp;lt;/normal&amp;gt;&lt;br /&gt;
	&amp;lt;/generate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid subnodes of 'generate' are 'tangent', 'binormal' or 'normal'.&lt;br /&gt;
The integer value of these subnode is the index of the attribute &lt;br /&gt;
that will hold the value of the vec3 vector.&lt;br /&gt;
&lt;br /&gt;
The generate clause is located under PropertyList in the xml file.&lt;br /&gt;
&lt;br /&gt;
In order to be available for the vertex shader, these data should &lt;br /&gt;
be bound to an attribute in the program clause, like this :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;program&amp;gt;&lt;br /&gt;
		&amp;lt;vertex-shader&amp;gt;my_vertex_shader&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_tangent_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;6&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
		&amp;lt;attribute&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;my_binormal_attribute&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;index&amp;gt;7&amp;lt;/index&amp;gt;&lt;br /&gt;
		&amp;lt;/attribute&amp;gt;&lt;br /&gt;
	&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
attribute names are whatever the shader use. The index is the one &lt;br /&gt;
declared in the 'generate' clause. So because generate/tangent has &lt;br /&gt;
value 6 and my_tangent_attribute has index 6, my_tangent_attribute &lt;br /&gt;
holds the tangent value for the vertex.&lt;br /&gt;
&lt;br /&gt;
=== technique ===&lt;br /&gt;
A certain way of rendering this effect. Different pipelines typically have their own techniques.&lt;br /&gt;
&lt;br /&gt;
==== scheme ====&lt;br /&gt;
Since 2020.1, is only usable in Compositor build.&lt;br /&gt;
&lt;br /&gt;
For the compositor ALS pipeline a scheme of als-lightning has to be specified for the technique to be considered for rendering.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;scheme&amp;gt;als-lighting&amp;lt;/scheme&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== predicate ====&lt;br /&gt;
A technique can contain a predicate that describes the OpenGL&lt;br /&gt;
functionality required to support the technique. The first&lt;br /&gt;
technique with a valid predicate in the list of techniques is used&lt;br /&gt;
to set up the graphics state of the effect. A technique with no&lt;br /&gt;
predicate is always assumed to be valid. The predicate is written in a&lt;br /&gt;
little expression language that supports the following primitives:&lt;br /&gt;
&lt;br /&gt;
and, or, equal, less, less-equal&lt;br /&gt;
glversion - returns the version number of OpenGL&lt;br /&gt;
extension-supported - returns true if an OpenGL extension is supported&lt;br /&gt;
property - returns the boolean value of a property&lt;br /&gt;
float-property - returns the float value of a property, useful inside equal, less or less-equal nodes&lt;br /&gt;
shader-language - returns the version of GLSL supported, or 0 if there is none.&lt;br /&gt;
&lt;br /&gt;
The proper way to test whether to enable a shader-based technique is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;predicate&amp;gt;&lt;br /&gt;
	  &amp;lt;and&amp;gt;&lt;br /&gt;
		&amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
		&amp;lt;less-equal&amp;gt;&lt;br /&gt;
		  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;1.0&amp;lt;/value&amp;gt;&lt;br /&gt;
		  &amp;lt;shader-language/&amp;gt;&lt;br /&gt;
		&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;/and&amp;gt;&lt;br /&gt;
	&amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a property set by the user to indicate what is the level &lt;br /&gt;
of quality desired. This level of quality can be checked in the predicate&lt;br /&gt;
like this :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;predicate&amp;gt;&lt;br /&gt;
      &amp;lt;and&amp;gt;&lt;br /&gt;
        &amp;lt;property&amp;gt;/sim/rendering/shader-effects&amp;lt;/property&amp;gt;&lt;br /&gt;
	&amp;lt;less-equal&amp;gt;&lt;br /&gt;
	  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
	  &amp;lt;float-property&amp;gt;/sim/rendering/quality-level&amp;lt;/float-property&amp;gt;&lt;br /&gt;
	&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
	&amp;lt;!-- other predicate conditions --&amp;gt;&lt;br /&gt;
      &amp;lt;/and&amp;gt;&lt;br /&gt;
    &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
The range of /sim/rendering/quality-level is [0..5]&lt;br /&gt;
 * 2.0 is the threshold for relief mapping effects,&lt;br /&gt;
 * 4.0 is the threshold for geometry shader usage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;predicate&amp;gt;&lt;br /&gt;
		&amp;lt;and&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/quality-level&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;property&amp;gt;/sim/rendering/shaders/model&amp;lt;/property&amp;gt;&lt;br /&gt;
		  &amp;lt;or&amp;gt;&lt;br /&gt;
			&amp;lt;less-equal&amp;gt;&lt;br /&gt;
			  &amp;lt;value type=&amp;quot;float&amp;quot;&amp;gt;2.0&amp;lt;/value&amp;gt;&lt;br /&gt;
			  &amp;lt;glversion/&amp;gt;&lt;br /&gt;
			&amp;lt;/less-equal&amp;gt;&lt;br /&gt;
			&amp;lt;and&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shader_objects&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_shading_language_100&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_vertex_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			  &amp;lt;extension-supported&amp;gt;GL_ARB_fragment_shader&amp;lt;/extension-supported&amp;gt;&lt;br /&gt;
			&amp;lt;/and&amp;gt;&lt;br /&gt;
		  &amp;lt;/or&amp;gt;&lt;br /&gt;
		&amp;lt;/and&amp;gt;&lt;br /&gt;
	  &amp;lt;/predicate&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== pass ====&lt;br /&gt;
A technique can consist of several passes. A pass is basically an Open&lt;br /&gt;
Scene Graph StateSet. Ultimately all OpenGL and OSG modes and state&lt;br /&gt;
attributes  will be accessable in techniques. State attributes -- that&lt;br /&gt;
is, technique properties that have children and are not just boolean&lt;br /&gt;
modes -- have an &amp;lt;active&amp;gt; parameter which enables or disables the&lt;br /&gt;
attribute. In this way a technique can declare parameters it needs,&lt;br /&gt;
but not enable the attribute at all if it is not needed; the decision&lt;br /&gt;
can be based on a parameter in the parameters section of the&lt;br /&gt;
effect. For example, effects that support transparent and opaque&lt;br /&gt;
geometry could have as part of a technique:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	  &amp;lt;blend&amp;gt;&lt;br /&gt;
		&amp;lt;active&amp;gt;&amp;lt;use&amp;gt;blend/active&amp;lt;/use&amp;gt;&amp;lt;/active&amp;gt;&lt;br /&gt;
		&amp;lt;source&amp;gt;src-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
		&amp;lt;destination&amp;gt;one-minus-src-alpha&amp;lt;/destination&amp;gt;&lt;br /&gt;
	  &amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So if the blend/active parameter is true blending will be activated&lt;br /&gt;
using the usual blending equation; otherwise blending is disabled.&lt;br /&gt;
&lt;br /&gt;
Values are assigned to technique properties in several ways:&lt;br /&gt;
&lt;br /&gt;
	* They can appear directly in the techniques section as a&lt;br /&gt;
		constant. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;uniform&amp;gt;&lt;br /&gt;
			&amp;lt;name&amp;gt;ColorsTex&amp;lt;/name&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;sampler-1d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;2&amp;lt;/value&amp;gt;&lt;br /&gt;
		&amp;lt;/uniform&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		* The name of a property in the parameters section can be&lt;br /&gt;
		referenced using a &amp;quot;use&amp;quot; clause. For example, in the technique&lt;br /&gt;
		section:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;material&amp;gt;&lt;br /&gt;
			&amp;lt;ambient&amp;gt;&amp;lt;use&amp;gt;material/ambient&amp;lt;/use&amp;gt;&amp;lt;/ambient&amp;gt;&lt;br /&gt;
		&amp;lt;/material&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		Then, in the parameters section of the effect:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;material&amp;gt;&lt;br /&gt;
				&amp;lt;ambient type=&amp;quot;vec4d&amp;quot;&amp;gt;0.2 0.2 0.2 1.0&amp;lt;/ambient&amp;gt;&lt;br /&gt;
			&amp;lt;/material&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		It's worth pointing out that the &amp;quot;material&amp;quot; property in a&lt;br /&gt;
		technique specifies part of OpenGL's state, whereas &amp;quot;material&amp;quot;&lt;br /&gt;
		in the parameters section is just a name, part of a&lt;br /&gt;
		hierarchical namespace.&lt;br /&gt;
&lt;br /&gt;
		* A property in the parameters section doesn't need to contain&lt;br /&gt;
		a constant value; it can also contain a &amp;quot;use&amp;quot; property. Here&lt;br /&gt;
		the value of the use clause is the name of a node in an&lt;br /&gt;
		external property tree which will be used as the source of a&lt;br /&gt;
		value. If the name begins with '/', the node is in&lt;br /&gt;
		FlightGear's global property tree; otherwise, it is in a local&lt;br /&gt;
		property tree, usually belonging to a model [NOT IMPLEMENTED&lt;br /&gt;
		YET]. For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;chrome-light&amp;gt;&amp;lt;use&amp;gt;/rendering/scene/chrome-light&amp;lt;/use&amp;gt;&amp;lt;/chrome-light&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
		The type is determined by what is expected by the technique&lt;br /&gt;
		attribute that will ultimately receive the value. [There is&lt;br /&gt;
		no way to get vector values out of the main property system&lt;br /&gt;
		yet; this will be fixed shortly.] Values that are declared&lt;br /&gt;
		this way are dynamically updated if the property node&lt;br /&gt;
		changes.&lt;br /&gt;
&lt;br /&gt;
===== lighting =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== material =====&lt;br /&gt;
children: active, ambient, ambient-front, ambient-back, diffuse,&lt;br /&gt;
		 diffuse-front, diffuse-back, specular, specular-front,&lt;br /&gt;
		 specular-back, emissive, emissive-front, emissive-back, shininess,&lt;br /&gt;
		 shininess-front, shininess-back, color-mode&lt;br /&gt;
&lt;br /&gt;
===== blend =====&lt;br /&gt;
Children: active, source, destination, source-rgb, source-alpha, destination-rgb, destination-alpha&lt;br /&gt;
&lt;br /&gt;
Children values: dst-alpha, dst-color, one, one-minus-dst-alpha, one-minus-dst-color, one-minus-src-alpha, one-minus-src-color, src-alpha, src-alpha-saturate, src-color, constant-color, one-minus-constant-color, constant-alpha, one-minus-constant-alpha, zero&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;&lt;br /&gt;
                        &amp;lt;active&amp;gt;true&amp;lt;/active&amp;gt;&lt;br /&gt;
                        &amp;lt;source&amp;gt;one-minus-dst-alpha&amp;lt;/source&amp;gt;&lt;br /&gt;
			&amp;lt;destination&amp;gt;src-alpha-saturate&amp;lt;/destination&amp;gt;&lt;br /&gt;
		&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== blend (simple) =====&lt;br /&gt;
A blend tag with 0 will do nothing.&lt;br /&gt;
A blend tag with 1 will do the same as source-alpha: one-minus-dst-alpha, in other words it will enable z transparency using alpha from the fragment shader.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;blend&amp;gt;1&amp;lt;/blend&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== shade-model =====&lt;br /&gt;
flat or smooth&lt;br /&gt;
&lt;br /&gt;
===== cull-face =====&lt;br /&gt;
front, back, front-back, off&lt;br /&gt;
&lt;br /&gt;
===== texture-unit =====&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;texture-unit&amp;gt;&lt;br /&gt;
                        &amp;lt;unit&amp;gt;3&amp;lt;/unit&amp;gt;&lt;br /&gt;
			&amp;lt;image&amp;gt;Textures/Terrain/void.png&amp;lt;/image&amp;gt;&lt;br /&gt;
			&amp;lt;type&amp;gt;2d&amp;lt;/type&amp;gt;&lt;br /&gt;
			&amp;lt;filter&amp;gt;linear-mipmap-linear&amp;lt;/filter&amp;gt;&lt;br /&gt;
                        &amp;lt;mag-filter&amp;gt;linear-mipmap-linear&amp;lt;/mag-filter&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-s&amp;gt;repeat&amp;lt;/wrap-s&amp;gt;&lt;br /&gt;
			&amp;lt;wrap-t&amp;gt;repeat&amp;lt;/wrap-t&amp;gt;&lt;br /&gt;
                        &amp;lt;wrap-r&amp;gt;repeat&amp;lt;/wrap-r&amp;gt;&lt;br /&gt;
			&amp;lt;internal-format&amp;gt;normalized&amp;lt;/internal-format&amp;gt;&lt;br /&gt;
                        &amp;lt;mipmap-control&amp;gt;&lt;br /&gt;
                            &amp;lt;function-r&amp;gt;average&amp;lt;/function-r&amp;gt;&lt;br /&gt;
			    &amp;lt;function-g&amp;gt;min&amp;lt;/function-g&amp;gt;&lt;br /&gt;
                            &amp;lt;function-b&amp;gt;sum&amp;lt;/function-b&amp;gt;&lt;br /&gt;
			    &amp;lt;function-a&amp;gt;product&amp;lt;/function-a&amp;gt;&lt;br /&gt;
                        &amp;lt;/mipmap-control&amp;gt;&lt;br /&gt;
                        &amp;lt;environment&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;decal&amp;lt;/mode&amp;gt; &lt;br /&gt;
                            &amp;lt;color&amp;gt;0.0 0.1 0.6 1.0&amp;lt;/color&amp;gt;&lt;br /&gt;
                        &amp;lt;/environment&amp;gt;&lt;br /&gt;
                        &amp;lt;point-sprite&amp;gt;true&amp;lt;/point-sprite&amp;gt;&lt;br /&gt;
                        &amp;lt;texenv-combine&amp;gt;operand0-rgb&amp;lt;/texenv-combine&amp;gt;&lt;br /&gt;
                        &amp;lt;texgen&amp;gt;&lt;br /&gt;
                            &amp;lt;mode&amp;gt;S&amp;lt;/mode&amp;gt;&lt;br /&gt;
                            &amp;lt;planes&amp;gt;0.075, 0.0, 0.0, 0.5&amp;lt;/planes&amp;gt;&lt;br /&gt;
                        &amp;lt;/texgen&amp;gt;&lt;br /&gt;
		&amp;lt;/texture-unit&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-two-side =====&lt;br /&gt;
true or false&lt;br /&gt;
&lt;br /&gt;
===== polygon-mode =====&lt;br /&gt;
children: front, back&lt;br /&gt;
&lt;br /&gt;
Valid values:  fill, line, point&lt;br /&gt;
&lt;br /&gt;
===== vertex-program-point-size =====&lt;br /&gt;
true, false&lt;br /&gt;
&lt;br /&gt;
===== uniform =====&lt;br /&gt;
Data accessible by shaders.&lt;br /&gt;
&lt;br /&gt;
name: the name&lt;br /&gt;
&lt;br /&gt;
type: bool, int, float, float-vec3, float-vec4, sampler-1d, sampler-2d, sampler-3d, sampler-1d-shadow, sampler-2d-shadow, sampler-cube&lt;br /&gt;
&lt;br /&gt;
===== alpha-test =====&lt;br /&gt;
&lt;br /&gt;
active: true, false&lt;br /&gt;
&lt;br /&gt;
comparison: never, less, equal, lequal, greater, notequal, gequal, always&lt;br /&gt;
&lt;br /&gt;
reference: 0 to 1&lt;br /&gt;
&lt;br /&gt;
===== render-bin =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
bin-number: This is an integer defining the order stuff will be rendered in, it can be negative also.&lt;br /&gt;
&lt;br /&gt;
bin-name: RenderBin, DepthSortedBin&lt;br /&gt;
&lt;br /&gt;
===== rendering-hint =====&lt;br /&gt;
Sent to OSG.&lt;br /&gt;
&lt;br /&gt;
default, opaque, transparent&lt;br /&gt;
&lt;br /&gt;
This basically just sets Renderbin:&lt;br /&gt;
&lt;br /&gt;
opaque = bin 10, depthsortedbin&lt;br /&gt;
&lt;br /&gt;
transparent = bin 0, renderbin&lt;br /&gt;
&lt;br /&gt;
default = inherit renderbin details from parent node&lt;br /&gt;
&lt;br /&gt;
===== program =====&lt;br /&gt;
* vertex-shader&lt;br /&gt;
* geometry-shader&lt;br /&gt;
* fragment-shader&lt;br /&gt;
* attribute&lt;br /&gt;
* geometry-vertices-out: integer, max number of vertices emitted by geometry shader&lt;br /&gt;
* geometry-input-type - points, lines, lines-adjacency, triangles, triangles-adjacency&lt;br /&gt;
* geometry-output-type - points, line-strip, triangle-strip&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;program&amp;gt;&lt;br /&gt;
				&amp;lt;vertex-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.vert&amp;lt;/vertex-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;0&amp;quot;&amp;gt;Shaders/lcd.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;1&amp;quot;&amp;gt;Shaders/noise.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
				&amp;lt;fragment-shader n=&amp;quot;2&amp;quot;&amp;gt;Shaders/filters-ALS.frag&amp;lt;/fragment-shader&amp;gt;&lt;br /&gt;
&amp;lt;/program&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See this page for more about shaders: [[Howto:Shader programming in FlightGear]]&lt;br /&gt;
&lt;br /&gt;
== Uniforms passed to shaders outside the xml effect framework ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Type&lt;br /&gt;
!Purpose&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix used to transform from world to view space. Same as osg_ViewMatrix, but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, view matrix inverse used to transform from view to world space. Same as osg_ViewMatrixInverse but for fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ProjectionMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|In fullscreen pass only, projection matrix inverse&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionCart&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in cartesian coordinates&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_CameraPositionGeod&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Position of the camera in world space, expressed in geodesic coordinates (longitude in radians, latitude in radians, elevation in meters)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunAmbientColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDiffuseColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunSpecularColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_SunDirection&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_FogDensity&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_ShadowDistances&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_DepthInColor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Tells if the depth is stored in a depth texture or a color texture&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_Planes&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Used to convert the value of the depth buffer to a depth that can be used to compute the eye space position of the fragment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;fg_BufferSize&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;vec2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Dimensions of the buffer, used to convert gl_FragCoord into the range [0..1][0..1]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrix&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from world to view space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_ViewMatrixInverse&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;mat4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG, used only when working on actual geometry. Transforms from view to world space.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_SimulationTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_DeltaFrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameTime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;float&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;osg_FrameNumber&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Defined by OSG&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related content ==&lt;br /&gt;
=== Forum topics ===&lt;br /&gt;
* {{forum link|t=37364|title=Application of effects}} - Testing which kind of groups an effect can be applied to and when&lt;br /&gt;
&lt;br /&gt;
[[Category:Shader development]]&lt;/div&gt;</summary>
		<author><name>Necolatis</name></author>
	</entry>
</feed>