diff --git a/Effects/urban.eff b/Effects/urban.eff index 6e5c60347..fad7d9ee6 100644 --- a/Effects/urban.eff +++ b/Effects/urban.eff @@ -33,6 +33,8 @@ /sim/rendering/shaders/skydome + 0 + 0.4 @@ -169,7 +171,24 @@ 3 - noise + + texture[11]/image + + + texture[11]/type + + + texture[11]/filter + + + texture[11]/wrap-s + + + texture[11]/wrap-t + + + texture[11]/internal-format + Shaders/urban-ALS.vert @@ -183,10 +202,6 @@ tangent 6 - normal 15 @@ -208,8 +223,8 @@ 2 - NoiseTex - sampler-3d + BackgroundTex + sampler-2d 3 @@ -233,6 +248,13 @@ night-color + + blend_bias + float + + blend_bias + + quality_level float @@ -250,6 +272,11 @@ int tquality_level + + urban_blend + int + urban_blend + snowlevel float @@ -760,8 +787,26 @@ 2 - noise + + texture[11]/image + + + texture[11]/type + + + texture[11]/filter + + + texture[11]/wrap-s + + + texture[11]/wrap-t + + + texture[11]/internal-format + + Shaders/urban-ALS.vert Shaders/urban-ALS.frag @@ -1171,8 +1216,8 @@ 1 - NoiseTex - sampler-3d + BackgroundTex + sampler-2d 2 @@ -1196,6 +1241,13 @@ night-color + + blend_bias + float + + blend_bias + + quality_level float diff --git a/Materials/regions/south_africa.xml b/Materials/regions/south_africa.xml index 143829d9c..dbc7c1997 100644 --- a/Materials/regions/south_africa.xml +++ b/Materials/regions/south_africa.xml @@ -38,6 +38,45 @@ 1e30 + + BuiltUpCover + Urban + Effects/urban + + Terrain/city1_overlay.png + Terrain/city1-relief-light.png + Terrain/dry_pasture4.png + + + 1 + -1.0 + + Terrain/city1.mask.png + Terrain/city2.mask.png + 1000 + 1000 + 100000.0 + + 0.05 + 0.05 + 0.02 + 1.0 + + + 2500.0 + 0.4 + 3 + 30.0 + 10.0 + 30.0 + 0.6 + 0.2 + 250000.0 + Trees/mixed-alt.png + 8 + 25.0 + 15.0 + diff --git a/Materials/regions/southern_europe.xml b/Materials/regions/southern_europe.xml index c3698e2ac..d7b4fb473 100644 --- a/Materials/regions/southern_europe.xml +++ b/Materials/regions/southern_europe.xml @@ -346,9 +346,16 @@ Effects/tree-european-deciduous Effects/urban - Terrain/18th_century_city.png + Terrain/18th_century_city_overlay.png + Terrain/18th_century_city-relief-light.png + Terrain/grass_dry3.png + + 1 + 0.2 + -1.0 + Terrain/18th_century_city.mask.png 1000 1000 @@ -377,6 +384,33 @@ 10.0 + + Construction + Industrial + Effects/urban + + Terrain/industrial_overlay.png + Terrain/industrial-relief-light.png + Terrain/grass_dry3.png + + + 1 + 0.2 + -1.0 + + Terrain/industrial-mask.png + 1000 + 1000 + 100000.0 + + 0.05 + 0.05 + 0.02 + 1.0 + + + + Town SubUrban diff --git a/Materials/regions/us_southwest.xml b/Materials/regions/us_southwest.xml index a05efdd6c..9e9be27f3 100644 --- a/Materials/regions/us_southwest.xml +++ b/Materials/regions/us_southwest.xml @@ -74,7 +74,45 @@ 1e30 - + + BuiltUpCover + Urban + Effects/urban + + Terrain/city1_overlay.png + Terrain/city1-relief-light.png + Terrain/shrub-hawaii.png + + + 1 + -1.0 + + Terrain/city1.mask.png + Terrain/city2.mask.png + 1000 + 1000 + 100000.0 + + 0.05 + 0.05 + 0.02 + 1.0 + + + 2500.0 + 0.4 + 3 + 30.0 + 10.0 + 30.0 + 0.6 + 0.2 + 250000.0 + Trees/mixed-alt.png + 8 + 25.0 + 15.0 + Effects/landmass-scrub diff --git a/Shaders/lightspot-ALS.frag b/Shaders/lightspot-ALS.frag index 5862eff32..b09206415 100644 --- a/Shaders/lightspot-ALS.frag +++ b/Shaders/lightspot-ALS.frag @@ -61,7 +61,7 @@ mat2 rotMat = mat2 (cos(lightspot_dir1), sin(lightspot_dir1), -sin(lightspot_dir difference_vec.xy = rotMat * difference_vec.xy; difference_vec.x/= (1.0 + lightspot_project1); -float lightspot_arg = (1.0 - smoothstep(lightspot_size1/3.0, lightspot_size1, length(difference_vec))) * (1.0 - 0.5* smoothstep(lightspot_size1/3.0, lightspot_size1/(1.0+lightspot_project1), difference_vec.x)); +float lightspot_arg = (1.0 - smoothstep(lightspot_size1/3.0, lightspot_size1, length(difference_vec))) * (1.0 - 0.5* smoothstep(lightspot_size1/3.0, lightspot_size1/(1.0+lightspot_project1), -difference_vec.x)); vec3 lightspot_color = vec3 (lightspot_r1,lightspot_g1, lightspot_b1 ) * lightspot_arg; diff --git a/Shaders/urban-ALS.frag b/Shaders/urban-ALS.frag index 3a874d692..1359f3f77 100644 --- a/Shaders/urban-ALS.frag +++ b/Shaders/urban-ALS.frag @@ -28,6 +28,8 @@ varying float mie_angle; uniform sampler2D BaseTex; uniform sampler2D NormalTex; uniform sampler2D QDMTex; +uniform sampler2D BackgroundTex; +uniform sampler2D OverlayTex; uniform float depth_factor; uniform float tile_size; uniform float quality_level; @@ -45,6 +47,7 @@ uniform float wetness; uniform float fogstructure; uniform float cloud_self_shading; uniform float air_pollution; +uniform float blend_bias; uniform float landing_light1_offset; uniform float landing_light2_offset; uniform float landing_light3_offset; @@ -59,6 +62,7 @@ uniform int use_landing_light; uniform int use_alt_landing_light; uniform int gquality_level; uniform int tquality_level; +uniform int urban_blend; const float scale = 1.0; int linear_search_steps = 10; @@ -272,8 +276,15 @@ void main (void) - vec4 finalColor = texture2D(BaseTex, uv); + vec4 baseTexel = texture2D(BaseTex, uv); + vec4 finalColor = baseTexel; + + if (urban_blend == 1) + { + vec4 backgroundTexel = texture2D(BackgroundTex, uv); + finalColor.rgb = mix(backgroundTexel.rgb, baseTexel.rgb, clamp(baseTexel.a - blend_bias, 0.0, 1.0)); + } // texel postprocessing by shader effects diff --git a/Textures/Terrain/18th_century_city_overlay.png b/Textures/Terrain/18th_century_city_overlay.png new file mode 100644 index 000000000..2cd8e2ff7 Binary files /dev/null and b/Textures/Terrain/18th_century_city_overlay.png differ diff --git a/Textures/Terrain/city1_overlay.png b/Textures/Terrain/city1_overlay.png new file mode 100644 index 000000000..86d5ea48b Binary files /dev/null and b/Textures/Terrain/city1_overlay.png differ diff --git a/Textures/Terrain/industrial_overlay.png b/Textures/Terrain/industrial_overlay.png new file mode 100644 index 000000000..031978a35 Binary files /dev/null and b/Textures/Terrain/industrial_overlay.png differ