Shader

From FlightGear wiki
(Redirected from Shaders)
Jump to navigation Jump to search

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

Disabling shaders

In ALS mode, the shader cannot be turned off. In non-ALS mode (by selecting "Low Specifications" in the render options menu), if you don't check the "Use Shaders" checkbox, FG will try to use the fixed pipeline for everything that doesn't require shaders (basically everything except clouds and trees). This may translate to a performance gain in old/low-power GPUs like integrated cards.

If you do check the "Use Shaders" checkbox, FG will then try to use shaders for everything. This may translate to a performance gain in higher-end GPUs like desktop discrete cards.

On the command line, use the following startup arguments to disable shaders altogether:

  • --prop:/sim/rendering/quality-level=0
  • --prop:/sim/rendering/shaders/quality-level=0

History

FlightGear supports shaders since the switch from PLIB to OSG (version 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. Shaders also once became complex in Rembrandt.

In newer versions with ALS and Compositor, more sophisticated shaders are used.

Gallery

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

Wiki articles

Source code

Non-inclusive list of C++ source code files: