1
0
Fork 0

Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/fgdata into next

This commit is contained in:
Erik Hofman 2017-05-16 15:44:49 +02:00
commit 89154b8149
7 changed files with 72 additions and 20 deletions

View file

@ -15,7 +15,7 @@
<name>Foch</name>
<pennant-number>R99</pennant-number>
<TACAN-channel-ID>026X</TACAN-channel-ID>
<model>Models/Geometry/Foch/Foch.xml</model>
<model>Models/Geometry/Clemenceau/Clemenceau.xml</model>
<latitude>42.830</latitude>
<!-- <latitude>42.9834</latitude>-->
<longitude>6.325</longitude>

View file

@ -17,7 +17,7 @@
<grain-texture-enabled type="int">0</grain-texture-enabled>
<grain-magnification type="float">50</grain-magnification>
<lightmap-enabled type="int">1</lightmap-enabled>
<lightmap-color type="vec3d" n="0"> 0.8 0.8 1.0 </lightmap-color>
<lightmap-color type="vec3d" n="0"> 0.941 0.682 0.086 </lightmap-color>
<snow_level><use>/environment/snow-level-m</use></snow_level>
<snow_thickness_factor><use>/environment/surface/snow-thickness-factor</use></snow_thickness_factor>
<road-traffic-enabled><use>/sim/rendering/osm/road-traffic-enabled</use></road-traffic-enabled>

View file

@ -94,7 +94,7 @@
<heading-deg>8</heading-deg>
</offsets>
</model>
<model>
<!--<model>
<name>Glide-path</name>
<path>Models/Geometry/Clemenceau/Models/glide-path.xml</path>
<offsets>
@ -103,7 +103,7 @@
<z-m>137.228</z-m>
<heading-deg>0</heading-deg>
</offsets>
</model>
</model>-->
<!--<model>
<path>Models/Geometry/Clemenceau/Models/Aircrafts/Alouette-III/Pedro.xml</path>
@ -171,7 +171,7 @@
<animation>
<!-- <animation>
<type>select</type>
<object-name>Glide-path</object-name>
<condition>
@ -180,7 +180,7 @@
<value>true</value>
</equals>
</condition>
</animation>
</animation>-->
<animation>

View file

@ -11,9 +11,16 @@
<PropertyList>
<path>pont-v2.ac</path>
<texture-path>Textures</texture-path>
<texture-path>Textures</texture-path>
<effect>
<inherits-from>Models/Geometry/Nimitz/Effects/flightdeck</inherits-from>
<object-name>Pont1</object-name>
<object-name>Pont2</object-name>
<object-name>Pont3</object-name>
<object-name>Pont4</object-name>
<object-name>Pont5</object-name>
</effect>

View file

@ -187,7 +187,9 @@ void main (void)
float fog_lightArg = (terminator-fog_yprime_alt)/100000.0;
float fog_earthShade = 0.9 * smoothstep(terminator_width+ terminator, -terminator_width + terminator, fog_yprime_alt) + 0.1;
float delta_z = hazeLayerAltitude - eye_alt;
float ct = dot(normalize(up), normalize(vertVec));
/// END geometry for light
@ -296,7 +298,9 @@ void main (void)
vec3 relPos = (gl_ModelViewMatrixInverse * vec4 (vertVec,0.0)).xyz;
if (cloud_shadow_flag == 1)
{
light_diffuse = light_diffuse * shadow_func(relPos.x, relPos.y, 1.0, dist);
float cloud_shadow_factor = shadow_func(relPos.x, relPos.y, 1.0, dist);
cloud_shadow_factor = 1.0 - ((1.0 - cloud_shadow_factor) * (1.0 - smoothstep (-100.0, 100.0, vertex_alt - hazeLayerAltitude)));
light_diffuse = light_diffuse * cloud_shadow_factor;
}
vec3 secondary_light = vec3 (0.0,0.0,0.0);
@ -477,7 +481,6 @@ void main (void)
float transmission_arg;
float eqColorFactor;
float delta_z = hazeLayerAltitude - eye_alt;
float mvisibility = min(visibility, avisibility);
if (dist > 0.04 * mvisibility)

View file

@ -120,52 +120,60 @@ float light_func (in float x, in float a, in float b, in float c, in float d, in
}
void road_type_mapper (in vec2 coord, out float rtype_traffic_density, out float rtype_base_illumination, out float rtype_traffic_speed)
void road_type_mapper (in vec2 coord, out float rtype_traffic_density, out float rtype_base_illumination, out float rtype_traffic_speed, out int rtype_dual_lane)
{
if (coord.s < 0.125)
{
rtype_dual_lane = 0;
rtype_traffic_density = 0;
rtype_base_illumination = 0;
rtype_traffic_speed = 0.0;
}
else if (coord.s < 0.250)
{
rtype_dual_lane = 0;
rtype_traffic_density = 0.3;
rtype_base_illumination = 0.65;
rtype_traffic_speed = 0.5;
}
else if (coord.s < 0.375)
{
rtype_dual_lane = 0;
rtype_traffic_density = 1.0;
rtype_base_illumination = 1.0;
rtype_traffic_speed = 1.0;
}
else if (coord.s < 0.5)
{
rtype_dual_lane = 0;
rtype_traffic_density = 0.0;
rtype_base_illumination = 0.0;
rtype_traffic_speed = 0.0;
}
else if (coord.s < 0.625)
{
rtype_dual_lane = 0;
rtype_traffic_density = 0.0;
rtype_base_illumination = 0.0;
rtype_traffic_speed = 0.0;
}
else if (coord.s < 0.750)
{
rtype_dual_lane = 1;
rtype_traffic_density = 1.0;
rtype_base_illumination = 0.65;
rtype_traffic_speed = 1.0;
}
else if (coord.s < 0.875)
{
rtype_dual_lane = 0;
rtype_traffic_density = 0.1;
rtype_base_illumination = 0.0;
rtype_traffic_speed = 0.3;
}
else
{
rtype_dual_lane = 0;
rtype_traffic_density = 0.0;
rtype_base_illumination = 0.0;
rtype_traffic_speed = 0.0;
@ -198,7 +206,8 @@ void main (void)
float rtype_traffic_density = 0.0;
float rtype_base_illumination = 0.0;
float rtype_traffic_speed = 0.0;
road_type_mapper (gl_TexCoord[0].st, rtype_traffic_density, rtype_base_illumination, rtype_traffic_speed);
int rtype_dual_lane = 0;
road_type_mapper (gl_TexCoord[0].st, rtype_traffic_density, rtype_base_illumination, rtype_traffic_speed, rtype_dual_lane);
float pf = 0.0;
float pf1 = 0.0;
@ -333,12 +342,20 @@ void main (void)
if (road_traffic_enabled == 1)
{
float cSign = 1.0;
if (roadCoords.s > 0.5) {cSign = -1.0;}
float cOffset = 0.0;
if (roadCoords.s > 0.5)
{
if (rtype_dual_lane == 0) {cSign = -1.0;}
else {cOffset = 5.0;}
}
if (rtype_dual_lane == 1) {cSign = -1.0;}
cSign *= road_traffic_direction;
float total_traffic_density = road_traffic_density * rtype_traffic_density;
float cCoord = roadCoords.t;
float cCoord = roadCoords.t + cOffset;
cCoord += 0.3 * osg_SimulationTime * cSign * rtype_traffic_speed * (1.0 - (0.9 * smoothstep(1.0, 2.5, total_traffic_density)));
cCoord *= 5.0;

View file

@ -22,6 +22,12 @@
}
}
}
if (getprop("/sim/multiplay/rxport") == nil or getprop("/sim/multiplay/rxport") == 0)
setprop("/sim/multiplay/rxport",5000);
if (getprop("/sim/multiplay/txport") == nil or getprop("/sim/multiplay/txport") == 0)
setprop("/sim/multiplay/txport",5000);
if (getprop("/sim/multiplay/protocol-version") == 2)
setprop("/sim/gui/dialogs/multiplay/protocol-version", "Visible to only 2017+");
else
@ -229,7 +235,26 @@
<properties>/sim/gui/dialogs/multiplay/servers</properties>
</combo>
<group>
<layout>hbox</layout>
<row>3</row>
<col>1</col>
<text>
<width>2</width>
<halign>right</halign>
<label>rxPort</label>
</text>
<input>
<pref-width>50</pref-width>
<halign>left</halign>
<property>/sim/multiplay/rxport</property>
<enable>
<not>
<property>/sim/multiplay/online</property>
</not>
</enable>
</input>
</group>
<!-- status area -->
<text>
<visible>
@ -276,11 +301,11 @@
<binding>
<command>nasal</command>
<script>
fgcommand("multiplayer-connect", props.Node.new({
"servername": getprop("/sim/multiplay/selected-server"),
"rxport": 5000,
"txport": 5000
}));
fgcommand("multiplayer-connect", props.Node.new({
"servername": getprop("/sim/multiplay/selected-server"),
"rxport": getprop("/sim/multiplay/rxport"),
"txport": getprop("/sim/multiplay/txport")
}));
</script>
</binding>
</button>