Compositor: Difference between revisions

Jump to navigation Jump to search
1,671 bytes added ,  27 March 2020
no edit summary
mNo edit summary
No edit summary
Line 184: Line 184:
</syntaxhighlight>
</syntaxhighlight>
* Unlike in Rembrandt, polygons facing the Sun are the ones used to generate the shadow map, so single sided surfaces and non-closed objects should be rendered correctly.
* Unlike in Rembrandt, polygons facing the Sun are the ones used to generate the shadow map, so single sided surfaces and non-closed objects should be rendered correctly.
== Porting and developing Effects ==
Effects can now have different implementations depending on the Compositor pipeline being used. For example, a grass Effect implemented in the ALS pipeline might have much more detail than the one in the low-spec pipeline. Still, they both implement the "look" of grass, so they share the same Effect file (grass.eff).
The Compositor chooses which implementation of an Effect to render based on the <tt><scheme></tt> of the techniques.
<syntaxhighlight lang="xml">
<technique n="15">
  <scheme>als-lighting</scheme>
  [...]
</technique>
</syntaxhighlight>
In this case the technique will be chosen if the Compositor pipeline <tt><scene></tt> pass uses the <tt>als-lighting</tt> Effect scheme. Consequently, porting an Effect to a pipeline will require knowing which Effect schemes it uses and writing a technique for each one. The only exception to this is the Default (Low-Spec) pipeline, which uses techniques without any scheme defined for it.
Generally porting legacy Effects will require these steps:
* Remove <tt>/sim/rendering/shaders/skydome</tt> from the ALS techniques and add the <tt>als-lighting</tt> scheme.
* Remove Rembrandt techniques.
* Use technique numbers from 0 to 9 for the Default pipeline techniques and 10 to 19 for the ALS pipeline.
* Move the shaders to their correct directory. Now the <tt>$FG_ROOT/Shaders</tt> directory is subdivided into different folders for each pipeline. For example, shaders related to the ALS pipeline are located in <tt>$FG_ROOT/Shaders/ALS</tt>.
To add features specific to a particular pipeline (like shadows in the ALS pipeline), see each pipeline's documentation below.


== Pipelines ==
== Pipelines ==
343

edits

Navigation menu