mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 11:24:00 +00:00
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.
This commit is contained in:
1 parent
179c846f3e
commit
177446c0be
2 files changed
+8
-7
No files matched your search
@@ -2,10 +2,10 @@
|
|||||||
// engine's render.setContinuous turns animation on), MSAA 4 as Cesium's
|
// engine's render.setContinuous turns animation on), MSAA 4 as Cesium's
|
||||||
// msaaSamples, the device pixel ratio unless a measurement pins one, a canvas
|
// msaaSamples, the device pixel ratio unless a measurement pins one, a canvas
|
||||||
// whose WebGL2 context keeps its drawing buffer (Cesium's
|
// whose WebGL2 context keeps its drawing buffer (Cesium's
|
||||||
// contextOptions.webgl.preserveDrawingBuffer, for captures), and the
|
// contextOptions.webgl.preserveDrawingBuffer, for captures), and Navara's
|
||||||
// `minimal` look: sky, stars, sky light and sun without post effects —
|
// `photoreal` look by default: its own photoreal scene with aerial
|
||||||
// Navara's photoreal chain costs about 5 ms a frame and greys the Google
|
// perspective, tone mapping and SMAA, about 5 ms a frame (S5). `minimal`
|
||||||
// tiles with tone mapping.
|
// (sky, stars, sky light and sun without post effects) stays for benches.
|
||||||
|
|
||||||
/** WebGL2 attributes Navara 0.2.1 asks for, plus preserveDrawingBuffer. */
|
/** WebGL2 attributes Navara 0.2.1 asks for, plus preserveDrawingBuffer. */
|
||||||
export const NAVARA_CONTEXT_ATTRIBUTES = Object.freeze({
|
export const NAVARA_CONTEXT_ATTRIBUTES = Object.freeze({
|
||||||
@@ -41,7 +41,7 @@ const PLANS = {
|
|||||||
* own addDefaultPhotorealScene (sky, sun, aerial perspective, lens flare,
|
* own addDefaultPhotorealScene (sky, sun, aerial perspective, lens flare,
|
||||||
* tone mapping, SMAA).
|
* tone mapping, SMAA).
|
||||||
*/
|
*/
|
||||||
export function navaraScenePlan(effects = 'minimal') {
|
export function navaraScenePlan(effects = 'photoreal') {
|
||||||
if (!Object.hasOwn(PLANS, effects))
|
if (!Object.hasOwn(PLANS, effects))
|
||||||
throw new RangeError(`Unknown Navara effects: ${effects}`);
|
throw new RangeError(`Unknown Navara effects: ${effects}`);
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -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)', () => {
|
test('effects=photoreal is the default look; minimal is sky, stars and sun light, no post effects (S5)', () => {
|
||||||
assert.deepEqual(navaraScenePlan(), {
|
assert.equal(navaraScenePlan().pluginDefault, true);
|
||||||
|
assert.deepEqual(navaraScenePlan('minimal'), {
|
||||||
pluginDefault: false,
|
pluginDefault: false,
|
||||||
meshes: ['sky', 'stars'],
|
meshes: ['sky', 'stars'],
|
||||||
lights: ['skyLightProbe', 'sun'],
|
lights: ['skyLightProbe', 'sun'],
|
||||||
|
|||||||
Reference in new issue
Block a user