Shader
| The FlightGear forum has a subforum related to: Effects & Shaders |
| Rendering |
|---|
|
Rendering Pipeline |
|
Effects and Shaders |
|
Ongoing Efforts |
|
Standalone Tools |
|
IPC/Networking |
A shader is a set of software instructions, which is used primarily to calculate rendering effects on graphics hardware, like water reflections and shadows.
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. Old hard-coded shaders like the chrome shader or the random trees in the scenery were converted to the new system.
In newer versions with ALS or Rembrandt, more sophisticated shaders are used.
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 Intel 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.
The performance gains are highly variable though, i.e. you may find that more modern Intel GPUs performs much better with the "Use Shaders" checkbox enabled. That's why the option is there, so the user can experiment with their own system.[1]
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
Gallery
|
Scenery around LFLJ with the snow effect disabled (left) and enabled (right). |
Scenery around TNCM with water reflections disabled (left) and enabled (right). | ||
References
Related content
Wiki articles
- Effect Framework
- Model-combined effect
- Procedural Texturing
- Rembrandt
- ALS
- Howto:Shader programming in FlightGear
Source code
Non-inclusive list of C++ source code files: