diff --git a/Effects/terrain-default.eff b/Effects/terrain-default.eff
index 31bb62e50..cbf5b2440 100644
--- a/Effects/terrain-default.eff
+++ b/Effects/terrain-default.eff
@@ -367,7 +367,7 @@
float
-
+
season
float
@@ -636,6 +636,11 @@
float
+
+ season
+ float
+
+
quality_level
int
diff --git a/Materials/regions/materials.xml b/Materials/regions/materials.xml
index 08b7bc2a1..6f9a50cdc 100644
--- a/Materials/regions/materials.xml
+++ b/Materials/regions/materials.xml
@@ -1483,7 +1483,7 @@
CropGrassCover
CropGrass
Grassland
- Terrain/cropgrass-hires.png
+ Terrain/cropgrass-hires-autumn.png
Terrain/cropgrass-hires.mask.png
2000
2000
@@ -1549,7 +1549,7 @@
Town
SubUrban
- Terrain/town-europe.png
+ Terrain/town-europe-autumn.png
Terrain/town-europe.mask.png
1024
1024
@@ -1611,7 +1611,7 @@
MixedCropPastureCover
MixedCrop
ComplexCrop
- Terrain/irrcrop-europe.png
+ Terrain/irrcrop-europe-autumn.png
Terrain/irrcrop-europe.mask.png
2000
2000
@@ -1929,7 +1929,7 @@
Scrub
Sclerophyllous
- Terrain/shrub1.png
+ Terrain/shrub1-autumn.png
Terrain/grass_green_hires.png
Terrain/herbtundra_iceland.png
@@ -2072,7 +2072,7 @@
DeciduousForest
Bog
Heath
- Terrain/deciduous-hires.png
+ Terrain/deciduous-hires-autumn.png
2000
2000
10000000.0
@@ -2099,7 +2099,7 @@
MixedForestCover
MixedForest
RainForest
- Terrain/mixedforest-hires.png
+ Terrain/mixedforest-hires-autumn.png
2000
2000
5000000.0
@@ -2235,7 +2235,7 @@
Scrub
Sclerophyllous
- Terrain/shrub1.png
+ Terrain/shrub1-autumn.png
Terrain/grass_hires.png
Terrain/dirtrock.png
Terrain/dirtrock.png
@@ -2534,7 +2534,7 @@
Cemetery
Effects/landmass-nowood
- Terrain/tundra2.png
+ Terrain/tundra2-autumn.png
Terrain/grass_hires.png
Terrain/rock.png
@@ -2755,14 +2755,14 @@
Effects/crop
DryCropPastureCover
DryCrop
- Terrain/drycrop1.png
- Terrain/drycrop2.png
+ Terrain/drycrop1-autumn.png
+
Terrain/drycrop1.mask.png
Terrain/drycrop2.mask.png
Terrain/drycrop3.mask.png
- Terrain/drycrop4.mask.png
+
2000
2000
1
@@ -2902,7 +2902,7 @@
CropWood
AgroForest
Effects/landmass-nowood
- Terrain/cropwood.png
+ Terrain/cropwood-autumn.png
Terrain/cropwood.mask.png
2000
2000
diff --git a/Nasal/local_weather/local_weather.nas b/Nasal/local_weather/local_weather.nas
index d3cc8e41d..be4796893 100644
--- a/Nasal/local_weather/local_weather.nas
+++ b/Nasal/local_weather/local_weather.nas
@@ -2090,7 +2090,7 @@ while (i < nc) {
if (detailed_terrain_interaction_flag == 1)
{
- var p_lee_suppression = get_lee_bias(grad);
+ var p_lee_suppression = get_lee_bias(grad, tile_index);
if (rand() > p_lee_suppression) {continue;}
}
@@ -2289,7 +2289,7 @@ while (i < nc) {
if (detailed_terrain_interaction_flag == 1)
{
- var p_lee_suppression = get_lee_bias(grad);
+ var p_lee_suppression = get_lee_bias(grad, tile_index);
if (rand() > math.sqrt(p_lee_suppression)) {continue;}
}
@@ -3018,7 +3018,7 @@ else
# suppression of placement in lee terrain
###########################################################
-var get_lee_bias = func (grad) {
+var get_lee_bias = func (grad, tile_index) {
if ((local_weather.wind_model_flag == 1) or (local_weather.wind_model_flag == 3))
@@ -3703,6 +3703,8 @@ else if ((getprop("/environment/metar/valid") == 0) and (getprop(lw~"tmp/tile-ma
# see if we need to create an aloft wind interpolation structure
+set_wind_model_flag();
+
if ((wind_model_flag == 3) or ((wind_model_flag ==5) and (getprop(lwi~"ipoint-number") == 0)))
{
if (metar_flag != 1)
@@ -4056,7 +4058,7 @@ setlistener(lw~"tmp/convective-status", func {var s = size(clouds_path); compat_
setlistener(lw~"tmp/effect-thread-status", func {var s = size(effects_geo); effect_placement_loop(s); });
setlistener(lw~"tmp/presampling-status", func {manage_presampling(); });
-setlistener(lw~"config/wind-model", func {set_wind_model_flag();});
+# setlistener(lw~"config/wind-model", func {set_wind_model_flag();});
setlistener(lw~"config/thermal-properties", func {set_texture_mix();});
setlistener(lw~"config/clouds-in-dynamics-loop", func {weather_dynamics.max_clouds_in_loop = int(getprop(lw~"config/clouds-in-dynamics-loop"));});
diff --git a/Shaders/terrain-haze-detailed.frag b/Shaders/terrain-haze-detailed.frag
index 4cdbf5075..a9c471d8e 100644
--- a/Shaders/terrain-haze-detailed.frag
+++ b/Shaders/terrain-haze-detailed.frag
@@ -36,6 +36,7 @@ uniform float wetness;
uniform float fogstructure;
uniform float snow_thickness_factor;
uniform float cloud_self_shading;
+uniform float season;
uniform float transition_model;
uniform float hires_overlay_bias;
uniform int quality_level;
@@ -204,6 +205,7 @@ float noise_2000m = Noise2D(rawPos.xy, 2000.0);
// get the texels
texel = texture2D(texture, gl_TexCoord[0].st);
+ float local_autumn_factor = texel.a;
float distortion_factor = 1.0;
vec2 stprime;
@@ -277,7 +279,8 @@ if (tquality_level > 2)
nSum = mix(nSum, 0.5, max(0.0, 2.0 * (transition_model - 0.5)));
nSum = nSum + 0.4 * (1.0 -smoothstep(0.9,0.95, abs(steepness)+ 0.05 * (noise_50m - 0.5))) * min(1.0, 2.0 * transition_model);
mix_factor = smoothstep(0.5, 0.54, nSum);
- texel = mix(texel, mix_texel, mix_factor);
+ texel = mix(texel, mix_texel, mix_factor);
+ local_autumn_factor = texel.a;
}
// then the detail texture overlay
@@ -296,12 +299,32 @@ if (tquality_level > 3)
nSum = nSum - 0.08 * (1.0 -smoothstep(0.9,0.95, abs(steepness)));
mix_factor = smoothstep(0.47, 0.54, nSum +hires_overlay_bias - dist_fact);
if (mix_factor > 0.8) {mix_factor = 0.8;}
- texel = mix(texel, detail_texel,mix_factor);
+ texel = mix(texel, detail_texel,mix_factor);
+ local_autumn_factor = texel.a;
}
}
}
+
+// autumn colors
+
+float autumn_factor = season * 2.0 * (1.0 - local_autumn_factor) ;
+
+
+texel.r = min(1.0, (1.0 + 2.5 * autumn_factor) * texel.r);
+texel.g = texel.g;
+texel.b = max(0.0, (1.0 - 4.0 * autumn_factor) * texel.b);
+
+
+if (local_autumn_factor < 1.0)
+ {
+ intensity = length(texel.rgb) * (1.0 - 0.5 * smoothstep(1.1,2.0,season));
+ texel.rgb = intensity * normalize(mix(texel.rgb, vec3(0.23,0.17,0.08), smoothstep(1.1,2.0, season)));
+ }
+
+
+
const vec4 dust_color = vec4 (0.76, 0.71, 0.56, 1.0);
const vec4 lichen_color = vec4 (0.17, 0.20, 0.06, 1.0);;
//float snow_alpha;
diff --git a/Shaders/terrain-haze-ultra.frag b/Shaders/terrain-haze-ultra.frag
index 0c9beef5d..50ec0344d 100644
--- a/Shaders/terrain-haze-ultra.frag
+++ b/Shaders/terrain-haze-ultra.frag
@@ -44,7 +44,6 @@ uniform float wetness;
uniform float fogstructure;
uniform float snow_thickness_factor;
uniform float cloud_self_shading;
-uniform float moonlight;
uniform float season;
uniform float windspeed;
uniform float grain_strength;
@@ -276,7 +275,7 @@ float dotnoisegrad_10m;
// get the texels
- float local_autumn_factor = texel.a;
+
float distortion_factor = 1.0;
vec2 stprime;
int flag = 1;
@@ -285,6 +284,7 @@ float dotnoisegrad_10m;
float snow_alpha;
texel = texture2D(texture, gl_TexCoord[0].st);
+ float local_autumn_factor = texel.a;
grain_texel = texture2D(grain_texture, gl_TexCoord[0].st * 25.0);
gradient_texel = texture2D(gradient_texture, gl_TexCoord[0].st * 4.0);
diff --git a/Textures/Terrain/cropwood-autumn.png b/Textures/Terrain/cropwood-autumn.png
new file mode 100644
index 000000000..1559a8ba8
Binary files /dev/null and b/Textures/Terrain/cropwood-autumn.png differ
diff --git a/gui/dialogs/environment-settings.xml b/gui/dialogs/environment-settings.xml
index f10423ef2..d066cbd71 100644
--- a/gui/dialogs/environment-settings.xml
+++ b/gui/dialogs/environment-settings.xml
@@ -288,6 +288,42 @@
3
+
+
+
+ left
+ 7
+ 0
+
+
+
+
+ right
+ 7
+ 1
+
+
+
+ season
+ 7
+ 2
+ 0.0
+ 2.0
+ true
+ /environment/season
+
+ dialog-apply
+ season
+
+
+
+
+
+ left
+ 7
+ 3
+
+