From 177446c0be6e83549436af464b9c81da1ae05fb3 Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Thu, 15 Oct 2026 22:55:31 +0400 Subject: [PATCH] feat(globe): Navara's photoreal look by default The Navara engine now builds its own photoreal scene (aerial perspective, tone mapping, SMAA) instead of the minimal sky-and-sun look. It costs about 5 ms a frame (S5); minimal stays available for benches. --- src/globe/navara/viewOptions.js | 10 +++++----- src/globe/navara/viewOptions.test.mjs | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/globe/navara/viewOptions.js b/src/globe/navara/viewOptions.js index 4c23653c4..c97047ad2 100644 --- a/src/globe/navara/viewOptions.js +++ b/src/globe/navara/viewOptions.js @@ -2,10 +2,10 @@ // engine's render.setContinuous turns animation on), MSAA 4 as Cesium's // msaaSamples, the device pixel ratio unless a measurement pins one, a canvas // whose WebGL2 context keeps its drawing buffer (Cesium's -// contextOptions.webgl.preserveDrawingBuffer, for captures), and the -// `minimal` look: sky, stars, sky light and sun without post effects — -// Navara's photoreal chain costs about 5 ms a frame and greys the Google -// tiles with tone mapping. +// contextOptions.webgl.preserveDrawingBuffer, for captures), and Navara's +// `photoreal` look by default: its own photoreal scene with aerial +// perspective, tone mapping and SMAA, about 5 ms a frame (S5). `minimal` +// (sky, stars, sky light and sun without post effects) stays for benches. /** WebGL2 attributes Navara 0.2.1 asks for, plus preserveDrawingBuffer. */ export const NAVARA_CONTEXT_ATTRIBUTES = Object.freeze({ @@ -41,7 +41,7 @@ const PLANS = { * own addDefaultPhotorealScene (sky, sun, aerial perspective, lens flare, * tone mapping, SMAA). */ -export function navaraScenePlan(effects = 'minimal') { +export function navaraScenePlan(effects = 'photoreal') { if (!Object.hasOwn(PLANS, effects)) throw new RangeError(`Unknown Navara effects: ${effects}`); return { diff --git a/src/globe/navara/viewOptions.test.mjs b/src/globe/navara/viewOptions.test.mjs index 30a9841d4..92a1cce3d 100644 --- a/src/globe/navara/viewOptions.test.mjs +++ b/src/globe/navara/viewOptions.test.mjs @@ -34,8 +34,9 @@ test('the canvas context keeps its drawing buffer, with the attributes Navara as }); }); -test('effects=minimal is the default look: sky, stars and sun light, no post effects (S5)', () => { - assert.deepEqual(navaraScenePlan(), { +test('effects=photoreal is the default look; minimal is sky, stars and sun light, no post effects (S5)', () => { + assert.equal(navaraScenePlan().pluginDefault, true); + assert.deepEqual(navaraScenePlan('minimal'), { pluginDefault: false, meshes: ['sky', 'stars'], lights: ['skyLightProbe', 'sun'],