Compositor: Difference between revisions

no edit summary
No edit summary
Line 26: Line 26:


The '''Compositor''' aims to bring multi-pass rendering to FlightGear. It encapsulates a rendering pipeline and exposes its parameters to the [[Property Tree]].
The '''Compositor''' aims to bring multi-pass rendering to FlightGear. It encapsulates a rendering pipeline and exposes its parameters to the [[Property Tree]].
The pipeline used on each physical viewport defined on the [[Howto:Configure camera view windows|CameraGroup settings]] can be changed via a <code><compositor/></code> tag containing a valid path to the Compositor XML file (using the [[PropertyList XML File]] format).
The pipeline used on each physical viewport defined on the [[Howto:Configure camera view windows|CameraGroup settings]] can be changed via a <code><compositor/></code> tag containing a valid path to the Compositor XML file (using the [[PropertyList XML File]] format). If no Compositor file is specified for a physical camera, the one given by the <code>--compositor</code> startup command will be used. If such startup option is not used either, FlightGear will look for a valid Compositor file in $FG_ROOT/Compositor/default.xml


The Compositor introduces a new dedicated fgdata directory for new/custom rendering pipelines: $FG_ROOT/Compositor.
The Compositor introduces a new dedicated fgdata directory for new/custom rendering pipelines: $FG_ROOT/Compositor.
This is also where the default pipeline can be found, namely: $FG_ROOT/Compositor/default.xml


== Background ==
== Background ==
Line 296: Line 294:


* Setting a buffer scale factor different from 1.0 and rendering to it might not scale the splash screen correctly.
* Setting a buffer scale factor different from 1.0 and rendering to it might not scale the splash screen correctly.
* No error handling when the Compositor wasn't found. FlightGear should quit gracefully but right now it segfaults.
* computeIntersections() always uses pass 0, which might fail. The scene pass should be used (which one if there are several?).
* computeIntersections() always uses pass 0, which might fail. The scene pass should be used (which one if there are several?).


343

edits