mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(globe): Navara sprites, points and lines drawn after tone mapping
Review of Tasks 2–3: on Navara the overlays went through the look's tone mapping and grading (magenta came out as 247/40/228, green as 147/228/89 in the cinematic look), where Cesium draws billboards and polylines in the colours asked for. src/globe/navara/overlay.js: a public Navara EffectDesc (gevOverlay) inserted after toneMapping and before the gev sharpening, SMAA/FXAA and final, whose pass renders one three scene over the tone-mapped input buffer (in Navara's own Pass wrapper: Navara inserts a bare pass only when it is an instance of its own postprocessing copy); it costs nothing while the scene is empty. The chain has no depth buffer, so each overlay material tests the scene depth itself (overlayDepth.js): its log depth against Navara's MRT depth (RGBA packed), modes always / normal / depth-fail, disableWithinM as a per-vertex escape. Sprites and points (moverMesh.js) and line ribbons (lineMesh.js) live in that scene with their per-frame work as overlay hooks; models stay Navara meshes, lit and graded like the tiles. The sharpening now sits after the overlay (Cesium's sharpen stage sharpens billboards too). Also (review): Navara pixel dashes are measured in CSS pixels (gl_FragCoord over uGevPixelRatio), and the line viewport uniform is updated in place. Measured: a magenta sprite draws 255/0/255. The contract suite's colour checks are now within 40 of the asked colour on every channel on both engines (were: dominant channels); Cesium 68/68, Navara 74/74 (its sharpen-order check accepts the overlay between tone mapping and the sharpening). Shell: cesium 23/23, cross 4/4; navara 23/25 — the two map stack pictures from space fail on stddev 7.2/7.6 against 8, as on the Task 3 commit run at the same hour (the cinematic sun follows the clock into night over the reset view), not from this change.
This commit is contained in:
1 parent
3c2e924363
commit
e804351205
11 files changed
+388
-125
No files matched your search
@@ -510,17 +510,13 @@ export function createContractSuite(
|
||||
);
|
||||
// Pixels close to a colour in a 64 px box around a point: their
|
||||
// count and centroid.
|
||||
// A pure colour as drawn through either engine's tone mapping and
|
||||
// grading (Navara's cinematic look desaturates): every full
|
||||
// channel above 170 and at least 60 over every empty one.
|
||||
const like = (colour, data, i) => {
|
||||
let low = 0;
|
||||
let high = 255;
|
||||
for (let k = 0; k < 3; k++)
|
||||
if (colour[k] > 0.5) high = Math.min(high, data[i + k]);
|
||||
else low = Math.max(low, data[i + k]);
|
||||
return high > 170 && high - low >= 60;
|
||||
};
|
||||
// A colour as drawn: within 40 of the asked one on every channel
|
||||
// (both engines draw overlays after tone mapping, unlit).
|
||||
const like = (colour, data, i) =>
|
||||
colour.every(
|
||||
(channel, k) =>
|
||||
k > 2 || Math.abs(data[i + k] - channel * 255) <= 40,
|
||||
);
|
||||
const find = (screen, colour) => {
|
||||
const half = 32;
|
||||
const x0 = Math.round(screen.x) - half;
|
||||
|
||||
Reference in new issue
Block a user