mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
feat(globe): Sharpen on Navara, on at 80 % by default
The contract gains render.setSharpen({ enabled, amount }) and
render.sharpen(). Navara draws it as a custom EffectDesc: Cesium's unsharp
mask (3x3 box blur, gamma 2.2 round trip so one amount matches Cesium)
right after tone mapping and before SMAA/FXAA, skipping sky and cloud
pixels by scene depth. The Cesium engine keeps the state only; Cesium mode
still sharpens with its own post stage, unchanged. The fake engine records
it and the contract suite checks it.
Without a viewer the Sharpen slider and toggle drive the engine with the
same slider-to-amount mapping. On Navara the defaults, presets and share
links read Cesium's 49 % as 80 %.
This commit is contained in:
1 parent
ac081a008d
commit
bb8c0b83c4
17 files changed
+521
-16
No files matched your search
@@ -18,7 +18,13 @@
|
||||
// - zoom distances are Cesium's defaults (1 m to unbounded).
|
||||
|
||||
import * as geo from '../../geo/index.js';
|
||||
import { INPUT_TYPES, MODIFIERS, createEngineEvent } from '../contract.js';
|
||||
import {
|
||||
INPUT_TYPES,
|
||||
MODIFIERS,
|
||||
SHARPEN_INITIAL,
|
||||
createEngineEvent,
|
||||
mergeSharpen,
|
||||
} from '../contract.js';
|
||||
|
||||
const { cartesian2, cartesian3, cartographic, ellipsoid, math, matrix4 } = geo;
|
||||
const WGS84 = ellipsoid.WGS84;
|
||||
@@ -250,6 +256,7 @@ export function createFakeEngine(options = {}) {
|
||||
let transform = [...matrix4.IDENTITY];
|
||||
let percentageChanged = 0.5;
|
||||
let continuous = false;
|
||||
let sharpen = { ...SHARPEN_INITIAL };
|
||||
let flight = null;
|
||||
let lookAtTarget = null;
|
||||
let clock = 0;
|
||||
@@ -790,6 +797,11 @@ export function createFakeEngine(options = {}) {
|
||||
continuous = Boolean(enabled);
|
||||
},
|
||||
isContinuous: () => continuous,
|
||||
setSharpen(options) {
|
||||
record('render.setSharpen', [options]);
|
||||
sharpen = mergeSharpen(sharpen, options);
|
||||
},
|
||||
sharpen: () => ({ ...sharpen }),
|
||||
},
|
||||
surface: {
|
||||
sampleHeight(position, exclude) {
|
||||
|
||||
Reference in new issue
Block a user