1
0
Fork 0

Merge branch 'next' into proj-2d

This commit is contained in:
fly 2020-11-24 19:51:30 +11:00
commit da516e43cd
57 changed files with 1721 additions and 255 deletions

View file

@ -16,14 +16,18 @@
0 Default. Will also be used if an AI model is not found
1-50 Single engine GA aircraft
51-100 Multi-engine GA aircraft
101-150 Turboprop airliners
151-200 Twin engined narrow body jet airliners
201-250 Twin engined wide body jet airliners
251-300 Four engined jet airliners
301-350 Military combat aircraft
351-400 Military non-combat aircraft (tankers, transports)
401-500 ????
101-150 Business Jets
151-200 Turboprop airliners
201-250 Twin engined narrow body jet airliners
251-300 Twin engined wide body jet airliners
301-350 Four engined jet narrow body airliners
351-400 Four engined jet wide body airliners
401-450 Single engine prop military aircraft
451-500 Multi-engine prop military aircraft
501-550 Jet combat aircraft
551-600 Military large aircraft (tankers, transports)
601-700 Helicopters
701-800 Other
-->
<PropertyList>
@ -172,4 +176,9 @@
<model n="710" type="string">AI/Aircraft/G-164/Models/G-164A-ai.xml</model>
<model n="711" type="string">AI/Aircraft/Gee-Bee/Models/geebee-ai.xml</model>
<!-- Special case as the ufo is always installed and light enough not to need a separate
AI model. We also want to load it in preference to the default glider because it will
then be invisible to other MP players who are not in a UFO themselves. -->
<model n="712" type="string">Aircraft/ufo/Models/ufo.xml</model>
</PropertyList>

View file

@ -68,7 +68,10 @@
<condition>
<and>
<not>
<property>/sim/current-view/internal</property>
<or>
<property>/sim/current-view/internal</property>
<property>/sim/walker/outside</property>
</or>
</not>
<property>/sim/rendering/pilot-model/enabled</property>
</and>

View file

@ -61,7 +61,10 @@
<condition>
<and>
<not>
<property>/sim/current-view/internal</property>
<or>
<property>/sim/current-view/internal</property>
<property>/sim/walker/outside</property>
</or>
</not>
<property>/sim/rendering/pilot-model/enabled</property>
</and>

View file

@ -68,7 +68,10 @@
<condition>
<and>
<not>
<property>/sim/current-view/internal</property>
<or>
<property>/sim/current-view/internal</property>
<property>/sim/walker/outside</property>
</or>
</not>
<property>/sim/rendering/pilot-model/enabled</property>
</and>

View file

@ -68,7 +68,10 @@
<condition>
<and>
<not>
<property>/sim/current-view/internal</property>
<or>
<property>/sim/current-view/internal</property>
<property>/sim/walker/outside</property>
</or>
</not>
<property>/sim/rendering/pilot-model/enabled</property>
</and>

View file

@ -68,7 +68,10 @@
<condition>
<and>
<not>
<property>/sim/current-view/internal</property>
<or>
<property>/sim/current-view/internal</property>
<property>/sim/walker/outside</property>
</or>
</not>
<property>/sim/rendering/pilot-model/enabled</property>
</and>

View file

@ -78,7 +78,7 @@
<position-z-m type="float">0</position-z-m>
<jetway-hood-deg type="float">3</jetway-hood-deg>
</door>
<fallback-model-index>712</fallback-model-index>
</model>
<instrumentation>

View file

@ -840,7 +840,7 @@
<p>Yes, though it can be a difficult task. FlightGear's scenery
generation is handled by a sister project, TerraGear. For more
details, see
<a href="http://terragear.org/">http://terragear.org/</a>.</p>
<a href="http://wiki.flightgear.org/TerraGear">http://wiki.flightgear.org/TerraGear</a>.</p>
</div>

View file

@ -19,6 +19,7 @@ Contents ----------------------------------------------------------------------
3.7 ROAD_ROUGH / ROAD_DETAILED
3.8 RAILWAY_ROUGH / RAILWAY_DETAILED
3.9 BUILDING_LIST
3.10 TREE_LIST
4 model manager ("/models/model")
4.1 static objects
@ -193,9 +194,9 @@ is always the same and described in section 3.3.
----------------
specifies the terrain elevation data file. These files are generated with
the TerraGear tools (http://www.terragear.org/) and have file extension
".btg" ("binary terragear"; there used to be an "*.atg" file, too, where
the 'a' stood for ASCII).
the TerraGear tools (http://wiki.flightgear.org/TerraGear) and have file
extension ".btg" ("binary terragear"; there used to be an "*.atg" file, too,
where the 'a' stood for ASCII).
Example:
@ -227,11 +228,11 @@ add static object to the tile.
Example:
OBJECT_SHARED Models/Airport/tower.xml -122.501090 37.514830 15.5 0.00 0.00 0.00
OBJECT_SHARED Models/Airport/tower.xml -122.501090 37.514830 15.5 0.00 0.00 0.00 0.00
Syntax:
OBJECT_SHARED <object-path> <lon> <lat> <elev-m> <hdg-deg> <pitch-deg> <roll-deg>
OBJECT_SHARED <object-path> <lon> <lat> <elev-m> <hdg-deg> <pitch-deg> <roll-deg> <radius>
The <object-path> is relative to the data directory (FG_ROOT).
<elev-m> is in meter and relative to mean sea-level (in the fgfs world).
@ -239,6 +240,11 @@ The <object-path> is relative to the data directory (FG_ROOT).
that this differs from about every other place in FlightGear, most notably
the /orientation/heading-deg entry in the property system, which is clockwise.
<pitch-deg> and <roll-deg> are in degree and optional.
<radius> is the (optional) radius of the model. This is added to the LOD range
to help ensure that very large meshes (typical from osm2city) are drawn at the
correct distance from the model edge. I can safely be ignored for any model
<1km in size.
OBJECT_SHARED models are cached and reused. They are only once in memory
and never freed. (See also the next section.)
@ -275,8 +281,8 @@ this is an expensive operation and is strongly discouraged.
---------------------------------
defines taxiway or runway sign. The syntax is much like that of OBJECT_SHARED
entries, except that the path is replaced with a sign contents specification
and that there is an additional size value at the end of the line.
entries, except that the <object-path> is replaced with a sign contents specification
and that <radius> is replaced with a size value at the end of the line.
Example:
@ -387,7 +393,7 @@ gradually fade in
3.7 ROAD_ROUGH / ROAD_DETAILED
-------------------------------
Identical to BUILDING_ROUGH / BIULDING_DETAILED above, except used for roads.
Identical to BUILDING_ROUGH / BUILDING_DETAILED above, except used for roads.
the material definition "OSM_Road" is applied.
3.8 RAILWAY_ROUGH / RAILWAY_DETAILED
@ -411,7 +417,7 @@ Syntax
BUILDING_LIST <filename> <material name> <lon> <lat> <elev>
Where:
- <filename> is the name of a file containing building positions
- <filename> is the name of a file containing building positions. May be a .gz file
- <material name> is the name of the material that will be referenced to find
random building parameters.
- <lat>, <lon>, <elev> defines the center of the set of buildings, and also
@ -458,6 +464,38 @@ For example, the following entries generates 3 small, 2 medium and 2 large build
0 400 0 0 1
0 500 0 0 2
3.10 TREE_LIST
------------------
Defines a file containing tree coordinates that should be rendered using
the tree shader (aka Random vegetation).
Example:
TREE_LIST trees.txt.gz DeciduousBroadCover -3.36074090 55.95297494 30.3822
Syntax
TREE_LIST <filename> <material name> <lon> <lat> <elev>
Where:
- <filename> is the name of a file containing tree positions, may be a .gz file
- <material name> is the name of the material that will be referenced to find
random vegetation parameters such as size, texture.
- <lat>, <lon>, <elev> defines the center of the set of trees, and also
the point at which the material definition will be evaluated (for regional
materials).
See README.materials for details on configuring the random vegetation parameters.
The referenced <filename> (in the example trees.txt.gz) contains lines of the form
X Y Z A B C
Where:
- X,Y,Z are the cartesian coordinates of the tree. +X is East, +Y is North
- A,B,C is optional and represents the normal of the underlying terrain. Used for shadows. Defaults to (0,0,1)
4 model manager ("/models/model") --------------------------------------------

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>Effects/Fallback/classic-shadow</name>
<technique n="1000">
<technique n="-10">
<scheme>classic-shadow</scheme>
<pass>
<lighting>false</lighting>

View file

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>Effects/Fallback/classic-shadow</name>
<technique n="1000">
<scheme>classic-shadow</scheme>
<pass>
<lighting>false</lighting>
<color-mask type="vec4d">0 0 0 0</color-mask>
<cull-face>back</cull-face>
<blend>
<active>false</active>
</blend>
<alpha-test>
<comparison>greater</comparison>
<reference type="float">0.5</reference>
</alpha-test>
</pass>
</technique>
</PropertyList>

View file

@ -153,6 +153,10 @@
<predicate>
<and>
<property>/sim/rendering/shaders/skydome</property>
<equal>
<value type="float">0.0</value>
<float-property>/sim/rendering/photoscenery/enabled</float-property>
</equal>
<and>
<less-equal>
<value type="float">6.0</value>
@ -162,7 +166,7 @@
<value type="float">6.0</value>
<float-property>/sim/rendering/shaders/transition</float-property>
</less-equal>
<less-equal>
<less-equal>
<value type="float">1.0</value>
<float-property>/sim/rendering/shaders/crop</float-property>
</less-equal>

View file

@ -147,6 +147,10 @@
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<attribute>
<name>orthophotoTexCoord</name>
<index>14</index>
</attribute>
</program>
<uniform>
<name>visibility</name>
@ -621,6 +625,11 @@
<type>int</type>
<value>2</value> <!-- AMBIENT_AND_DIFFUSE -->
</uniform>
<uniform>
<name>orthophotoTexture</name>
<type>sampler-2d</type>
<value type="int">15</value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>

View file

@ -23,8 +23,12 @@
<technique n="9">
<predicate>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/shaders/crop</property>
<equal>
<value type="float">0.0</value>
<float-property>/sim/rendering/photoscenery/enabled</float-property>
</equal>
<or>
<less-equal>
<value type="float">2.0</value>

View file

@ -73,8 +73,12 @@
<technique n="9">
<predicate>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/shaders/transition</property>
<property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/shaders/transition</property>
<equal>
<value type="float">0.0</value>
<float-property>/sim/rendering/photoscenery/enabled</float-property>
</equal>
<or>
<less-equal>
<value type="float">2.0</value>

View file

@ -140,6 +140,10 @@
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<attribute>
<name>orthophotoTexCoord</name>
<index>14</index>
</attribute>
</program>
<uniform>
<name>visibility</name>
@ -614,6 +618,11 @@
<type>int</type>
<value>2</value> <!-- AMBIENT_AND_DIFFUSE -->
</uniform>
<uniform>
<name>orthophotoTexture</name>
<type>sampler-2d</type>
<value type="int">15</value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>

View file

@ -50,6 +50,10 @@
<and>
<property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/shaders/landmass</property>
<equal>
<value type="float">0.0</value>
<float-property>/sim/rendering/photoscenery/enabled</float-property>
</equal>
<less-equal>
<value type="float">4.0</value>
<float-property>/sim/rendering/shaders/landmass</float-property>
@ -384,6 +388,10 @@
<and>
<property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/shaders/landmass</property>
<equal>
<value type="float">0.0</value>
<float-property>/sim/rendering/photoscenery/enabled</float-property>
</equal>
<or>
<less-equal>
<value type="float">2.0</value>

View file

@ -1294,6 +1294,604 @@ please see Docs/README.model-combined.eff for documentation
</pass>
</technique>
<!-- This technique is completely identical to technique 9.
It's used to keep backwards compatibility with aircraft
that implement the generate block on technique 7 back when
Rembrandt used to implement that technique index. -->
<technique n="7">
<predicate>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/shaders/model</property>
<or>
<less-equal>
<value type="float">2.0</value>
<glversion/>
</less-equal>
<and>
<extension-supported>GL_ARB_shader_objects</extension-supported>
<extension-supported>GL_ARB_shading_language_100</extension-supported>
<extension-supported>GL_ARB_vertex_shader</extension-supported>
<extension-supported>GL_ARB_fragment_shader</extension-supported>
</and>
</or>
</and>
</predicate>
<pass n="0">
<lighting>true</lighting>
<material>
<active>
<use>material/active</use>
</active>
<ambient>
<use>material/ambient</use>
</ambient>
<diffuse>
<use>material/diffuse</use>
</diffuse>
<specular>
<use>material/specular</use>
</specular>
<emissive>
<use>material/emissive</use>
</emissive>
<shininess>
<use>material/shininess</use>
</shininess>
<color-mode>
<use>material/color-mode</use>
</color-mode>
</material>
<blend>
<active>
<use>blend/active</use>
</active>
<source>
<use>blend/source</use>
</source>
<destination>
<use>blend/destination</use>
</destination>
</blend>
<shade-model>
<use>shade-model</use>
</shade-model>
<cull-face>
<use>cull-face</use>
</cull-face>
<rendering-hint>
<use>rendering-hint</use>
</rendering-hint>
<blend>
<use>transparent</use>
</blend>
<alpha-test>
<use>transparent</use>
</alpha-test>
<render-bin>
<bin-number>
<use>render-bin/bin-number</use>
</bin-number>
<bin-name>
<use>render-bin/bin-name</use>
</bin-name>
</render-bin>
<!-- Diffuse texture unit-->
<texture-unit>
<unit>0</unit>
<image>
<use>texture[0]/image</use>
</image>
<type>
<use>texture[0]/type</use>
</type>
<filter>
<use>texture[0]/filter</use>
</filter>
<wrap-s>
<use>texture[0]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[0]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[0]/internal-format</use>
</internal-format>
</texture-unit>
<!-- Reflection Noise texture unit-->
<texture-unit>
<unit>1</unit>
<type>noise</type>
</texture-unit>
<!-- NormalMap texture unit-->
<texture-unit>
<unit>2</unit>
<image>
<use>texture[2]/image</use>
</image>
<type>
<use>texture[2]/type</use>
</type>
<filter>
<use>texture[2]/filter</use>
</filter>
<wrap-s>
<use>texture[2]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[2]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[2]/internal-format</use>
</internal-format>
</texture-unit>
<!-- LightMap texture unit-->
<texture-unit>
<unit>3</unit>
<image>
<use>texture[3]/image</use>
</image>
<type>
<use>texture[3]/type</use>
</type>
<filter>
<use>texture[3]/filter</use>
</filter>
<wrap-s>
<use>texture[3]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[3]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[3]/internal-format</use>
</internal-format>
</texture-unit>
<!-- ReflectMap texture unit-->
<texture-unit>
<unit>4</unit>
<image>
<use>texture[4]/image</use>
</image>
<type>
<use>texture[4]/type</use>
</type>
<filter>
<use>texture[4]/filter</use>
</filter>
<wrap-s>
<use>texture[4]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[4]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[4]/internal-format</use>
</internal-format>
</texture-unit>
<!-- Reflection CubeMap texture unit-->
<texture-unit>
<unit>5</unit>
<type>
<use>texture[5]/type</use>
</type>
<!-- use this form for a cube cross -->
<!--<image>
<use>texture[5]/image</use>
</image>-->
<!-- END CubeCross -->
<!-- use this form for a 6 image cube map -->
<images>
<use>texture[5]/images</use>
</images>
<!-- END 6 image cube map -->
</texture-unit>
<!-- Reflection gradients texture unit-->
<texture-unit>
<unit>6</unit>
<image>
<use>texture[6]/image</use>
</image>
<type>
<use>texture[6]/type</use>
</type>
<filter>
<use>texture[6]/filter</use>
</filter>
<wrap-s>
<use>texture[6]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[6]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[6]/internal-format</use>
</internal-format>
</texture-unit>
<vertex-program-two-side>
<use>vertex-program-two-side</use>
</vertex-program-two-side>
<program n="0">
<vertex-shader n="0">Shaders/ubershader.vert</vertex-shader>
<vertex-shader n="1">Shaders/shadows-include.vert</vertex-shader>
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
<fragment-shader n="1">Shaders/ubershader.frag</fragment-shader>
<fragment-shader n="2">Shaders/shadows-include.frag</fragment-shader>
</program>
<uniform>
<name>BaseTex</name>
<type>sampler-2d</type>
<value type="int">0</value>
</uniform>
<uniform>
<name>ReflNoiseTex</name>
<type>sampler-3d</type>
<value type="int">1</value>
</uniform>
<uniform>
<name>NormalTex</name>
<type>sampler-2d</type>
<value type="int">2</value>
</uniform>
<uniform>
<name>LightMapTex</name>
<type>sampler-2d</type>
<value type="int">3</value>
</uniform>
<uniform>
<name>ReflMapTex</name>
<type>sampler-2d</type>
<value type="int">4</value>
</uniform>
<uniform>
<name>Environment</name>
<type>sampler-cube</type>
<value type="int">5</value>
</uniform>
<uniform>
<name>ReflGradientsTex</name>
<type>sampler-2d</type>
<value type="int">6</value>
</uniform>
<!-- NORMAL MAP -->
<!-- normalmap is used-->
<uniform>
<name>nmap_enabled</name>
<type>int</type>
<value>
<use>normalmap-enabled</use>
</value>
</uniform>
<!-- normalmap is .dds-->
<uniform>
<name>nmap_dds</name>
<type>int</type>
<value>
<use>normalmap-dds</use>
</value>
</uniform>
<uniform>
<name>nmap_tile</name>
<type>float</type>
<value>
<use>normalmap-tiling</use>
</value>
</uniform>
<!-- LIGHTMAP -->
<!-- lightmap is used -->
<uniform>
<name>lightmap_enabled</name>
<type>int</type>
<value>
<use>lightmap-enabled</use>
</value>
</uniform>
<!-- lightmap is multichannel -->
<uniform>
<name>lightmap_multi</name>
<type>int</type>
<value>
<use>lightmap-multi</use>
</value>
</uniform>
<uniform>
<name>lightmap_r_factor</name>
<type>float</type>
<value>
<use>lightmap-factor[0]</use>
</value>
</uniform>
<uniform>
<name>lightmap_r_color</name>
<type>float-vec3</type>
<value>
<use>lightmap-color[0]</use>
</value>
</uniform>
<uniform>
<name>lightmap_g_factor</name>
<type>float</type>
<value>
<use>lightmap-factor[1]</use>
</value>
</uniform>
<uniform>
<name>lightmap_g_color</name>
<type>float-vec3</type>
<value>
<use>lightmap-color[1]</use>
</value>
</uniform>
<uniform>
<name>lightmap_b_factor</name>
<type>float</type>
<value>
<use>lightmap-factor[2]</use>
</value>
</uniform>
<uniform>
<name>lightmap_b_color</name>
<type>float-vec3</type>
<value>
<use>lightmap-color[2]</use>
</value>
</uniform>
<uniform>
<name>lightmap_a_factor</name>
<type>float</type>
<value>
<use>lightmap-factor[3]</use>
</value>
</uniform>
<uniform>
<name>lightmap_a_color</name>
<type>float-vec3</type>
<value>
<use>lightmap-color[3]</use>
</value>
</uniform>
<!-- reflection is used -->
<uniform>
<name>refl_enabled</name>
<type>int</type>
<value>
<use>reflection-enabled</use>
</value>
</uniform>
<!-- reflection correction -->
<uniform>
<name>refl_correction</name>
<type>float</type>
<value>
<use>reflection-correction</use>
</value>
</uniform>
<!-- use a reflection map-->
<uniform>
<name>refl_map</name>
<type>int</type>
<value>
<use>reflect-map-enabled</use>
</value>
</uniform>
<!-- reflection is dynamic -->
<uniform>
<name>refl_dynamic</name>
<type>int</type>
<value>
<use>reflection-dynamic</use>
</value>
</uniform>
<!-- set the amount of fringing colour 0.0 - 1.0 -->
<uniform>
<name>refl_rainbow</name>
<type>float</type>
<value>
<use>reflection-rainbow</use>
</value>
</uniform>
<!-- set the amount of fresnel effect colour 0.0 - 1.0 -->
<uniform>
<name>refl_fresnel</name>
<type>float</type>
<value>
<use>reflection-fresnel</use>
</value>
</uniform>
<!-- set the amount of noisiness 0.0 - 1.0 -->
<uniform>
<name>refl_noise</name>
<type>float</type>
<value>
<use>reflection-noise</use>
</value>
</uniform>
<!-- dirt -->
<uniform>
<name>dirt_enabled</name>
<type>int</type>
<value>
<use>dirt-enabled</use>
</value>
</uniform>
<uniform>
<name>dirt_multi</name>
<type>int</type>
<value>
<use>dirt-multi</use>
</value>
</uniform>
<uniform>
<name>dirt_r_color</name>
<type>float-vec3</type>
<value>
<use>dirt-color[0]</use>
</value>
</uniform>
<uniform>
<name>dirt_r_factor</name>
<type>float</type>
<value>
<use>dirt-factor[0]</use>
</value>
</uniform>
<uniform>
<name>dirt_g_color</name>
<type>float-vec3</type>
<value>
<use>dirt-color[1]</use>
</value>
</uniform>
<uniform>
<name>dirt_g_factor</name>
<type>float</type>
<value>
<use>dirt-factor[1]</use>
</value>
</uniform>
<uniform>
<name>dirt_b_color</name>
<type>float-vec3</type>
<value>
<use>dirt-color[2]</use>
</value>
</uniform>
<uniform>
<name>dirt_b_factor</name>
<type>float</type>
<value>
<use>dirt-factor[2]</use>
</value>
</uniform>
<!-- set the amount of ambient light correction 0.0 - 1.0 -->
<uniform>
<name>amb_correction</name>
<type>float</type>
<value>
<use>ambient-correction</use>
</value>
</uniform>
<uniform>
<name>lonDeg</name>
<type>float</type>
<value>
<use>pos-lon</use>
</value>
</uniform>
<uniform>
<name>latDeg</name>
<type>float</type>
<value>
<use>pos-lat</use>
</value>
</uniform>
<!-- BEGIN fog include -->
<!--<uniform>
<name>visibility</name>
<type>float</type>
<value>
<use>visibility</use>
</value>
</uniform>
<uniform>
<name>avisibility</name>
<type>float</type>
<value>
<use>avisibility</use>
</value>
</uniform>
<uniform>
<name>hazeLayerAltitude</name>
<type>float</type>
<value>
<use>lthickness</use>
</value>
</uniform>
<uniform>
<name>scattering</name>
<type>float</type>
<value>
<use>scattering</use>
</value>
</uniform>
<uniform>
<name>terminator</name>
<type>float</type>
<value>
<use>terminator</use>
</value>
</uniform>-->
<uniform>
<name>fogType</name>
<type>int</type>
<value>
<use>fogtype</use>
</value>
</uniform>
<!-- END fog include -->
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>
<type>sampler-2d</type>
<value type="int">10</value>
</uniform>
<uniform>
<name>shadows_enabled</name>
<type>bool</type>
<value>
<use>shadows_enabled</use>
</value>
</uniform>
<uniform>
<name>sun_atlas_size</name>
<type>int</type>
<value>
<use>sun_atlas_size</use>
</value>
</uniform>
<!-- END shadows include -->
</pass>
</technique>
<!-- Default rendering -->
<technique n="9">
<predicate>

View file

@ -103,10 +103,12 @@
</vertex-program-two-side>
<program>
<vertex-shader>Shaders/model-interior-ALS-detailed.vert</vertex-shader>
<vertex-shader>Shaders/shadows-include.vert</vertex-shader>
<fragment-shader>Shaders/model-interior-display-ALS.frag</fragment-shader>
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
<fragment-shader>Shaders/noise.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
</program>
<uniform>
<name>visibility</name>
@ -439,6 +441,34 @@
<type>int</type>
<value><use>grain-texture-enabled</use></value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>
<type>sampler-2d</type>
<value type="int">10</value>
</uniform>
<uniform>
<name>shadows_enabled</name>
<type>bool</type>
<value>
<use>shadows_enabled</use>
</value>
</uniform>
<uniform>
<name>sun_atlas_size</name>
<type>int</type>
<value>
<use>sun_atlas_size</use>
</value>
</uniform>
<!-- END shadows include -->
<uniform>
<name>shadow_mapping_enabled</name>
<type>bool</type>
<value>
<use>shadow-mapping-enabled</use>
</value>
</uniform>
</pass>
</technique>

View file

@ -64,6 +64,7 @@
<residual-ambience-b type="float">0.0</residual-ambience-b>
<ra-irradiance-map-type type="int">0</ra-irradiance-map-type>
<ra-irradiance-map-strength type="float">0.0</ra-irradiance-map-strength>
<shadow-mapping-enabled type="bool">false</shadow-mapping-enabled>
</parameters>
<technique n="3">
@ -141,10 +142,12 @@
</vertex-program-two-side>
<program>
<vertex-shader>Shaders/model-interior-ALS-detailed.vert</vertex-shader>
<vertex-shader>Shaders/shadows-include.vert</vertex-shader>
<fragment-shader>Shaders/model-interior-ALS-detailed.frag</fragment-shader>
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
<fragment-shader>Shaders/noise.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
</program>
<uniform>
<name>visibility</name>
@ -467,6 +470,34 @@
<type>int</type>
<value><use>grain-texture-enabled</use></value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>
<type>sampler-2d</type>
<value type="int">10</value>
</uniform>
<uniform>
<name>shadows_enabled</name>
<type>bool</type>
<value>
<use>shadows_enabled</use>
</value>
</uniform>
<uniform>
<name>sun_atlas_size</name>
<type>int</type>
<value>
<use>sun_atlas_size</use>
</value>
</uniform>
<!-- END shadows include -->
<uniform>
<name>shadow_mapping_enabled</name>
<type>bool</type>
<value>
<use>shadow-mapping-enabled</use>
</value>
</uniform>
</pass>
</technique>
@ -526,12 +557,14 @@
<use>vertex-program-two-side</use>
</vertex-program-two-side>
<program>
<vertex-shader>Shaders/generic-ALS-base.vert</vertex-shader>
<vertex-shader>Shaders/model-interior-ALS-base.vert</vertex-shader>
<vertex-shader>Shaders/shadows-include.vert</vertex-shader>
<fragment-shader>Shaders/model-interior-ALS-base.frag</fragment-shader>
<fragment-shader>Shaders/hazes.frag</fragment-shader>
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
<fragment-shader>Shaders/noise.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
</program>
<uniform>
<name>visibility</name>
@ -749,6 +782,34 @@
<type>int</type>
<value><use>use-flashlight</use></value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>
<type>sampler-2d</type>
<value type="int">10</value>
</uniform>
<uniform>
<name>shadows_enabled</name>
<type>bool</type>
<value>
<use>shadows_enabled</use>
</value>
</uniform>
<uniform>
<name>sun_atlas_size</name>
<type>int</type>
<value>
<use>sun_atlas_size</use>
</value>
</uniform>
<!-- END shadows include -->
<uniform>
<name>shadow_mapping_enabled</name>
<type>bool</type>
<value>
<use>shadow-mapping-enabled</use>
</value>
</uniform>
</pass>
</technique>

View file

@ -1041,7 +1041,7 @@
<program>
<!-- <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> -->
<vertex-shader n="1">Shaders/reflect-bump-spec.vert</vertex-shader>
<vertex-shader n="1">Shaders/runway.vert</vertex-shader>
<vertex-shader n="2">Shaders/shadows-include.vert</vertex-shader>
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
<fragment-shader n="1">Shaders/runway.frag</fragment-shader>
@ -1205,6 +1205,27 @@
<use>fogtype</use>
</value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>
<type>sampler-2d</type>
<value type="int">10</value>
</uniform>
<uniform>
<name>shadows_enabled</name>
<type>bool</type>
<value>
<use>shadows_enabled</use>
</value>
</uniform>
<uniform>
<name>sun_atlas_size</name>
<type>int</type>
<value>
<use>sun_atlas_size</use>
</value>
</uniform>
<!-- END shadows include -->
</pass>
</technique>
</PropertyList>

View file

@ -330,6 +330,10 @@
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<attribute>
<name>orthophotoTexCoord</name>
<index>14</index>
</attribute>
</program>
<uniform>
<name>grain_strength</name>
@ -835,6 +839,11 @@
<value>2</value>
<!-- AMBIENT_AND_DIFFUSE -->
</uniform>
<uniform>
<name>orthophotoTexture</name>
<type>sampler-2d</type>
<value type="int">15</value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>
@ -973,6 +982,10 @@
<fragment-shader>Shaders/hazes.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<attribute>
<name>orthophotoTexCoord</name>
<index>14</index>
</attribute>
</program>
<uniform>
<name>visibility</name>
@ -1161,6 +1174,11 @@
<value>2</value>
<!-- AMBIENT_AND_DIFFUSE -->
</uniform>
<uniform>
<name>orthophotoTexture</name>
<type>sampler-2d</type>
<value type="int">15</value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>
@ -1279,9 +1297,13 @@
<vertex-shader>Shaders/shadows-include.vert</vertex-shader>
<fragment-shader>Shaders/terrain-ALS-base.frag</fragment-shader>
<fragment-shader>Shaders/hazes.frag</fragment-shader>
<fragment-shader>Shaders/noise.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<fragment-shader>Shaders/noise.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<attribute>
<name>orthophotoTexCoord</name>
<index>14</index>
</attribute>
</program>
<uniform>
<name>visibility</name>
@ -1405,6 +1427,11 @@
<value>2</value>
<!-- AMBIENT_AND_DIFFUSE -->
</uniform>
<uniform>
<name>orthophotoTexture</name>
<type>sampler-2d</type>
<value type="int">15</value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>
@ -1436,8 +1463,13 @@
<technique n="11">
<predicate>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/shaders/generic</property>
<or>
<property>/sim/rendering/photoscenery/enabled</property>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/shaders/generic</property>
</and>
</or>
<or>
<less-equal>
<value type="float">2.0</value>
@ -1529,6 +1561,10 @@
<fragment-shader>Shaders/default.frag</fragment-shader>
<fragment-shader>Shaders/include_fog.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<attribute>
<name>orthophotoTexCoord</name>
<index>14</index>
</attribute>
</program>
<uniform>
<name>visibility</name>
@ -1571,6 +1607,11 @@
<value>2</value>
<!-- AMBIENT_AND_DIFFUSE -->
</uniform>
<uniform>
<name>orthophotoTexture</name>
<type>sampler-2d</type>
<value type="int">15</value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>

View file

@ -160,6 +160,10 @@
<fragment-shader>Shaders/secondary_lights.frag</fragment-shader>
<fragment-shader>Shaders/filters-ALS.frag</fragment-shader>
<fragment-shader>Shaders/shadows-include.frag</fragment-shader>
<attribute>
<name>orthophotoTexCoord</name>
<index>14</index>
</attribute>
</program>
<uniform>
<name>grain_strength</name>
@ -665,6 +669,11 @@
<value>2</value>
<!-- AMBIENT_AND_DIFFUSE -->
</uniform>
<uniform>
<name>orthophotoTexture</name>
<type>sampler-2d</type>
<value type="int">15</value>
</uniform>
<!-- BEGIN shadows include -->
<uniform>
<name>shadow_tex</name>

View file

@ -54,6 +54,10 @@
<and>
<property>/sim/rendering/shaders/skydome</property>
<property>/sim/rendering/shaders/urban</property>
<equal>
<value type="float">0.0</value>
<float-property>/sim/rendering/photoscenery/enabled</float-property>
</equal>
<less-equal>
<value type="float">4.0</value>
<float-property>/sim/rendering/shaders/urban</float-property>
@ -780,6 +784,10 @@
<and>
<property>/sim/rendering/shaders/skydome</property>
<property>/sim/rendering/shaders/urban</property>
<equal>
<value type="float">0.0</value>
<float-property>/sim/rendering/photoscenery/enabled</float-property>
</equal>
<less-equal>
<value type="float">1.0</value>
<float-property>/sim/rendering/shaders/urban</float-property>
@ -1460,6 +1468,10 @@
<and>
<property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/shaders/urban</property>
<equal>
<value type="float">0.0</value>
<float-property>/sim/rendering/photoscenery/enabled</float-property>
</equal>
<less-equal>
<value type="float">4.0</value>
<float-property>/sim/rendering/shaders/urban</float-property>
@ -1748,6 +1760,10 @@
<and>
<property>/sim/rendering/shaders/quality-level</property>
<property>/sim/rendering/shaders/urban</property>
<equal>
<value type="float">0.0</value>
<float-property>/sim/rendering/photoscenery/enabled</float-property>
</equal>
<less-equal>
<value type="float">1.0</value>
<float-property>/sim/rendering/shaders/urban</float-property>

View file

@ -409,7 +409,6 @@
<technique n="5">
<predicate>
<and>
<property>/sim/rendering/shaders/skydome</property>
<or>
<less-equal>
<value type="float">2.0</value>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 KiB

After

Width:  |  Height:  |  Size: 2 MiB

View file

@ -558,6 +558,13 @@ var applyApplicableBrakes = func(v, which = 0) {
}
}
var autopilotDisconnect = func() {
var aps = props.getNode("/controls/autoflight").getChildren("autopilot");
foreach (var ap; aps) {
ap.getChild("engage").setBoolValue(0);
}
}
# 1: Deploy, -1: Release
var deployChute = func(v) setprop("/controls/flight/drag-chute", v);

View file

@ -418,7 +418,7 @@ var PropertyToggleButton = {
var c = prop.getNode("binding", 1).getNode("command", 1).getValue();
var p = prop.getNode("binding", 1).getNode("property", 1).getValue();
return ((c == "property-toggle") and (p == me.prop));
return ((c == "property-toggle") and (p == me.binding));
},
getBinding: func(button) {
@ -566,6 +566,7 @@ var buttonBindings = [
NasalHoldButton.new("Brakes (air/wheel)", "controls.applyApplicableBrakes(1);", "controls.applyApplicableBrakes(0);"),
NasalHoldButton.new("Parking brakes", "controls.parkingBrakeToggle(0);", "controls.parkingBrakeToggle(1);"),
NasalHoldButton.new("NWS toggle", "controls.toggleNWS(0);", "controls.toggleNWS(1);"),
NasalButton.new("Autopilot disconnect", "controls.autopilotDisconnect();",0),
PropertyToggleButton.new("Total Freeze", "/sim/freeze/clock"),

View file

@ -1484,23 +1484,23 @@ foreach(s; cloudShadowArray)
}
# now write out the closest cloud for the detail effects
if (index_min != -1) {
var s = cloudShadowArray[index_min];
diffx = (s.lat - eyeLat) * local_weather.lat_to_m + offset_x;
diffy = -(s.lon - eyeLon) * local_weather.lon_to_m + offset_y;
setprop("/local-weather/cloud-shadows/nearest-cloudpos-x",int(diffx) + s.size);
setprop("/local-weather/cloud-shadows/nearest-cloudpos-y",int(diffy) + s.strength );
#print("Dist_max:", dist_max, " index_max: ", index_max);
cloudShadowMinIndex = index_max;
if (dist_max > 0.0) {cloudShadowMaxDist = dist_max;}
}
var s = cloudShadowArray[index_min];
diffx = (s.lat - eyeLat) * local_weather.lat_to_m + offset_x;
diffy = -(s.lon - eyeLon) * local_weather.lon_to_m + offset_y;
setprop("/local-weather/cloud-shadows/nearest-cloudpos-x",int(diffx) + s.size);
setprop("/local-weather/cloud-shadows/nearest-cloudpos-y",int(diffy) + s.strength );
#print("Dist_max:", dist_max, " index_max: ", index_max);
cloudShadowMinIndex = index_max;
if (dist_max > 0.0) {cloudShadowMaxDist = dist_max;}
settimer( func {shadow_management_loop(i)}, 0);
}
settimer( func {shadow_management_loop(i)}, 0);
}

View file

@ -2779,15 +2779,15 @@ var set_METAR_weather_station = func {
# also compute and set gust wind info
var gust_angvar = 0.5 * weather_tile_management.relangle(wind_range_from, wind_range_to);
var gust_relative_strength = 0.0;
if ((gust_strength > 0.0) or (gust_angvar > 0.0))
{
var gust_relative_strength = (gust_strength - windspeed)/windspeed;
gust_relative_strength = (gust_strength - windspeed)/windspeed;
setprop(lw~"tmp/gust-frequency-hz", 0.2 + rand()*0.8);
}
else
{
var gust_relative_strength = 0.0;
setprop(lw~"tmp/gust-frequency-hz", 0.0);
}

View file

@ -452,11 +452,10 @@ var _cond_cmp = func(p, op) {
return nil;
}
}
if(left == nil or right == nil) {
logprint(LOG_ALERT, "condition: comparing with nil");
dump(p);
return nil;
}
if (left == nil) left = 0.0;
if (right == nil) right = 0.0;
if(op < 0) return left < right;
if(op > 0) return left > right;
return left == right;
@ -532,6 +531,11 @@ var UpdateManager =
_updateProperty : func(_property)
{
},
#
# Monitor a property for a change more than the delta.
# - type of the property is used to determine if a delta change
# can be detected or whether to fire on every value change (strings)
FromProperty : func(_propname, _delta, _changed_method)
{
var obj = {parents : [UpdateManager] };
@ -566,6 +570,8 @@ var UpdateManager =
return obj;
},
#
# Determine if specifc property is a numeric (false usually means a string)
IsNumeric : func(hashkey)
{
me.localType = me.property[hashkey].getType();
@ -579,6 +585,10 @@ var UpdateManager =
return 0;
},
#
# Monitor list of properties for a change more than the delta.
# - type of the property is used to determine if a delta change
# can be detected or whether to fire on every value change (strings)
FromPropertyHashList : func(_keylist, _delta, _changed_method)
{
var obj = {parents : [UpdateManager] };
@ -632,6 +642,11 @@ var UpdateManager =
;
return obj;
},
# Monitor an individual hash value for a change more than the delta.
# - when the hash value is a string use nil as the delta to indicate that
# a simple value changed comparison is required.
# - can also use nil to detect any change; e.g. in
FromHashValue : func(_key, _delta, _changed_method)
{
var obj = {parents : [UpdateManager] };
@ -662,6 +677,12 @@ var UpdateManager =
;
return obj;
},
#
# Monitor a list of hash values for a change more than the delta.
# - when the hash value is a string use nil as the delta to indicate that
# a simple value changed comparison is required.
# - can also use nil to detect any change; e.g. in
FromHashList : func(_keylist, _delta, _changed_method)
{
var obj = {parents : [UpdateManager] };

View file

@ -9,11 +9,13 @@ varying vec3 relPos;
varying vec3 worldPos;
varying vec2 rawPos;
varying vec3 ecViewdir;
varying vec2 orthoTexCoord;
uniform sampler2D texture;
uniform sampler2D overlay_texture;
uniform sampler2D grain_texture;
uniform sampler2D orthophotoTexture;
varying float steepness;
@ -54,6 +56,8 @@ uniform int use_searchlight;
uniform int use_landing_light;
uniform int use_alt_landing_light;
uniform bool orthophotoAvailable;
const float EarthRadius = 5800000.0;
const float terminator_width = 200000.0;
@ -163,6 +167,13 @@ float noise_2000m = Noise3D(worldPos.xyz, 2000.0);
texel = texture2D(texture, gl_TexCoord[0].st * base_layer_magnification);
float local_autumn_factor = texel.a;
if (orthophotoAvailable) {
vec4 sat_texel = texture2D(orthophotoTexture, orthoTexCoord);
if (sat_texel.a > 0) {
texel.rgb = sat_texel.rgb;
}
}
float distortion_factor = 1.0;
float noise_term;
float snow_alpha;

View file

@ -5,12 +5,16 @@
varying vec4 diffuse_term;
varying vec3 normal;
varying vec2 orthoTexCoord;
uniform sampler2D texture;
uniform sampler2D orthophotoTexture;
////fog "include" /////
uniform int fogType;
uniform bool orthophotoAvailable;
vec3 fog_Func(vec3 color, int type);
//////////////////////
@ -54,6 +58,14 @@ void main()
// is closer to what the OpenGL fixed function pipeline does.
color = clamp(color, 0.0, 1.0);
texel = texture2D(texture, gl_TexCoord[0].st);
if (orthophotoAvailable) {
vec4 sat_texel = texture2D(orthophotoTexture, orthoTexCoord);
if (sat_texel.a > 0) {
texel.rgb = sat_texel.rgb;
}
}
fragColor = color * texel + specular;
fragColor.rgb = fog_Func(fragColor.rgb, fogType);

View file

@ -12,12 +12,15 @@
#define MODE_DIFFUSE 1
#define MODE_AMBIENT_AND_DIFFUSE 2
attribute vec2 orthophotoTexCoord;
// The constant term of the lighting equation that doesn't depend on
// the surface normal is passed in gl_{Front,Back}Color. The alpha
// component is set to 1 for front, 0 for back in order to work around
// bugs with gl_FrontFacing in the fragment shader.
varying vec4 diffuse_term;
varying vec3 normal;
varying vec2 orthoTexCoord;
uniform int colorMode;
@ -33,6 +36,7 @@ void main()
{
gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
orthoTexCoord = orthophotoTexCoord;
normal = gl_NormalMatrix * gl_Normal;
vec4 ambient_color, diffuse_color;
if (colorMode == MODE_DIFFUSE) {

View file

@ -15,6 +15,8 @@
#define MODE_DIFFUSE 1
#define MODE_AMBIENT_AND_DIFFUSE 2
attribute vec2 orthophotoTexCoord;
// The constant term of the lighting equation that doesn't depend on
// the surface normal is passed in gl_{Front,Back}Color. The alpha
// component is set to 1 for front, 0 for back in order to work around
@ -22,6 +24,7 @@
varying vec4 diffuse_term;
varying vec3 normal;
varying vec3 relPos;
varying vec2 orthoTexCoord;
varying float yprime_alt;
varying float mie_angle;
@ -77,6 +80,7 @@ void main()
//vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
orthoTexCoord = orthophotoTexCoord;
normal = gl_NormalMatrix * gl_Normal;
vec4 ambient_color, diffuse_color;
if (colorMode == MODE_DIFFUSE) {

View file

@ -43,6 +43,8 @@ uniform int use_searchlight;
uniform int implicit_lightmap_enabled;
uniform int use_flashlight;
uniform bool shadow_mapping_enabled;
const float EarthRadius = 5800000.0;
const float terminator_width = 200000.0;
@ -60,6 +62,8 @@ vec3 get_hazeColor(in float light_arg);
vec3 flashlight(in vec3 color, in float radius);
vec3 filter_combined (in vec3 color) ;
float getShadowing();
float luminance(vec3 color)
{
return dot(vec3(0.212671, 0.715160, 0.072169), color);
@ -135,14 +139,18 @@ void main()
NdotL = dot(n, lightDir);
//NdotL = dot(n, (gl_ModelViewMatrix * vec4 (light_vec,0.0)).xyz);
if (NdotL > 0.0) {
float shadowmap = 1.0;
if (shadow_mapping_enabled) {
shadowmap = getShadowing();
}
diffuse.rgb += 2.0 * diffuse.rgb * (1.0 - opacity.a);
color += diffuse * NdotL * opacity;
color += diffuse * NdotL * opacity * shadowmap;
NdotHV = max(dot(n, halfVector), 0.0);
if (gl_FrontMaterial.shininess > 0.0)
specular.rgb = (gl_FrontMaterial.specular.rgb
* light_specular.rgb
* pow(NdotHV, gl_FrontMaterial.shininess));
* pow(NdotHV, gl_FrontMaterial.shininess)
* shadowmap);
}
color.a = diffuse.a;
// This shouldn't be necessary, but our lighting becomes very

View file

@ -0,0 +1,248 @@
// -*-C++-*-
#version 120
// Shader that uses OpenGL state values to do per-pixel lighting
//
// The only light used is gl_LightSource[0], which is assumed to be
// directional.
//
// Diffuse colors come from the gl_Color, ambient from the material. This is
// equivalent to osg::Material::DIFFUSE.
// Haze part added by Thorsten Renk, Oct. 2011
#define MODE_OFF 0
#define MODE_DIFFUSE 1
#define MODE_AMBIENT_AND_DIFFUSE 2
// The constant term of the lighting equation that doesn't depend on
// the surface normal is passed in gl_{Front,Back}Color. The alpha
// component is set to 1 for front, 0 for back in order to work around
// bugs with gl_FrontFacing in the fragment shader.
varying vec4 diffuse_term;
varying vec3 normal;
varying vec3 relPos;
varying float yprime_alt;
varying float mie_angle;
uniform int colorMode;
uniform float hazeLayerAltitude;
uniform float terminator;
uniform float terrain_alt;
uniform float avisibility;
uniform float visibility;
uniform float overcast;
uniform float ground_scattering;
uniform float moonlight;
uniform bool shadow_mapping_enabled;
void setupShadows(vec4 eyeSpacePos);
// This is the value used in the skydome scattering shader - use the same here for consistency?
const float EarthRadius = 5800000.0;
const float terminator_width = 200000.0;
float earthShade;
float light_func (in float x, in float a, in float b, in float c, in float d, in float e)
{
//x = x - 0.5;
// use the asymptotics to shorten computations
if (x < -15.0) {return 0.0;}
return e / pow((1.0 + a * exp(-b * (x-c)) ),(1.0/d));
}
void main()
{
vec4 light_diffuse;
vec4 light_ambient;
vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
vec3 moonLightColor = vec3 (0.095, 0.095, 0.15) * moonlight;
//float yprime_alt;
float yprime;
float lightArg;
float intensity;
float vertex_alt;
float scattering;
// this code is copied from default.vert
//vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
normal = gl_NormalMatrix * gl_Normal;
vec4 ambient_color, diffuse_color;
if (colorMode == MODE_DIFFUSE) {
diffuse_color = gl_Color;
ambient_color = gl_FrontMaterial.ambient;
} else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) {
diffuse_color = gl_Color;
ambient_color = gl_Color;
} else {
diffuse_color = gl_FrontMaterial.diffuse;
ambient_color = gl_FrontMaterial.ambient;
}
// here start computations for the haze layer
// we need several geometrical quantities
// first current altitude of eye position in model space
vec4 ep = gl_ModelViewMatrixInverse * vec4(0.0,0.0,0.0,1.0);
// and relative position to vector
relPos = gl_Vertex.xyz - ep.xyz;
// unfortunately, we need the distance in the vertex shader, although the more accurate version
// is later computed in the fragment shader again
float dist = length(relPos);
// altitude of the vertex in question, somehow zero leads to artefacts, so ensure it is at least 100m
vertex_alt = max(gl_Vertex.z,100.0);
scattering = ground_scattering + (1.0 - ground_scattering) * smoothstep(hazeLayerAltitude -100.0, hazeLayerAltitude + 100.0, vertex_alt);
// branch dependent on daytime
if (terminator < 1000000.0) // the full, sunrise and sunset computation
{
// establish coordinates relative to sun position
vec3 lightFull = (gl_ModelViewMatrixInverse * gl_LightSource[0].position).xyz;
vec3 lightHorizon = normalize(vec3(lightFull.x,lightFull.y, 0.0));
// yprime is the distance of the vertex into sun direction
yprime = -dot(relPos, lightHorizon);
// this gets an altitude correction, higher terrain gets to see the sun earlier
yprime_alt = yprime - sqrt(2.0 * EarthRadius * vertex_alt);
// two times terminator width governs how quickly light fades into shadow
// now the light-dimming factor
earthShade = 0.6 * (1.0 - smoothstep(-terminator_width+ terminator, terminator_width + terminator, yprime_alt)) + 0.4;
// parametrized version of the Flightgear ground lighting function
lightArg = (terminator-yprime_alt)/100000.0;
// directional scattering for low sun
if (lightArg < 10.0)
{mie_angle = (0.5 * dot(normalize(relPos), normalize(lightFull)) ) + 0.5;}
else
{mie_angle = 1.0;}
light_diffuse.b = light_func(lightArg, 1.330e-05, 0.264, 3.827, 1.08e-05, 1.0);
light_diffuse.g = light_func(lightArg, 3.931e-06, 0.264, 3.827, 7.93e-06, 1.0);
light_diffuse.r = light_func(lightArg, 8.305e-06, 0.161, 3.827, 3.04e-05, 1.0);
light_diffuse.a = 1.0;
light_diffuse = light_diffuse * scattering;
light_ambient.r = light_func(lightArg, 0.236, 0.253, 1.073, 0.572, 0.33);
light_ambient.g = light_ambient.r * 0.4/0.33;
light_ambient.b = light_ambient.r * 0.5/0.33;
light_ambient.a = 1.0;
// correct ambient light intensity and hue before sunrise
if (earthShade < 0.5)
{
//light_ambient = light_ambient * (0.7 + 0.3 * smoothstep(0.2, 0.5, earthShade));
intensity = length(light_ambient.xyz);
light_ambient.rgb = intensity * normalize(mix(light_ambient.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.8,earthShade) ));
light_ambient.rgb = light_ambient.rgb + moonLightColor * (1.0 - smoothstep(0.4, 0.5, earthShade));
intensity = length(light_diffuse.xyz);
light_diffuse.rgb = intensity * normalize(mix(light_diffuse.rgb, shadedFogColor, 1.0 -smoothstep(0.4, 0.7,earthShade) ));
}
// the haze gets the light at the altitude of the haze top if the vertex in view is below
// but the light at the vertex if the vertex is above
vertex_alt = max(vertex_alt,hazeLayerAltitude);
if (vertex_alt > hazeLayerAltitude)
{
if (dist > 0.8 * avisibility)
{
vertex_alt = mix(vertex_alt, hazeLayerAltitude, smoothstep(0.8*avisibility, avisibility, dist));
yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
}
}
else
{
vertex_alt = hazeLayerAltitude;
yprime_alt = yprime -sqrt(2.0 * EarthRadius * vertex_alt);
}
}
else // the faster, full-day version without lightfields
{
//vertex_alt = max(gl_Vertex.z,100.0);
earthShade = 1.0;
mie_angle = 1.0;
if (terminator > 3000000.0)
{light_diffuse = vec4 (1.0, 1.0, 1.0, 0.0);
light_ambient = vec4 (0.33, 0.4, 0.5, 0.0); }
else
{
lightArg = (terminator/100000.0 - 10.0)/20.0;
light_diffuse.b = 0.78 + lightArg * 0.21;
light_diffuse.g = 0.907 + lightArg * 0.091;
light_diffuse.r = 0.904 + lightArg * 0.092;
light_diffuse.a = 1.0;
light_ambient.r = 0.316 + lightArg * 0.016;
light_ambient.g = light_ambient.r * 0.4/0.33;
light_ambient.b = light_ambient.r * 0.5/0.33;
light_ambient.a = 1.0;
}
light_diffuse = light_diffuse * scattering;
yprime_alt = -sqrt(2.0 * EarthRadius * hazeLayerAltitude);
}
// default lighting based on texture and material using the light we have just computed
diffuse_term = diffuse_color* light_diffuse;
vec4 constant_term = gl_FrontMaterial.emission + ambient_color *
(gl_LightModel.ambient + light_ambient);
// Super hack: if diffuse material alpha is less than 1, assume a
// transparency animation is at work
if (gl_FrontMaterial.diffuse.a < 1.0)
diffuse_term.a = gl_FrontMaterial.diffuse.a;
else
diffuse_term.a = gl_Color.a;
// Another hack for supporting two-sided lighting without using
// gl_FrontFacing in the fragment shader.
gl_FrontColor.rgb = constant_term.rgb; gl_FrontColor.a = 1.0;
gl_BackColor.rgb = constant_term.rgb; gl_BackColor.a = 0.0;
if (shadow_mapping_enabled) {
setupShadows(gl_ModelViewMatrix * gl_Vertex);
}
}

View file

@ -59,6 +59,8 @@ uniform int lightmap_enabled;
uniform int lightmap_multi;
uniform int grain_texture_enabled;
uniform bool shadow_mapping_enabled;
const float EarthRadius = 5800000.0;
const float terminator_width = 200000.0;
@ -76,6 +78,8 @@ vec3 addLights(in vec3 color1, in vec3 color2);
vec3 flashlight(in vec3 color, in float radius);
vec3 filter_combined (in vec3 color) ;
float getShadowing();
float luminance(vec3 color)
{
return dot(vec3(0.212671, 0.715160, 0.072169), color);
@ -151,9 +155,12 @@ void main()
NdotL = dot(n, lightDir);
//NdotL = dot(n, (gl_ModelViewMatrix * vec4 (light_vec,0.0)).xyz);
if (NdotL > 0.0) {
float shadowmap = 1.0;
if (shadow_mapping_enabled) {
shadowmap = getShadowing();
}
diffuse.rgb += 2.0 * diffuse.rgb * (1.0 - opacity.a);
color += diffuse * NdotL * opacity;
color += diffuse * NdotL * opacity * shadowmap;
//NdotHV = max(dot(n, halfVector), 0.0);
if (gl_FrontMaterial.shininess > 0.0) {
@ -162,7 +169,9 @@ void main()
NdotHV = max(0.0, dot(n,HV));
specular = (gl_FrontMaterial.specular.rgb
* (light_specular.rgb+2.0*light_specular.rgb*(1.0-opacity.a))
* pow(NdotHV, gl_FrontMaterial.shininess)*opacity.rgb);
* pow(NdotHV, gl_FrontMaterial.shininess)
* opacity.rgb
* shadowmap);
}
}
color.a = diffuse.a;

View file

@ -46,6 +46,9 @@ uniform float residual_ambience_r;
uniform float residual_ambience_g;
uniform float residual_ambience_b;
uniform bool shadow_mapping_enabled;
void setupShadows(vec4 eyeSpacePos);
// This is the value used in the skydome scattering shader - use the same here for consistency?
const float EarthRadius = 5800000.0;
@ -297,6 +300,9 @@ else // the faster, full-day version without lightfields
gl_FrontColor.rgb = constant_term.rgb; gl_FrontColor.a = 1.0;
gl_BackColor.rgb = constant_term.rgb; gl_BackColor.a = 0.0;
if (shadow_mapping_enabled) {
setupShadows(gl_ModelViewMatrix * gl_Vertex);
}
}

View file

@ -65,6 +65,8 @@ uniform int lightmap_enabled;
uniform int lightmap_multi;
uniform int grain_texture_enabled;
uniform bool shadow_mapping_enabled;
const float EarthRadius = 5800000.0;
const float terminator_width = 200000.0;
@ -82,6 +84,8 @@ vec3 addLights(in vec3 color1, in vec3 color2);
vec3 flashlight(in vec3 color, in float radius);
vec3 filter_combined (in vec3 color) ;
float getShadowing();
float luminance(vec3 color)
{
return dot(vec3(0.212671, 0.715160, 0.072169), color);
@ -259,14 +263,18 @@ void main()
NdotL = dot(n, lightDir);
//NdotL = dot(n, (gl_ModelViewMatrix * vec4 (light_vec,0.0)).xyz);
if (NdotL > 0.0) {
float shadowmap = 1.0;
if (shadow_mapping_enabled) {
shadowmap = getShadowing();
}
diffuse.rgb += 2.0 * diffuse.rgb * (1.0 - opacity.a);
color += diffuse * NdotL * opacity;
color += diffuse * NdotL * opacity * shadowmap;
NdotHV = max(dot(n, halfVector), 0.0);
if (gl_FrontMaterial.shininess > 0.0)
specular.rgb = (gl_FrontMaterial.specular.rgb
* light_specular.rgb
* pow(NdotHV, gl_FrontMaterial.shininess));
* pow(NdotHV, gl_FrontMaterial.shininess)
* shadowmap);
}
color.a = diffuse.a;
// This shouldn't be necessary, but our lighting becomes very

75
Shaders/runway.vert Normal file
View file

@ -0,0 +1,75 @@
// -*- mode: C; -*-
// Licence: GPL v2
// © Emilian Huminiuc and Vivian Meazza 2011
#version 120
varying vec3 rawpos;
varying float fogCoord;
varying vec3 VNormal;
varying vec3 VTangent;
varying vec3 VBinormal;
varying vec3 Normal;
varying vec3 vViewVec;
varying vec3 reflVec;
varying vec4 Diffuse;
varying float alpha;
uniform mat4 osg_ViewMatrixInverse;
attribute vec3 tangent;
attribute vec3 binormal;
////fog "include"////////
// uniform int fogType;
//
// void fog_Func(int type);
/////////////////////////
void setupShadows(vec4 eyeSpacePos);
void main(void)
{
rawpos = gl_Vertex.xyz / gl_Vertex.w;
vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
ecPosition.xyz = ecPosition.xyz / ecPosition.w;
//fogCoord = ecPosition.z;
//fog_Func(fogType);
vec3 n = normalize(gl_Normal);
vec3 t = cross(gl_Normal, vec3(1.0,0.0,0.0));
vec3 b = cross(n,t);
VNormal = normalize(gl_NormalMatrix * gl_Normal);
VTangent = normalize(gl_NormalMatrix * tangent);
VBinormal = normalize(gl_NormalMatrix * binormal);
Normal = normalize(gl_Normal);
Diffuse = gl_Color * gl_LightSource[0].diffuse;
//Diffuse= gl_Color.rgb * max(0.0, dot(normalize(VNormal), gl_LightSource[0].position.xyz));
// Super hack: if diffuse material alpha is less than 1, assume a
// transparency animation is at work
if (gl_FrontMaterial.diffuse.a < 1.0)
alpha = gl_FrontMaterial.diffuse.a;
else
alpha = gl_Color.a;
// Vertex in eye coordinates
vec3 vertVec = ecPosition.xyz;
vViewVec.x = dot(t, vertVec);
vViewVec.y = dot(b, vertVec);
vViewVec.z = dot(n, vertVec);
// calculate the reflection vector
vec4 reflect_eye = vec4(reflect(vertVec, VNormal), 0.0);
reflVec = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz;
gl_FrontColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
setupShadows(ecPosition);
}

View file

@ -9,10 +9,12 @@ varying vec3 relPos;
uniform sampler2D texture;
uniform sampler2D orthophotoTexture;
varying float yprime_alt;
varying float mie_angle;
varying vec2 orthoTexCoord;
uniform float visibility;
@ -25,6 +27,8 @@ uniform float overcast;
uniform float eye_alt;
uniform float cloud_self_shading;
uniform bool orthophotoAvailable;
const float EarthRadius = 5800000.0;
const float terminator_width = 200000.0;
@ -86,6 +90,14 @@ void main()
// is closer to what the OpenGL fixed function pipeline does.
color = clamp(color, 0.0, 1.0);
texel = texture2D(texture, gl_TexCoord[0].st);
if (orthophotoAvailable) {
vec4 sat_texel = texture2D(orthophotoTexture, orthoTexCoord);
if (sat_texel.a > 0) {
texel.rgb = sat_texel.rgb;
}
}
fragColor = color * texel + specular;

View file

@ -8,12 +8,14 @@ varying vec3 normal;
varying vec3 relPos;
varying vec2 rawPos;
varying vec3 worldPos;
varying vec2 orthoTexCoord;
uniform sampler2D texture;
uniform sampler2D detail_texture;
uniform sampler2D mix_texture;
uniform sampler2D orthophotoTexture;
//varying float yprime_alt;
//varying float mie_angle;
@ -41,6 +43,8 @@ uniform float hires_overlay_bias;
uniform int quality_level;
uniform int tquality_level;
uniform bool orthophotoAvailable;
const float EarthRadius = 5800000.0;
const float terminator_width = 200000.0;
@ -123,14 +127,24 @@ float noise_2000m = Noise3D(worldPos.xyz, 2000.0);
// get the texels
int flag = 1;
int mix_flag = 1;
texel = texture2D(texture, gl_TexCoord[0].st);
float local_autumn_factor = texel.a;
if (orthophotoAvailable) {
vec4 sat_texel = texture2D(orthophotoTexture, orthoTexCoord);
if (sat_texel.a > 0) {
texel.rgb = sat_texel.rgb;
flag = 0;
mix_flag = 0;
}
}
float distortion_factor = 1.0;
vec2 stprime;
int flag = 1;
int mix_flag = 1;
float noise_term;
float snow_alpha;
@ -155,14 +169,14 @@ float noise_2000m = Noise3D(worldPos.xyz, 2000.0);
}
if (tquality_level > 2)
if ((tquality_level > 2) && (mix_flag == 1))
{
mix_texel = texture2D(mix_texture, gl_TexCoord[0].st * 1.3);
if (mix_texel.a <0.1) {mix_flag = 0;}
}
if (tquality_level > 3)
if (tquality_level > 3 && (flag == 1))
{
stprime = vec2 (0.86*gl_TexCoord[0].s + 0.5*gl_TexCoord[0].t, 0.5*gl_TexCoord[0].s - 0.86*gl_TexCoord[0].t);
//distortion_factor = 0.9375 + (1.0 * nvL[2]);

View file

@ -15,6 +15,8 @@
#define MODE_DIFFUSE 1
#define MODE_AMBIENT_AND_DIFFUSE 2
attribute vec2 orthophotoTexCoord;
// The constant term of the lighting equation that doesn't depend on
// the surface normal is passed in gl_{Front,Back}Color. The alpha
// component is set to 1 for front, 0 for back in order to work around
@ -24,6 +26,7 @@ varying vec3 normal;
varying vec3 relPos;
varying vec2 rawPos;
varying vec3 worldPos;
varying vec2 orthoTexCoord;
varying float mie_angle;
@ -95,6 +98,7 @@ void main()
//vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
orthoTexCoord = orthophotoTexCoord;
normal = gl_NormalMatrix * gl_Normal;
//nvec = (gl_NormalMatrix * gl_Normal).xy;
vec4 ambient_color, diffuse_color;

View file

@ -10,6 +10,7 @@ varying vec2 rawPos;
varying vec3 worldPos;
varying vec3 ecViewdir;
varying vec2 grad_dir;
varying vec2 orthoTexCoord;
uniform sampler2D texture;
@ -18,6 +19,7 @@ uniform sampler2D mix_texture;
uniform sampler2D grain_texture;
uniform sampler2D dot_texture;
uniform sampler2D gradient_texture;
uniform sampler2D orthophotoTexture;
varying float steepness;
@ -62,6 +64,8 @@ uniform int use_searchlight;
uniform int use_landing_light;
uniform int use_alt_landing_light;
uniform bool orthophotoAvailable;
const float EarthRadius = 5800000.0;
const float terminator_width = 200000.0;
@ -233,6 +237,16 @@ float snownoise_50m = mix(noise_50m, slopenoise_100m, clamp(3.0*(1.0-steepness),
texel = texture2D(texture, gl_TexCoord[0].st);
float local_autumn_factor = texel.a;
if (orthophotoAvailable) {
vec4 sat_texel = texture2D(orthophotoTexture, orthoTexCoord);
if (sat_texel.a > 0) {
texel.rgb = sat_texel.rgb;
flag = 0;
mix_flag = 0;
}
}
grain_texel = texture2D(grain_texture, gl_TexCoord[0].st * 25.0);
gradient_texel = texture2D(gradient_texture, gl_TexCoord[0].st * 4.0);
@ -264,18 +278,23 @@ float snownoise_50m = mix(noise_50m, slopenoise_100m, clamp(3.0*(1.0-steepness),
}
// the mixture/gradient texture
mix_texel = texture2D(mix_texture, gl_TexCoord[0].st * 1.3);
if (mix_texel.a <0.1) {mix_flag = 0;}
if (mix_flag == 1) {
mix_texel = texture2D(mix_texture, gl_TexCoord[0].st * 1.3);
if (mix_texel.a <0.1) {mix_flag = 0;}
}
// the hires overlay texture is loaded with parallax mapping
stprime = vec2 (0.86*gl_TexCoord[0].s + 0.5*gl_TexCoord[0].t, 0.5*gl_TexCoord[0].s - 0.86*gl_TexCoord[0].t);
distortion_factor = 0.97 + 0.06 * noise_500m;
stprime = stprime * distortion_factor * 15.0;
stprime = stprime + normalize(relPos).xy * 0.022 * (noise_10m + 0.5 * noise_5m +0.25 * noise_2m - 0.875 );
if (flag == 1) {
stprime = vec2 (0.86*gl_TexCoord[0].s + 0.5*gl_TexCoord[0].t, 0.5*gl_TexCoord[0].s - 0.86*gl_TexCoord[0].t);
distortion_factor = 0.97 + 0.06 * noise_500m;
stprime = stprime * distortion_factor * 15.0;
stprime = stprime + normalize(relPos).xy * 0.022 * (noise_10m + 0.5 * noise_5m +0.25 * noise_2m - 0.875 );
detail_texel = texture2D(detail_texture, stprime);
if (detail_texel.a <0.1) {flag = 0;}
}
detail_texel = texture2D(detail_texture, stprime);
if (detail_texel.a <0.1) {flag = 0;}

View file

@ -15,6 +15,8 @@
#define MODE_DIFFUSE 1
#define MODE_AMBIENT_AND_DIFFUSE 2
attribute vec2 orthophotoTexCoord;
// The constant term of the lighting equation that doesn't depend on
// the surface normal is passed in gl_{Front,Back}Color. The alpha
// component is set to 1 for front, 0 for back in order to work around
@ -26,6 +28,7 @@ varying vec2 rawPos;
varying vec3 worldPos;
varying vec3 ecViewdir;
varying vec2 grad_dir;
varying vec2 orthoTexCoord;
varying float mie_angle;
varying float steepness;
@ -110,6 +113,7 @@ void main()
//vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
//gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
orthoTexCoord = orthophotoTexCoord;
normal = gl_NormalMatrix * gl_Normal;
//nvec = (gl_NormalMatrix * gl_Normal).xy;
vec4 ambient_color, diffuse_color;

View file

@ -21,6 +21,10 @@
<!-- View menu -->
<view>View</view>
<view-clone>Add Clone View</view-clone>
<view-push>Push Pair View</view-push>
<view-last-pair>Add Pair View</view-last-pair>
<view-last-pair-double>Add Pair Foreground View</view-last-pair-double>
<toggle-fullscreen>Toggle Fullscreen</toggle-fullscreen>
<rendering-options>Rendering Options</rendering-options>
<view-options>View Options</view-options>

View file

@ -11,13 +11,14 @@
<general-options>General Options</general-options>
<help-desc>Show the most relevant command line options</help-desc>
<verbose-desc>Show all command line options when combined with --help or -h</verbose-desc>
<launcher-desc>Use GUI launcher</launcher-desc>
<launcher-desc>Use GUI launcher</launcher-desc>
<composite-viewer-desc>Enable CompositeViewer (extra view windows)</composite-viewer-desc>
<version-desc>Display the current FlightGear version</version-desc>
<fg-root-desc>Specify the root data path</fg-root-desc>
<fg-scenery-desc n="0">Specify the scenery path(s);</fg-scenery-desc>
<fg-scenery-desc n="1">Defaults to $FG_ROOT/Scenery</fg-scenery-desc>
<fg-aircraft-desc>Specify additional aircraft directory path(s) (alternatively, you can use --aircraft-dir to target a specific aircraft in a given directory)</fg-aircraft-desc>
<download-dir-desc>Base directory to use for aircraft and scenery downloads (the TerraSync scenery directory may be specifically set with --terrasync-dir)</download-dir-desc>
<download-dir-desc>Base directory to use for aircraft and scenery downloads (the TerraSync scenery directory may be specifically set with --terrasync-dir)</download-dir-desc>
<language-desc>Select the language for this session</language-desc>
<load-tape-desc>Load recording of earlier flightgear session. If &lt;name&gt; ends with .fgtape it is interpreted as the recording's pathname; otherwise the recording's pathname is formed by prepending &lt;name&gt; with the tape directory and appending ".fgtape".</load-tape-desc>
<disable-splash-screen-desc>Disable splash screen</disable-splash-screen-desc>

View file

@ -15,6 +15,10 @@
<source>AI</source>
<target>IA</target>
</trans-unit>
<trans-unit approved="yes" id="menu/ai-objects:0" translate="yes">
<source>AI Objects</source>
<target>Objetos IA</target>
</trans-unit>
<trans-unit approved="yes" id="menu/aircraft-center:0" translate="yes">
<source>Aircraft Center (Experimental)</source>
<target>Centro de Aviones (Experimental)</target>
@ -87,6 +91,10 @@
<source>Dump Scene Graph</source>
<target>Mostrar datos escena gráfica</target>
</trans-unit>
<trans-unit approved="yes" id="menu/earthview:0" translate="yes">
<source>Earthview orbital rendering</source>
<target>Renderizado de órbita terrestre</target>
</trans-unit>
<trans-unit approved="yes" id="menu/environment:0" translate="yes">
<source>Environment</source>
<target>Ambiente</target>
@ -127,6 +135,10 @@
<source>File</source>
<target>Archivo</target>
</trans-unit>
<trans-unit approved="yes" id="menu/flight-recorder-control:0" translate="yes">
<source>Flight Recorder Control</source>
<target>Grabaciones de vuelo</target>
</trans-unit>
<trans-unit approved="yes" id="menu/fuel-and-payload:0" translate="yes">
<source>Fuel and Payload</source>
<target>Combustible y carga</target>
@ -249,7 +261,7 @@
</trans-unit>
<trans-unit approved="yes" id="menu/nasal-repl-interpreter:0" translate="yes">
<source>Nasal REPL Interpreter</source>
<target>Interpretador Nasal</target>
<target>Intérprete de Nasal</target>
</trans-unit>
<trans-unit approved="yes" id="menu/next-waypoint:0" translate="yes">
<source>Next Waypoint</source>
@ -257,7 +269,7 @@
</trans-unit>
<trans-unit approved="yes" id="menu/performance-monitor:0" translate="yes">
<source>Monitor System Performance</source>
<target>Monitor de performance del sistema</target>
<target>Monitor de rendimiento del sistema</target>
</trans-unit>
<trans-unit approved="yes" id="menu/pilot-offset:0" translate="yes">
<source>Adjust View Position</source>
@ -401,7 +413,7 @@
</trans-unit>
<trans-unit approved="no" id="menu/swift_connection:0" translate="yes">
<source>swift Connection</source>
<target />
<target>Conexión Swift</target>
</trans-unit>
<trans-unit approved="yes" id="menu/system-failures:0" translate="yes">
<source>System Failures</source>
@ -447,6 +459,10 @@
<source>View Options</source>
<target>Opciones de vistas</target>
</trans-unit>
<trans-unit approved="yes" id="menu/volcanoes:0" translate="yes">
<source>Volcanoes</source>
<target>Volcanes</target>
</trans-unit>
<trans-unit approved="yes" id="menu/wildfire-settings:0" translate="yes">
<source>Wildfire Settings</source>
<target>Configurar incendios</target>
@ -1654,4 +1670,4 @@
</group>
</body>
</file>
</xliff>
</xliff>

View file

@ -58,6 +58,9 @@ Started September 2000 by David Megginson, david@megginson.com
<enabled type="bool" userarchive="y">false</enabled>
<sun-atlas-size type="int" userarchive="y">2048</sun-atlas-size>
</shadows>
<photoscenery>
<enabled type="bool" userarchive="y">false</enabled>
</photoscenery>
<debug type="bool">false</debug>
<realism type="int">5</realism>
<filtering type="int">8</filtering>
@ -732,6 +735,7 @@ Started September 2000 by David Megginson, david@megginson.com
<drag-sensitivity type="double" userarchive="y">1.0</drag-sensitivity>
<invert-mouse-wheel type="bool" userarchive="y">false</invert-mouse-wheel>
<skip-flight-controls-mode type="bool" userarchive="y">false</skip-flight-controls-mode>
<mouse-rudder-elevator type="bool" userarchive="y">false</mouse-rudder-elevator>
</mouse>
<replay>
<duration type="double" userarchive="y">90</duration>

View file

@ -486,6 +486,19 @@ var assignButton = func(cmd) {
</binding>
</button>
<button>
<row>10</row>
<col>3</col>
<halign>fill</halign>
<legend>Autopilot disconnect</legend>
<binding>
<command>nasal</command>
<script>
assignButton("Autopilot disconnect");
</script>
</binding>
</button>
<text>
<row>0</row>
<col>4</col>

View file

@ -209,6 +209,35 @@
<col>1</col>
</checkbox>
<!-- end group 5 -->
</group>
<!-- start group 6 -->
<group>
<halign>left</halign>
<valign>top</valign>
<layout>table</layout>
<!-- gap to left border -->
<text>
<halign>left</halign>
<label> </label>
<row>0</row>
<col>0</col>
</text>
<checkbox>
<halign>left</halign>
<label> Mouse rudder also controls elevator</label>
<property>/sim/mouse/mouse-rudder-elevator</property>
<binding>
<command>dialog-apply</command>
</binding>
<row>0</row>
<col>1</col>
</checkbox>
<!-- empty line before next -->
<text>
<row>1</row>
@ -217,7 +246,7 @@
<halign>left</halign>
</text>
<!-- end group 5 -->
<!-- end group 6 -->
</group>
<hrule/>

View file

@ -34,33 +34,33 @@
<hrule/>
<text>
<visible>
<equals>
<property>/sim/gui/dialogs/rendering/shader-warning</property>
<value>1</value>
</equals>
</visible>
<color>
<red>1.0</red>
<green>0.6</green>
<blue>0.6</blue>
</color>
<label>Warning: Intel integrated graphics detected. Your graphics card may not support shaders or complex graphics.</label>
</text>
<text>
<visible>
<equals>
<property>/sim/gui/dialogs/rendering/shader-warning</property>
<value>1</value>
</equals>
</visible>
<color>
<red>1.0</red>
<green>0.6</green>
<blue>0.6</blue>
</color>
<label>Warning: Intel integrated graphics detected. Your graphics card may not support shaders or complex graphics.</label>
</text>
<group>
<halign>center</halign>
<layout>hbox</layout>
<!-- only for a gap -->
<group>
<layout>vbox</layout>
<default-padding>1</default-padding>
<text>
<label> </label>
</text>
</group>
<!-- only for a gap -->
<group>
<layout>vbox</layout>
<default-padding>1</default-padding>
<text>
<label> </label>
</text>
</group>
<group>
<layout>vbox</layout>
@ -92,6 +92,17 @@
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Shadows (may need restart to take affect)</label>
<name>shadows-enable</name>
<property>/sim/rendering/shadows/enabled</property>
<binding>
<command>dialog-apply</command>
<object-name>shadows-enable</object-name>
</binding>
</checkbox>
<group>
<layout>hbox</layout>
<halign>left</halign>
@ -161,15 +172,15 @@
</checkbox>
<checkbox>
<halign>left</halign>
<label>Use disk space for faster loading (DDS Texture Cache)</label>
<name>texture-cache-enabled</name>
<property>/sim/rendering/texture-cache/cache-enabled</property>
<binding>
<command>dialog-apply</command>
<object-name>texture-cache-enabled</object-name>
</binding>
</checkbox>
<halign>left</halign>
<label>Use disk space for faster loading (DDS Texture Cache)</label>
<name>texture-cache-enabled</name>
<property>/sim/rendering/texture-cache/cache-enabled</property>
<binding>
<command>dialog-apply</command>
<object-name>texture-cache-enabled</object-name>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
@ -223,9 +234,9 @@
</visible>
</text>
<empty>
<stretch>1</stretch>
</empty>
<empty>
<stretch>1</stretch>
</empty>
<group>
<layout>hbox</layout>
@ -475,23 +486,23 @@
<layout>table</layout>
<button>
<row>0</row>
<col>0</col>
<enable>
<property>/sim/rendering/shaders/skydome</property>
</enable>
<legend>Filter effects</legend>
<halign>center</halign>
<binding>
<command>dialog-show</command>
<dialog-name>als-filters</dialog-name>
</binding>
<binding>
<command>dialog-close</command>
<dialog-name>rendering</dialog-name>
</binding>
<pref-width>200</pref-width>
</button>
<row>0</row>
<col>0</col>
<enable>
<property>/sim/rendering/shaders/skydome</property>
</enable>
<legend>Filter effects</legend>
<halign>center</halign>
<binding>
<command>dialog-show</command>
<dialog-name>als-filters</dialog-name>
</binding>
<binding>
<command>dialog-close</command>
<dialog-name>rendering</dialog-name>
</binding>
<pref-width>200</pref-width>
</button>
<button>
<row>0</row>
@ -522,25 +533,25 @@
</group>
<!-- only for a gap -->
<group>
<layout>vbox</layout>
<default-padding>1</default-padding>
<text>
<label> </label>
</text>
</group>
<!-- only for a gap -->
<group>
<layout>vbox</layout>
<default-padding>1</default-padding>
<text>
<label> </label>
</text>
</group>
<vrule/>
<!-- only for a gap -->
<group>
<layout>vbox</layout>
<default-padding>1</default-padding>
<text>
<label> </label>
</text>
</group>
<!-- only for a gap -->
<group>
<layout>vbox</layout>
<default-padding>1</default-padding>
<text>
<label> </label>
</text>
</group>
<group>
<layout>vbox</layout>
@ -835,45 +846,49 @@
<col>0</col>
<halign>left</halign>
<label>Terrain Textures</label>
</text>
</text>
<combo>
<row>7</row>
<col>1</col>
<name>texture-set</name>
<combo>
<row>7</row>
<col>1</col>
<name>texture-set</name>
<pref-width>200</pref-width>
<property>sim/gui/dialogs/rendering/texture-set</property>
<value>Region-specific</value>
<value>Global</value>
<value>Global alternative (DDS format)</value>
<binding>
<command>dialog-apply</command>
<object-name>texture-set</object-name>
</binding>
<binding>
<command>nasal</command>
<script>
<property>sim/gui/dialogs/rendering/texture-set</property>
<value>Region-specific</value>
<value>Global</value>
<value>Global alternative (DDS format)</value>
<binding>
<command>dialog-apply</command>
<object-name>texture-set</object-name>
</binding>
<binding>
<command>nasal</command>
<script>
var file = materials[getprop("/sim/gui/dialogs/rendering/texture-set")];
setprop("/sim/rendering/materials-file", file);
</script>
</binding>
<binding>
<command>reload-materials</command>
</binding>
</combo>
</script>
</binding>
<binding>
<command>reload-materials</command>
</binding>
</combo>
<text>
<checkbox>
<row>8</row>
<col>0</col>
<colspan>2</colspan>
<halign>left</halign>
<color>
<red>1.0</red>
<green>0.6</green>
<blue>0.6</blue>
</color>
<label>Warning: Pylons, Detailed Roads, Buildings use a lot of memory</label>
</text>
<label>Satellite Photoscenery</label>
<name>satellite-photoscenery</name>
<enable>
<not>
<property>/sim/rendering/rembrandt/enabled</property>
</not>
</enable>
<property>/sim/rendering/photoscenery/enabled</property>
<binding>
<command>dialog-apply</command>
<object-name>satellite-photoscenery</object-name>
</binding>
</checkbox>
<text>
<row>9</row>
@ -881,13 +896,25 @@
<colspan>2</colspan>
<halign>left</halign>
<color>
<red>1.0</red>
<green>0.6</green>
<blue>0.6</blue>
</color>
<label>and disk space, and are only available in limited areas.</label>
</text>
<red>1.0</red>
<green>0.6</green>
<blue>0.6</blue>
</color>
<label>Warning: Pylons, Detailed Roads, Buildings use a lot of memory</label>
</text>
<text>
<row>10</row>
<col>0</col>
<colspan>2</colspan>
<halign>left</halign>
<color>
<red>1.0</red>
<green>0.6</green>
<blue>0.6</blue>
</color>
<label>and disk space, and are only available in limited areas.</label>
</text>
</group>
<group>
@ -922,16 +949,16 @@
</enable>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Animated jetways</label>
<name>jetways</name>
<property>/nasal/jetways/enabled</property>
<binding>
<command>dialog-apply</command>
<object-name>jetways</object-name>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Animated jetways</label>
<name>jetways</name>
<property>/nasal/jetways/enabled</property>
<binding>
<command>dialog-apply</command>
<object-name>jetways</object-name>
</binding>
</checkbox>
<empty>
<stretch>1</stretch>
@ -939,14 +966,14 @@
</group>
<!-- only for a gap -->
<group>
<layout>vbox</layout>
<default-padding>1</default-padding>
<text>
<label> </label>
</text>
</group>
<!-- only for a gap -->
<group>
<layout>vbox</layout>
<default-padding>1</default-padding>
<text>
<label> </label>
</text>
</group>
</group>
@ -954,10 +981,10 @@
<button>
<legend> OK </legend>
<default>true</default>
<binding>
<command>nasal</command>
<script>
<default>true</default>
<binding>
<command>nasal</command>
<script>
var reinit = 0;
foreach (var p; reload_props) {
if (reload_vals[p] != getprop(p)) {
@ -968,8 +995,8 @@
if (reinit) {
fgcommand("reinit", props.Node.new({"subsystem": "scenery"}));
}
</script>
</binding>
</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
@ -1102,15 +1129,16 @@
var reload_props = [
"/sim/rendering/materials-file",
"/sim/rendering/osm-buildings",
"/sim/rendering/random-buildings",
"/sim/rendering/random-objects",
"/sim/rendering/random-vegetation",
"/sim/rendering/random-vegetation-shadows",
"/sim/rendering/vegetation-density",
"/sim/rendering/clouds3d-enable",
"/sim/rendering/clouds3d-density",
"/sim/rendering/photoscenery/enabled",
"/sim/rendering/materials-file",
"/sim/rendering/osm-buildings",
"/sim/rendering/random-buildings",
"/sim/rendering/random-objects",
"/sim/rendering/random-vegetation",
"/sim/rendering/random-vegetation-shadows",
"/sim/rendering/vegetation-density",
"/sim/rendering/clouds3d-enable",
"/sim/rendering/clouds3d-density",
"/sim/rendering/scenery-path-suffix[0]/enabled",
"/sim/rendering/scenery-path-suffix[1]/enabled",
"/sim/rendering/scenery-path-suffix[2]/enabled",

View file

@ -93,6 +93,49 @@
<menu>
<name>view</name>
<item>
<enable>
<property>/sim/rendering/composite-viewer-enabled</property>
</enable>
<name>view-clone</name>
<key>Sup-v</key>
<binding>
<command>view-clone</command>
</binding>
</item>
<item>
<enable>
<property>/sim/rendering/composite-viewer-enabled</property>
</enable>
<name>view-push</name>
<binding>
<command>view-push</command>
</binding>
</item>
<item>
<enable>
<property>/sim/rendering/composite-viewer-enabled</property>
</enable>
<name>view-last-pair</name>
<key>Sup-V</key>
<binding>
<command>view-last-pair</command>
</binding>
</item>
<item>
<enable>
<property>/sim/rendering/composite-viewer-enabled</property>
</enable>
<name>view-last-pair-double</name>
<key></key>
<binding>
<command>view-last-pair-double</command>
</binding>
</item>
<item>
<name>toggle-fullscreen</name>
<key>Shift-F10</key>

View file

@ -151,19 +151,17 @@ current mode for each mouse is held in the
<!-- No buttons pressed: control elevator -->
<binding>
<condition>
<!--
<and>
<not>
<property>/devices/status/mice/mouse[0]/button[0]</property>
</not>
<or>
<not>
<property>/devices/status/mice/mouse[0]/button[0]</property>
</not>
<property>/sim/mouse/mouse-rudder-elevator</property>
</or>
<not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</not>
</and>
-->
<not>
<property>/devices/status/mice/mouse[0]/button[1]</property>
</not>
</condition>
<command>property-adjust</command>
<property>/controls/flight/elevator</property>

View file

@ -58,6 +58,13 @@
<brief/>
</option>
<option>
<name>composite-viewer</name>
<description>composite-viewer-desc</description>
<arg>1</arg>
<brief/>
</option>
<option>
<name>verbose</name>
<short>v</short>