Changes

Jump to: navigation, search

Compositor

1,547 bytes added, 21:00, 7 November 2019
no edit summary
Currently the Compositor can only be enabled at compile time via the <code>-DENABLE_COMPOSITOR=ON</code> CMake flag in FlightGear. SimGear doesn't require any extra parameters. Once you have a binary with the Compositor enabled and you run it, you will be presented with the default rendering pipeline. At the time of writing, this is the low spec rendering pipeline. If you want to try the ALS pipeline, start FlightGear with the command line argument: <code>--compositor=Compositor/ALS/als</code>
 
== Notes for aircraft developers ==
 
=== Lights ===
 
The Compositor introduces a new way of defining lights that is renderer agnostic, so every rendering pipeline will be able to access the lights that have been implemented like this. As of 2019/11, the only pipeline that supports dynamic lights is the ALS pipeline.
 
<syntaxhighlight lang="xml">
<light>
<name>my-spotlight</name>
<type>spot</type>
<position>
<x-m>-7.7476</x-m>
<y-m>0</y-m>
<z-m>-1.7990</z-m>
</position>
<direction>
<x>-1.0</x>
<y>0</y>
<z>-0.013</z>
</direction>
<ambient>
<r>0.03</r>
<g>0.03</g>
<b>0.03</b>
<a>1</a>
</ambient>
<diffuse>
<r>0.95</r>
<g>0.9</g>
<b>0.9</b>
<a>1</a>
</diffuse>
<specular>
<r>0.95</r>
<g>0.9</g>
<b>0.9</b>
<a>1</a>
</specular>
<attenuation>
<c>1.0</c>
<l>0.09</l>
<q>0.032</q>
</attenuation>
<spot-exponent>5</spot-exponent>
<spot-cutoff>40</spot-cutoff>
<range-m>50</range-m>
</light>
</syntaxhighlight>
== Pipelines ==
A typical [[PropertyList XML File|property tree structure]] describing a buffer may be as follows:
<syntaxhighlight lang="xml"><syntaxhighlight lang="xml"><buffer> <name>color</name> <type>2d</type> <width>screen</width> <height>screen</height> <screen-width-scale>1.5</screen-width-scale> <screen-height-scale>1.5</screen-height-scale> <internal-format>rgba8</internal-format> <source-format>rgba</source-format> <source-type>ubyte</source-type> <min-filter>nearest-mipmap-nearest</min-filter> <mag-filter>nearest-mipmap-nearest</mag-filter> <wrap-s>repeat</wrap-s> <wrap-t>repeat</wrap-t></buffer></syntaxhighlight>
<buffer>
<name>color</name>
227
edits

Navigation menu