diff --git a/AI/Aircraft/fallback_models.xml b/AI/Aircraft/fallback_models.xml
index 3f25a4314..12edd5a77 100644
--- a/AI/Aircraft/fallback_models.xml
+++ b/AI/Aircraft/fallback_models.xml
@@ -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
-->
@@ -172,4 +176,9 @@
AI/Aircraft/G-164/Models/G-164A-ai.xml
AI/Aircraft/Gee-Bee/Models/geebee-ai.xml
+
+Aircraft/ufo/Models/ufo.xml
+
diff --git a/Aircraft/Generic/Pilot/Airliner/pilot.xml b/Aircraft/Generic/Pilot/Airliner/pilot.xml
index a329930ca..943adbcc3 100644
--- a/Aircraft/Generic/Pilot/Airliner/pilot.xml
+++ b/Aircraft/Generic/Pilot/Airliner/pilot.xml
@@ -68,7 +68,10 @@
- /sim/current-view/internal
+
+ /sim/current-view/internal
+ /sim/walker/outside
+
/sim/rendering/pilot-model/enabled
diff --git a/Aircraft/Generic/Pilot/Fighter/pilot.xml b/Aircraft/Generic/Pilot/Fighter/pilot.xml
index f64cb0ec9..80d13805c 100644
--- a/Aircraft/Generic/Pilot/Fighter/pilot.xml
+++ b/Aircraft/Generic/Pilot/Fighter/pilot.xml
@@ -61,7 +61,10 @@
- /sim/current-view/internal
+
+ /sim/current-view/internal
+ /sim/walker/outside
+
/sim/rendering/pilot-model/enabled
diff --git a/Aircraft/Generic/Pilot/General/pilot.xml b/Aircraft/Generic/Pilot/General/pilot.xml
index 3dbd907b8..7915df516 100644
--- a/Aircraft/Generic/Pilot/General/pilot.xml
+++ b/Aircraft/Generic/Pilot/General/pilot.xml
@@ -68,7 +68,10 @@
- /sim/current-view/internal
+
+ /sim/current-view/internal
+ /sim/walker/outside
+
/sim/rendering/pilot-model/enabled
diff --git a/Aircraft/Generic/Pilot/WWI/pilot.xml b/Aircraft/Generic/Pilot/WWI/pilot.xml
index 98083cac6..674be727b 100644
--- a/Aircraft/Generic/Pilot/WWI/pilot.xml
+++ b/Aircraft/Generic/Pilot/WWI/pilot.xml
@@ -68,7 +68,10 @@
- /sim/current-view/internal
+
+ /sim/current-view/internal
+ /sim/walker/outside
+
/sim/rendering/pilot-model/enabled
diff --git a/Aircraft/Generic/Pilot/WWII/pilot.xml b/Aircraft/Generic/Pilot/WWII/pilot.xml
index 51eb15e2a..15a6c192e 100644
--- a/Aircraft/Generic/Pilot/WWII/pilot.xml
+++ b/Aircraft/Generic/Pilot/WWII/pilot.xml
@@ -68,7 +68,10 @@
- /sim/current-view/internal
+
+ /sim/current-view/internal
+ /sim/walker/outside
+
/sim/rendering/pilot-model/enabled
diff --git a/Aircraft/ufo/ufo-set.xml b/Aircraft/ufo/ufo-set.xml
index e22e7d354..da0dfc10c 100644
--- a/Aircraft/ufo/ufo-set.xml
+++ b/Aircraft/ufo/ufo-set.xml
@@ -78,7 +78,7 @@
0
3
-
+ 712
diff --git a/Docs/FlightGear-FAQ.html b/Docs/FlightGear-FAQ.html
index 65d6ac1b8..07272082f 100644
--- a/Docs/FlightGear-FAQ.html
+++ b/Docs/FlightGear-FAQ.html
@@ -840,7 +840,7 @@
Yes, though it can be a difficult task. FlightGear's scenery
generation is handled by a sister project, TerraGear. For more
details, see
- http://terragear.org/ .
+ http://wiki.flightgear.org/TerraGear .
diff --git a/Docs/README.scenery b/Docs/README.scenery
index 7035990bd..cc501e54a 100644
--- a/Docs/README.scenery
+++ b/Docs/README.scenery
@@ -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:
@@ -280,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 is replaced with a sign contents specification
+and that is replaced with a size value at the end of the line.
Example:
@@ -392,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
@@ -463,7 +464,7 @@ 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.9 TREE_LIST
+3.10 TREE_LIST
------------------
Defines a file containing tree coordinates that should be rendered using
@@ -485,7 +486,7 @@ Where:
the point at which the material definition will be evaluated (for regional
materials).
-See README.materials for details on configuring the random building parameters.
+See README.materials for details on configuring the random vegetation parameters.
The referenced (in the example trees.txt.gz) contains lines of the form
diff --git a/Effects/agriculture.eff b/Effects/agriculture.eff
index 89f9a30af..88ec9335c 100644
--- a/Effects/agriculture.eff
+++ b/Effects/agriculture.eff
@@ -153,6 +153,10 @@
/sim/rendering/shaders/skydome
+
+ 0.0
+ /sim/rendering/photoscenery/enabled
+
6.0
@@ -162,7 +166,7 @@
6.0
/sim/rendering/shaders/transition
-
+
1.0
/sim/rendering/shaders/crop
diff --git a/Effects/airfield.eff b/Effects/airfield.eff
index 1a3bd60f4..7209ca365 100644
--- a/Effects/airfield.eff
+++ b/Effects/airfield.eff
@@ -147,6 +147,10 @@
Shaders/secondary_lights.frag
Shaders/filters-ALS.frag
Shaders/shadows-include.frag
+
+ orthophotoTexCoord
+ 14
+
visibility
@@ -621,6 +625,11 @@
int
2
+
+ orthophotoTexture
+ sampler-2d
+ 15
+
shadow_tex
diff --git a/Effects/crop.eff b/Effects/crop.eff
index 961b44163..ebb2cdfbd 100644
--- a/Effects/crop.eff
+++ b/Effects/crop.eff
@@ -23,8 +23,12 @@
- /sim/rendering/shaders/quality-level
+ /sim/rendering/shaders/quality-level
/sim/rendering/shaders/crop
+
+ 0.0
+ /sim/rendering/photoscenery/enabled
+
2.0
diff --git a/Effects/forest.eff b/Effects/forest.eff
index f4737cd04..566def1f8 100644
--- a/Effects/forest.eff
+++ b/Effects/forest.eff
@@ -73,8 +73,12 @@
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/transition
+ /sim/rendering/shaders/quality-level
+ /sim/rendering/shaders/transition
+
+ 0.0
+ /sim/rendering/photoscenery/enabled
+
2.0
diff --git a/Effects/grass.eff b/Effects/grass.eff
index 34898b1b1..7402e9e8a 100644
--- a/Effects/grass.eff
+++ b/Effects/grass.eff
@@ -140,6 +140,10 @@
Shaders/secondary_lights.frag
Shaders/filters-ALS.frag
Shaders/shadows-include.frag
+
+ orthophotoTexCoord
+ 14
+
visibility
@@ -614,6 +618,11 @@
int
2
+
+ orthophotoTexture
+ sampler-2d
+ 15
+
shadow_tex
diff --git a/Effects/landmass.eff b/Effects/landmass.eff
index 107c3bef8..b82e03093 100644
--- a/Effects/landmass.eff
+++ b/Effects/landmass.eff
@@ -50,6 +50,10 @@
/sim/rendering/shaders/quality-level
/sim/rendering/shaders/landmass
+
+ 0.0
+ /sim/rendering/photoscenery/enabled
+
4.0
/sim/rendering/shaders/landmass
@@ -384,6 +388,10 @@
/sim/rendering/shaders/quality-level
/sim/rendering/shaders/landmass
+
+ 0.0
+ /sim/rendering/photoscenery/enabled
+
2.0
diff --git a/Effects/terrain-default.eff b/Effects/terrain-default.eff
index 5a6c9073c..4d5d0d859 100644
--- a/Effects/terrain-default.eff
+++ b/Effects/terrain-default.eff
@@ -330,6 +330,10 @@
Shaders/secondary_lights.frag
Shaders/filters-ALS.frag
Shaders/shadows-include.frag
+
+ orthophotoTexCoord
+ 14
+
grain_strength
@@ -835,6 +839,11 @@
2
+
+ orthophotoTexture
+ sampler-2d
+ 15
+
shadow_tex
@@ -973,6 +982,10 @@
Shaders/hazes.frag
Shaders/filters-ALS.frag
Shaders/shadows-include.frag
+
+ orthophotoTexCoord
+ 14
+
visibility
@@ -1161,6 +1174,11 @@
2
+
+ orthophotoTexture
+ sampler-2d
+ 15
+
shadow_tex
@@ -1279,9 +1297,13 @@
Shaders/shadows-include.vert
Shaders/terrain-ALS-base.frag
Shaders/hazes.frag
- Shaders/noise.frag
- Shaders/filters-ALS.frag
- Shaders/shadows-include.frag
+ Shaders/noise.frag
+ Shaders/filters-ALS.frag
+ Shaders/shadows-include.frag
+
+ orthophotoTexCoord
+ 14
+
visibility
@@ -1405,6 +1427,11 @@
2
+
+ orthophotoTexture
+ sampler-2d
+ 15
+
shadow_tex
@@ -1436,8 +1463,13 @@
- /sim/rendering/shaders/quality-level
- /sim/rendering/shaders/generic
+
+ /sim/rendering/photoscenery/enabled
+
+ /sim/rendering/shaders/quality-level
+ /sim/rendering/shaders/generic
+
+
2.0
@@ -1529,6 +1561,10 @@
Shaders/default.frag
Shaders/include_fog.frag
Shaders/shadows-include.frag
+
+ orthophotoTexCoord
+ 14
+
visibility
@@ -1571,6 +1607,11 @@
2
+
+ orthophotoTexture
+ sampler-2d
+ 15
+
shadow_tex
diff --git a/Effects/terrain-overlay.eff b/Effects/terrain-overlay.eff
index 97ea9067b..4e6a07f06 100644
--- a/Effects/terrain-overlay.eff
+++ b/Effects/terrain-overlay.eff
@@ -160,6 +160,10 @@
Shaders/secondary_lights.frag
Shaders/filters-ALS.frag
Shaders/shadows-include.frag
+
+ orthophotoTexCoord
+ 14
+
grain_strength
@@ -665,6 +669,11 @@
2
+
+ orthophotoTexture
+ sampler-2d
+ 15
+
shadow_tex
diff --git a/Effects/urban.eff b/Effects/urban.eff
index a904e7f28..fa97ede11 100644
--- a/Effects/urban.eff
+++ b/Effects/urban.eff
@@ -54,6 +54,10 @@
/sim/rendering/shaders/skydome
/sim/rendering/shaders/urban
+
+ 0.0
+ /sim/rendering/photoscenery/enabled
+
4.0
/sim/rendering/shaders/urban
@@ -780,6 +784,10 @@
/sim/rendering/shaders/skydome
/sim/rendering/shaders/urban
+
+ 0.0
+ /sim/rendering/photoscenery/enabled
+
1.0
/sim/rendering/shaders/urban
@@ -1460,6 +1468,10 @@
/sim/rendering/shaders/quality-level
/sim/rendering/shaders/urban
+
+ 0.0
+ /sim/rendering/photoscenery/enabled
+
4.0
/sim/rendering/shaders/urban
@@ -1748,6 +1760,10 @@
/sim/rendering/shaders/quality-level
/sim/rendering/shaders/urban
+
+ 0.0
+ /sim/rendering/photoscenery/enabled
+
1.0
/sim/rendering/shaders/urban
diff --git a/Effects/ws30.eff b/Effects/ws30.eff
index 13302464b..14d3cbd25 100644
--- a/Effects/ws30.eff
+++ b/Effects/ws30.eff
@@ -409,7 +409,6 @@
- /sim/rendering/shaders/skydome
2.0
diff --git a/Geodata/README b/Geodata/README.koppen
similarity index 100%
rename from Geodata/README
rename to Geodata/README.koppen
diff --git a/Geodata/koppen-geiger.png b/Geodata/koppen-geiger.png
index 8f6c0945a..f73a9d7aa 100644
Binary files a/Geodata/koppen-geiger.png and b/Geodata/koppen-geiger.png differ
diff --git a/Nasal/controls.nas b/Nasal/controls.nas
index 4dd851bbd..b2c908126 100644
--- a/Nasal/controls.nas
+++ b/Nasal/controls.nas
@@ -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);
diff --git a/Nasal/joystick.nas b/Nasal/joystick.nas
index 536193da1..01a060052 100644
--- a/Nasal/joystick.nas
+++ b/Nasal/joystick.nas
@@ -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"),
diff --git a/Nasal/local_weather/weather_tile_management.nas b/Nasal/local_weather/weather_tile_management.nas
index 3bf608e2c..19d3f6dd9 100644
--- a/Nasal/local_weather/weather_tile_management.nas
+++ b/Nasal/local_weather/weather_tile_management.nas
@@ -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);
+}
diff --git a/Nasal/local_weather/weather_tiles.nas b/Nasal/local_weather/weather_tiles.nas
index e88ea6445..37ab2c55a 100644
--- a/Nasal/local_weather/weather_tiles.nas
+++ b/Nasal/local_weather/weather_tiles.nas
@@ -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);
}
diff --git a/Nasal/props.nas b/Nasal/props.nas
index 31ce8108b..7578f4f11 100644
--- a/Nasal/props.nas
+++ b/Nasal/props.nas
@@ -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;
diff --git a/Shaders/airfield-ALS.frag b/Shaders/airfield-ALS.frag
index 753ed0555..2b87538a3 100644
--- a/Shaders/airfield-ALS.frag
+++ b/Shaders/airfield-ALS.frag
@@ -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;
diff --git a/Shaders/default.frag b/Shaders/default.frag
index 79989d1b7..943671f59 100644
--- a/Shaders/default.frag
+++ b/Shaders/default.frag
@@ -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);
diff --git a/Shaders/default.vert b/Shaders/default.vert
index c58c56349..0635ee02a 100644
--- a/Shaders/default.vert
+++ b/Shaders/default.vert
@@ -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) {
diff --git a/Shaders/generic-ALS-base.vert b/Shaders/generic-ALS-base.vert
index 103c4a7ac..798259b3e 100644
--- a/Shaders/generic-ALS-base.vert
+++ b/Shaders/generic-ALS-base.vert
@@ -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) {
diff --git a/Shaders/terrain-ALS-base.frag b/Shaders/terrain-ALS-base.frag
index 5e7bc20e7..dffde6229 100644
--- a/Shaders/terrain-ALS-base.frag
+++ b/Shaders/terrain-ALS-base.frag
@@ -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;
diff --git a/Shaders/terrain-ALS-detailed.frag b/Shaders/terrain-ALS-detailed.frag
index 21fbc77d9..2dcb0bf9f 100644
--- a/Shaders/terrain-ALS-detailed.frag
+++ b/Shaders/terrain-ALS-detailed.frag
@@ -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]);
diff --git a/Shaders/terrain-ALS-detailed.vert b/Shaders/terrain-ALS-detailed.vert
index 5bdaa4470..2b29bcee4 100644
--- a/Shaders/terrain-ALS-detailed.vert
+++ b/Shaders/terrain-ALS-detailed.vert
@@ -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;
diff --git a/Shaders/terrain-ALS-ultra.frag b/Shaders/terrain-ALS-ultra.frag
index a72393771..df6b224a2 100644
--- a/Shaders/terrain-ALS-ultra.frag
+++ b/Shaders/terrain-ALS-ultra.frag
@@ -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;}
diff --git a/Shaders/terrain-ALS-ultra.vert b/Shaders/terrain-ALS-ultra.vert
index ebe1b95a9..f58ab8ee1 100644
--- a/Shaders/terrain-ALS-ultra.vert
+++ b/Shaders/terrain-ALS-ultra.vert
@@ -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;
diff --git a/Translations/default/menu.xml b/Translations/default/menu.xml
index 65b2e061d..511d853a0 100644
--- a/Translations/default/menu.xml
+++ b/Translations/default/menu.xml
@@ -21,6 +21,10 @@
View
+ Add Clone View
+ Push Pair View
+ Add Pair View
+ Add Pair Foreground View
Toggle Fullscreen
Rendering Options
View Options
diff --git a/Translations/default/options.xml b/Translations/default/options.xml
index edddc3623..85381572f 100644
--- a/Translations/default/options.xml
+++ b/Translations/default/options.xml
@@ -11,13 +11,14 @@
General Options
Show the most relevant command line options
Show all command line options when combined with --help or -h
- Use GUI launcher
+ Use GUI launcher
+ Enable CompositeViewer (extra view windows)
Display the current FlightGear version
Specify the root data path
Specify the scenery path(s);
Defaults to $FG_ROOT/Scenery
Specify additional aircraft directory path(s) (alternatively, you can use --aircraft-dir to target a specific aircraft in a given directory)
- Base directory to use for aircraft and scenery downloads (the TerraSync scenery directory may be specifically set with --terrasync-dir)
+ Base directory to use for aircraft and scenery downloads (the TerraSync scenery directory may be specifically set with --terrasync-dir)
Select the language for this session
Load recording of earlier flightgear session. If <name> ends with .fgtape it is interpreted as the recording's pathname; otherwise the recording's pathname is formed by prepending <name> with the tape directory and appending ".fgtape".
Disable splash screen
diff --git a/defaults.xml b/defaults.xml
index 4972fa4ff..e899a48c6 100644
--- a/defaults.xml
+++ b/defaults.xml
@@ -58,6 +58,9 @@ Started September 2000 by David Megginson, david@megginson.com
false
2048
+
+ false
+
false
5
8
@@ -732,6 +735,7 @@ Started September 2000 by David Megginson, david@megginson.com
1.0
false
false
+ false
90
diff --git a/gui/dialogs/button-config.xml b/gui/dialogs/button-config.xml
index 21cd9fb90..42a997934 100644
--- a/gui/dialogs/button-config.xml
+++ b/gui/dialogs/button-config.xml
@@ -486,6 +486,19 @@ var assignButton = func(cmd) {
+
+ 10
+ 3
+ fill
+ Autopilot disconnect
+
+ nasal
+
+
+
+
0
4
diff --git a/gui/dialogs/input-config.xml b/gui/dialogs/input-config.xml
index d35892afd..4903100b7 100644
--- a/gui/dialogs/input-config.xml
+++ b/gui/dialogs/input-config.xml
@@ -209,6 +209,35 @@
1
+
+
+
+
+
+
+ left
+ top
+ table
+
+
+
+ left
+
+ 0
+ 0
+
+
+
+ left
+ Mouse rudder also controls elevator
+ /sim/mouse/mouse-rudder-elevator
+
+ dialog-apply
+
+ 0
+ 1
+
+
1
@@ -217,7 +246,7 @@
left
-
+
diff --git a/gui/dialogs/rendering.xml b/gui/dialogs/rendering.xml
index 2fe20f65c..d26380ed3 100644
--- a/gui/dialogs/rendering.xml
+++ b/gui/dialogs/rendering.xml
@@ -34,33 +34,33 @@
-
-
-
- /sim/gui/dialogs/rendering/shader-warning
- 1
-
-
-
- 1.0
- 0.6
- 0.6
-
- Warning: Intel integrated graphics detected. Your graphics card may not support shaders or complex graphics.
-
+
+
+
+ /sim/gui/dialogs/rendering/shader-warning
+ 1
+
+
+
+ 1.0
+ 0.6
+ 0.6
+
+ Warning: Intel integrated graphics detected. Your graphics card may not support shaders or complex graphics.
+
center
hbox
-
-
- vbox
- 1
-
-
-
-
+
+
+ vbox
+ 1
+
+
+
+
vbox
@@ -172,15 +172,15 @@
- left
- Use disk space for faster loading (DDS Texture Cache)
- texture-cache-enabled
- /sim/rendering/texture-cache/cache-enabled
-
- dialog-apply
- texture-cache-enabled
-
-
+ left
+ Use disk space for faster loading (DDS Texture Cache)
+ texture-cache-enabled
+ /sim/rendering/texture-cache/cache-enabled
+
+ dialog-apply
+ texture-cache-enabled
+
+
left
@@ -234,9 +234,9 @@
-
- 1
-
+
+ 1
+
hbox
@@ -486,23 +486,23 @@
table
- 0
- 0
-
- /sim/rendering/shaders/skydome
-
- Filter effects
- center
-
- dialog-show
- als-filters
-
-
- dialog-close
- rendering
-
- 200
-
+ 0
+ 0
+
+ /sim/rendering/shaders/skydome
+
+ Filter effects
+ center
+
+ dialog-show
+ als-filters
+
+
+ dialog-close
+ rendering
+
+ 200
+
0
@@ -533,25 +533,25 @@
-
-
- vbox
- 1
-
-
-
-
+
+
+ vbox
+ 1
+
+
+
+
-
-
- vbox
- 1
-
-
-
-
+
+
+ vbox
+ 1
+
+
+
+
vbox
@@ -846,45 +846,49 @@
0
left
Terrain Textures
-
+
-
- 7
- 1
- texture-set
+
+ 7
+ 1
+ texture-set
200
- sim/gui/dialogs/rendering/texture-set
- Region-specific
- Global
- Global alternative (DDS format)
-
- dialog-apply
- texture-set
-
-
- nasal
-
-
-
- reload-materials
-
-
+
+
+
+ reload-materials
+
+
-
+
8
0
- 2
- left
-
- 1.0
- 0.6
- 0.6
-
- Warning: Pylons, Detailed Roads, Buildings use a lot of memory
-
+ Satellite Photoscenery
+ satellite-photoscenery
+
+
+ /sim/rendering/rembrandt/enabled
+
+
+ /sim/rendering/photoscenery/enabled
+
+ dialog-apply
+ satellite-photoscenery
+
+
9
@@ -892,13 +896,25 @@
2
left
- 1.0
- 0.6
- 0.6
-
- and disk space, and are only available in limited areas.
-
+ 1.0
+ 0.6
+ 0.6
+
+ Warning: Pylons, Detailed Roads, Buildings use a lot of memory
+
+
+ 10
+ 0
+ 2
+ left
+
+ 1.0
+ 0.6
+ 0.6
+
+ and disk space, and are only available in limited areas.
+
@@ -933,16 +949,16 @@
-
- left
- Animated jetways
- jetways
- /nasal/jetways/enabled
-
- dialog-apply
- jetways
-
-
+
+ left
+ Animated jetways
+ jetways
+ /nasal/jetways/enabled
+
+ dialog-apply
+ jetways
+
+
1
@@ -950,14 +966,14 @@
-
-
- vbox
- 1
-
-
-
-
+
+
+ vbox
+ 1
+
+
+
+
@@ -965,10 +981,10 @@
OK
- true
-
- nasal
-
-
+
+
dialog-close
@@ -1113,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",
diff --git a/gui/menubar.xml b/gui/menubar.xml
index f2017e837..199fdf5e6 100644
--- a/gui/menubar.xml
+++ b/gui/menubar.xml
@@ -93,6 +93,49 @@
view
+ -
+
+ /sim/rendering/composite-viewer-enabled
+
+ view-clone
+ Sup-v
+
+ view-clone
+
+
+
+ -
+
+ /sim/rendering/composite-viewer-enabled
+
+ view-push
+
+ view-push
+
+
+
+ -
+
+ /sim/rendering/composite-viewer-enabled
+
+ view-last-pair
+ Sup-V
+
+ view-last-pair
+
+
+
+ -
+
+ /sim/rendering/composite-viewer-enabled
+
+ view-last-pair-double
+
+
+ view-last-pair-double
+
+
+
-
toggle-fullscreen
Shift-F10
diff --git a/mice.xml b/mice.xml
index b1845170c..9594a75ed 100644
--- a/mice.xml
+++ b/mice.xml
@@ -151,19 +151,17 @@ current mode for each mouse is held in the
-
-
- /devices/status/mice/mouse[0]/button[1]
-
property-adjust
/controls/flight/elevator
diff --git a/options.xml b/options.xml
index 09daf4f47..cb2ba0011 100644
--- a/options.xml
+++ b/options.xml
@@ -58,6 +58,13 @@
+
+ composite-viewer
+ composite-viewer-desc
+ 1
+
+
+
verbose
v