diff --git a/Materials/regions/europe.xml b/Materials/regions/europe.xml
index 303a67689..736cac277 100644
--- a/Materials/regions/europe.xml
+++ b/Materials/regions/europe.xml
@@ -185,7 +185,7 @@
0
8000.0
- 1.0
+ 0.5
2000
2000
@@ -252,7 +252,7 @@
15.0
10.0
- 1.0
+ 0.8
@@ -275,7 +275,7 @@
1
0.2
-1.0
- 1.0
+ 0.8
1024
1024
@@ -337,7 +337,7 @@
15.0
10.0
- 1.0
+ 0.9
@@ -417,7 +417,7 @@
20.0
12.0
- 1.0
+ 0.1
@@ -446,7 +446,7 @@
20.0
12.0
- 1.0
+ 0.1
@@ -530,7 +530,7 @@
1
1.4
0.6
- 1.0
+ 0.8
2000
2000
@@ -565,7 +565,7 @@
1
1.4
0.6
- 1.0
+ 0.8
2000
2000
diff --git a/Materials/regions/global-summer.xml b/Materials/regions/global-summer.xml
index 4304bcc98..dd704b892 100644
--- a/Materials/regions/global-summer.xml
+++ b/Materials/regions/global-summer.xml
@@ -97,7 +97,7 @@
1
1
- 1.0
+ 0.8
@@ -119,7 +119,7 @@
1
0.85
- 1.0
+ 0.8
@@ -140,7 +140,7 @@
1
0.95
- 1.0
+ 0.8
@@ -162,7 +162,7 @@
1
1
- 1.0
+ 0.9
@@ -182,7 +182,7 @@
1
1
- 1.0
+ 0.9
@@ -201,7 +201,7 @@
1
1
- 1.0
+ 0.8
@@ -310,7 +310,7 @@
25.0
15.0
- 1.0
+ 0.8
@@ -334,7 +334,7 @@
- 1.0
+ 0.8
@@ -364,7 +364,7 @@
- 1.0
+ 0.9
@@ -398,7 +398,7 @@
12.0
7.0
- 1.0
+ 0.7
@@ -420,7 +420,7 @@
Effects/water
Terrain/water.png
- 1.0
+ 0.8
@@ -454,7 +454,7 @@
1.5
0.6
- 1.0
+ 0.8
@@ -473,7 +473,7 @@
- 1.0
+ 0.8
400
400
@@ -714,7 +714,7 @@
20.0
12.0
- 1.0
+ 0.7
@@ -748,7 +748,7 @@
20.0
12.0
- 1.0
+ 0.8
@@ -780,7 +780,7 @@
20.0
12.0
- 1.0
+ 0.8
@@ -907,7 +907,7 @@
20.0
12.0
- 1.0
+ 0.7
@@ -932,7 +932,7 @@
20.0
12.0
- 1.0
+ 0.8
diff --git a/Shaders/ws30-ALS-landclass-search-functions.frag b/Shaders/ws30-ALS-landclass-search-functions.frag
index 9b320c397..ed5ee9647 100644
--- a/Shaders/ws30-ALS-landclass-search-functions.frag
+++ b/Shaders/ws30-ALS-landclass-search-functions.frag
@@ -124,7 +124,7 @@
// Note: transitions occur on both sides of the landclass borders.
// The width of the transition is equal to 2x this value.
// Default: 100m
- const float transition_search_distance_in_m = 130.0;
+ const float transition_search_distance_in_m = 25.0;
// Number of points to search in any direction, in addition to this fragment
// Default:4 points. Fewer points results in a less smooth transition (more banding)
@@ -162,7 +162,7 @@
// Use the edge-hardness parameter from materials.xml to determine
// weighting of the landclass in transitions
- const int use_edge_hardness_with_large_scale_transition = 0;
+ const int use_edge_hardness_with_large_scale_transition = 1;
//////////////////////////////////////////////////////////////////
@@ -915,6 +915,11 @@ void get_landclass_id(in vec2 tile_coord, in vec4 dFdx_and_dFdy,
int lc = lookup_landclass_id(tile_coord, dxdy, lc_n_tx, num_n_tx, lc_n_w);
+ float edge_hardness = 0.0;
+ if (use_edge_hardness_with_large_scale_transition == 1) {
+ edge_hardness = fg_dimensionsArray[lc].a;
+ }
+
// Neighbor landclass ids
ivec4 lc_n = ivec4(lc);
@@ -948,13 +953,14 @@ if ( (enable_large_scale_transition_search == 1) &&
// Transition search
-
const int n = num_search_points_in_a_direction;
const float search_dist = transition_search_distance_in_m;
vec2 step_size_m = vec2(search_dist/float(n));
- // step size in tile coords
- vec2 steps = step_size_m.st / tile_size.st;
+ // step size in tile coords. Modulated by the edge hardness which makes
+ // the step size smaller and hence the range of adjacent landclasses
+ // smaller.
+ vec2 steps = step_size_m.st / tile_size.st * (1.0 - edge_hardness);
vec2 c0 = tile_coord;
@@ -1157,15 +1163,6 @@ if (grow_landclass_borders_with_large_scale_transition == 1)
//lc = int(t);
//mfact[2] = t;
- if (use_edge_hardness_with_large_scale_transition == 1)
- {
- // the edge-hardness material parameter has range 0.0 (soft) to 1.0 (hard)
- // We use this to force the mix factor to 0 or 1
- if ((num_n > 0) && fg_dimensionsArray[lc].w > 0.5) {
- mfact[0] = step(0.5, mfact[0]);
- }
- }
-
landclass_id = lc;
neighbor_landclass_ids=lc_n;
num_unique_neighbors = num_n;