1
0
Fork 0

Merge branch 'next' into canvas-livery

This commit is contained in:
fly 2020-11-24 19:51:04 +11:00
commit 422f63b076
44 changed files with 554 additions and 219 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:
@ -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 <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:
@ -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 <filename> (in the example trees.txt.gz) contains lines of the form

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

@ -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,22 +1484,22 @@ foreach(s; cloudShadowArray)
}
# now write out the closest cloud for the detail effects
if (index_min != -1) {
var s = cloudShadowArray[index_min];
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;
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 );
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;}
#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

@ -2780,14 +2780,14 @@ var set_METAR_weather_station = func {
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;

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

@ -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

@ -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>
@ -172,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>
@ -234,9 +234,9 @@
</visible>
</text>
<empty>
<stretch>1</stretch>
</empty>
<empty>
<stretch>1</stretch>
</empty>
<group>
<layout>hbox</layout>
@ -486,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>
@ -533,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>
@ -846,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>
@ -892,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>
@ -933,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>
@ -950,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>
@ -965,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)) {
@ -979,8 +995,8 @@
if (reinit) {
fgcommand("reinit", props.Node.new({"subsystem": "scenery"}));
}
</script>
</binding>
</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
@ -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",

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>