Shader: Difference between revisions

Jump to navigation Jump to search
308 bytes added ,  12 December 2011
Update for FG 2.6.0
mNo edit summary
(Update for FG 2.6.0)
Line 1: Line 1:
{| cellpadding="4" cellspacing="0" align="right" style="clear:right;"  
[[File:Shader Options dialog.png|thumb|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). The random trees in the scenery are alse generated making use of shaders.
 
The Performance vs Quality slider in the <tt>View > Rendering Options</tt> dialog provides basic control. Setting it all the way to the left (Performance) will disable all shaders. At the right most position, all 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. You can change individual shader's settings in the Shader Options dialog, which can be reached via the button in the Rendering Options dialog.
 
* [[Howto: Aircraft Reflection Shader|Aircraft reflection shader]]
* [[Howto: Use the normal map effect in aircraft|Normal map]]
* [[Howto: Lightmap|Lightmap]]
 
{| cellpadding="0"
|-
|-
| align="left" style="background:#fafafa; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; border-top:1px solid #CCCCCC;" width="150px" | [[File:SnowAtAltitude1.jpg|200px|Image:SnowAtAltitude1.jpg]]
| align="left" style="background:#fafafa; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; border-top:1px solid #CCCCCC;" width="150px" | [[File:SnowAtAltitude1.jpg|200px|Image:SnowAtAltitude1.jpg]]
| align="left" style="background:#fafafa; border-right:1px solid #CCCCCC; border-top:1px solid #CCCCCC;" width="150px" border-top:1px solid #CCCCCC;| [[File:SnowAtAltitude2.jpg|200px|Image:SnowAtAltitude2.jpg]]
| align="left" style="background:#fafafa; border-right:1px solid #CCCCCC; border-top:1px solid #CCCCCC;" width="150px" border-top:1px solid #CCCCCC;| [[File:SnowAtAltitude2.jpg|200px|Image:SnowAtAltitude2.jpg]]
| align="left" style="background:#fafafa; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; border-top:1px solid #CCCCCC;" width="150px" | [[File:WaterReflections1.jpg|200px|Image:SnowAtAltitude1.jpg]]
| align="left" style="background:#fafafa; border-right:1px solid #CCCCCC; border-top:1px solid #CCCCCC;" width="150px" border-top:1px solid #CCCCCC;| [[File:WaterReflections2.jpg|200px|Image:SnowAtAltitude2.jpg]]
|-
|-
| align="center" colspan="2" style="background:#fafafa;  font-size: 85%; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; border-bottom:1px solid #CCCCCC;"|
| align="center" colspan="2" style="background:#fafafa;  font-size: 85%; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; border-bottom:1px solid #CCCCCC;"|
Scenery around [[LFLJ]] with the snow effect disabled (left) and enabled (right).
Scenery around [[LFLJ]] with the snow effect disabled (left) and enabled (right).
|}
{| cellpadding="4" cellspacing="0" align="right" style="clear:right;"
|-
| align="left" style="background:#fafafa; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; border-top:1px solid #CCCCCC;" width="150px" | [[File:WaterReflections1.jpg|200px|Image:SnowAtAltitude1.jpg]]
| align="left" style="background:#fafafa; border-right:1px solid #CCCCCC; border-top:1px solid #CCCCCC;" width="150px" border-top:1px solid #CCCCCC;| [[File:WaterReflections2.jpg|200px|Image:SnowAtAltitude2.jpg]]
|-
| align="center" colspan="2" style="background:#fafafa;  font-size: 85%; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; border-bottom:1px solid #CCCCCC;"|
| align="center" colspan="2" style="background:#fafafa;  font-size: 85%; border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; border-bottom:1px solid #CCCCCC;"|
Scenery around [[TNCM]] with water reflections disabled (left) and enabled (right).
Scenery around [[TNCM]] with water reflections disabled (left) and enabled (right).
|}
|}
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 ==
Currently some new shaders are available in [[GIT]], including (sun on) water reflections, snow at altitude, the urban shader, the landmass shader, and the crop texture shader. The random trees in the scenery are alse generated making use of shaders. These are all classified as material shaders.
With the switch from [[PLIB]] to [[OSG]], as of version 1.9, [[FlightGear]] lost its [[shadows]].
The shaders can be en-/disabled through the <tt>View > Rendering Options</tt> dialog.
* [[Howto: Aircraft Reflection Shader|Aircraft reflection shader]]
* [[Howto: Use the normal map effect in aircraft|Normal map]]
* [[Howto: Lightmap|Lightmap]]


== Related content ==
== Related content ==
* [[Howto: Shader Programming in FlightGear|Shader Programming in FlightGear]]
* [[Howto: Shader Programming in FlightGear|Shader Programming in FlightGear]]

Navigation menu