Keep street maps legible on Navara after dusk

Navara lights the map tiles with the real sun and sky, and only the
landscape maps took the night ambient fill, so an OSM street map turned
black at local night where Cesium keeps it lit. Every base map now takes
the night fill; the landscape maps keep their orbital fill as well.
Daylight is unchanged.

This is why the strict acceptance's Navara pixel and first-frame checks
over Austin failed in evening runs: navara-hd, parked-release,
hidden-switch, context-loss, geo-import and scope saw a black frame, and
the soak and failure matrix waited for a first frame that never came.
At night with the fix all nine pass.
This commit is contained in:
German Khokhlov committed 2026-11-07 06:29:33 +04:00
1 parent 54fe0aea40
commit e18f12d34c
3 files changed
+32 -5

No files matched your search

+5 -2
View File
@@ -124,14 +124,17 @@ export function buildNavaraLook(
? atmosphere.getSunElevation(place)
: Number.NaN;
// Keep the map legible from orbit and when descending into darkness.
// At low altitude the fill increases from sunset to civil dusk.
// At low altitude the fill increases from sunset to civil dusk. Every
// base map takes the night fill: the tiles are lit by the sun and the
// sky, so a street map turned black after dusk, where Cesium (the
// reference) keeps it legible; the orbital fill stays the landscape's.
const orbitalFill = Number.isFinite(height)
? Math.min(1, Math.max(0, (height - 50_000) / 250_000))
: 0;
const nightFill = Number.isFinite(elevation)
? Math.min(1, Math.max(0, -elevation / 6))
: 0;
const nextFill = landscape ? Math.max(orbitalFill, nightFill) : 0;
const nextFill = landscape ? Math.max(orbitalFill, nightFill) : nightFill;
if (nextFill !== fill) {
fill = nextFill;
if (fillLight) fillLight.update({ ambient: { intensity: fill } });