Shader: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(→‎FlightGear 2.6.0: uber shader)
No edit summary
Line 31: Line 31:


== Related content ==
== Related content ==
[[Category: Shaders]]
* [[Howto: Shader Programming in FlightGear|Shader Programming in FlightGear]]
* [[Howto: Shader Programming in FlightGear|Shader Programming in FlightGear]]
* [[Project Rembrandt]]
* [[Project Rembrandt]]

Revision as of 18:22, 1 August 2012

The (advanced) shader dialog, as seen on 2.6.0.

A shader is a set of software instructions, which is used primarily to calculate rendering effects on graphics hardware, like water reflections and shadows.

Shaders in FlightGear

FlightGear supports shaders since the switch from PLIB to OSG (FlightGear 1.9.0). FlightGear 2.0 added the ability to program shaders and effects more easily (without modifying the core code) and use them for terrain and model materials. Old hard-coded shaders like the chrome shader or the random trees in the scenery were converted to the new system.

The Performance vs Quality slider in the View > Rendering Options dialog provides basic control. At the right most position, all enabled shaders will be shown at maximum quality. Most shaders are simple on/off, but some of the more demanding shaders have intermediate steps. Powerfull graphics cards have no problem with the maximum quality setting, but most cards (even modern ones) need a finetuned setting to maintain reasonable framerates.

FlightGear 2.6.0

As of 2.6.0, you can change individual shader's settings in the Shader Options dialog, which can be reached via the button in the Rendering Options dialog. Some aircraft are equipped with custom shaders, those will show up under "Aircraft" in the very same dialog. Setting the Performance vs Quality slider all the way to the left will disable all shaders.

Another novelty is the so called uber shader; one effect that controls several shaders. This allows an aircraft (or any model actually) to have lightmap, normalmap as well as reflection map applied. For details and usage instructions, see Docs/model-combined.eff/README.model-combined.eff

Related content

Image:SnowAtAltitude1.jpg Image:SnowAtAltitude2.jpg Image:SnowAtAltitude1.jpg Image:SnowAtAltitude2.jpg

Scenery around LFLJ with the snow effect disabled (left) and enabled (right).

Scenery around TNCM with water reflections disabled (left) and enabled (right).

Related content