From 4b1739c87c30c59d36a6d6e833e28c723b87a614 Mon Sep 17 00:00:00 2001 From: HarelM Date: Tue, 27 Aug 2024 09:30:32 +0300 Subject: [PATCH 1/3] Fix issue with with render test --- src/style/sky.ts | 1 + .../terrain/fog-no-sky-blend/expected.png | Bin 0 -> 1937 bytes .../tests/terrain/fog-no-sky-blend/style.json | 46 ++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 test/integration/render/tests/terrain/fog-no-sky-blend/expected.png create mode 100644 test/integration/render/tests/terrain/fog-no-sky-blend/style.json diff --git a/src/style/sky.ts b/src/style/sky.ts index 2550f1b117..792755d9cb 100644 --- a/src/style/sky.ts +++ b/src/style/sky.ts @@ -66,6 +66,7 @@ export class Sky extends Evented { 'sky-color': 'transparent', 'horizon-color': 'transparent', 'fog-color': 'transparent', + 'fog-ground-blend': 1 }; } diff --git a/test/integration/render/tests/terrain/fog-no-sky-blend/expected.png b/test/integration/render/tests/terrain/fog-no-sky-blend/expected.png new file mode 100644 index 0000000000000000000000000000000000000000..0046b82647819ec551b0c253ebd73f0cc6ff01a3 GIT binary patch literal 1937 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7&zE~)R&4YzZe+UBRpLkLn;{G9yDZRVBld= z;Qt+duZhEi;lLa=h8dR`7>cDB68xAM&SWw)Sn@I$EN5hRHYzz92tzIT&` lqq%srC>t%$=}@WhpXlKHulY)Q53s6b@O1TaS?83{1OQRv6CnTq literal 0 HcmV?d00001 diff --git a/test/integration/render/tests/terrain/fog-no-sky-blend/style.json b/test/integration/render/tests/terrain/fog-no-sky-blend/style.json new file mode 100644 index 0000000000..0117e02232 --- /dev/null +++ b/test/integration/render/tests/terrain/fog-no-sky-blend/style.json @@ -0,0 +1,46 @@ +{ + "version": 8, + "sprite": "local://sprites/sprite", + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "timeout": 60000, + "metadata": { + "test": { + "height": 512, + "width": 512, + "maxPitch": 85, + "operations": [ + ["wait"] + ] + } + }, + "center": [ + 35.38, + 31.55 + ], + "zoom": 15, + "pitch": 85, + "sources": { + "terrain": { + "type": "raster-dem", + "tiles": [ + "local://tiles/zero-elevation-terrain-tile.png" + ], + "minzoom": 7, + "maxzoom": 12, + "tileSize": 256 + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "red" + } + } + ], + "terrain": { + "source": "terrain", + "exaggeration": 1 + } +} From 0b8b2b1b9bcc992b1f94d6e01e5b07e56d0dcd56 Mon Sep 17 00:00:00 2001 From: HarelM Date: Tue, 27 Aug 2024 10:55:16 +0300 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1b857cb4f..be16715454 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Heatmap Fix for 3D terrain ([#4571](https://github.com/maplibre/maplibre-gl-js/pull/4571)) - Fix Map#off to not remove listener with layer(s) registered with Map#once ([#4592](https://github.com/maplibre/maplibre-gl-js/pull/4592)) +- Fix the color near the horizon when terrain is enabled without any sky ([#4607](https://github.com/maplibre/maplibre-gl-js/pull/4607)) - _...Add new stuff here..._ ## 4.6.0 From 8d8e52168136c1a10688d4d5f78f9ba008171ce0 Mon Sep 17 00:00:00 2001 From: Harel M Date: Tue, 27 Aug 2024 16:24:15 +0300 Subject: [PATCH 3/3] Update src/style/sky.ts Co-authored-by: Jakub Pelc <57600346+kubapelc@users.noreply.github.com> --- src/style/sky.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/style/sky.ts b/src/style/sky.ts index 792755d9cb..b11ee784d2 100644 --- a/src/style/sky.ts +++ b/src/style/sky.ts @@ -66,7 +66,8 @@ export class Sky extends Evented { 'sky-color': 'transparent', 'horizon-color': 'transparent', 'fog-color': 'transparent', - 'fog-ground-blend': 1 + 'fog-ground-blend': 1, + 'atmosphere-blend': 0, }; }