mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-11 05:42:22 +00:00
Hide street-vehicle brackets and labels behind buildings and terrain
The detection overlay only hid a contact behind the Earth's curve, so a street vehicle behind or under a building, a 3D tile or a hill still had its bracket and "VEH-nnnn" callout painted over that geometry, while its own dot was depth-tested and correctly hidden. A contact a layer marks `depthTested: true` (only Street Traffic does) is now tested against the depth the scene drew and left out of the overlay while a drawn surface stands in front of it by more than max(3 m, 2% of its range). Other layers are untouched: their markers are drawn over the scene on purpose. The test runs on the GPU and never waits for it. Each tested contact is one point drawn inside an occlusion query; the vertex shader looks up the frame's packed pick depth at the contact's pixel, decodes it and drops the point when the surface is nearer than the contact's threshold. Query results are collected on later frames. Reading depth back was measured and rejected: `scene.pickPosition` per contact costs 0.2 to 1.4 ms each, and Chromium answers `getBufferSubData` with a round trip to its GPU process even behind a signalled sync object (1.5 ms on a quiet machine, 15 to 25 ms on a busy one). - Contacts are retested every 100 to 200 ms, spread across frames, at most 256 a frame; with more in view the pace stretches so none starves. - Hiding is immediate. A hidden contact returns 600 ms after its last "hidden" answer, so one on a silhouette edge does not blink, and a contact new to the view is held back until its first answer (400 ms at most), so orbiting does not flash brackets behind buildings. - A callout whose contact goes behind something is dropped at once, not carried to the next solve and not faded out on the facade. - These times run on painted frames, so a hidden tab does not expire them. - A control point in every batch must draw; if it does not, the batch is ignored and after three the probe stands down for ten seconds. With no pick depth (2D, Columbus view, depth picking off) nothing is hidden. A WebGL 1 context reads depth back synchronously about 8 times a second. The renderer internals this depends on are read in one function, `readSceneDepthSource`, with the engine version they were checked against.
This commit is contained in:
1 parent
126616ac6c
commit
630e1b1998
10 files changed
+3215
-1
No files matched your search
@@ -3605,6 +3605,33 @@ isCurrent })` gates BOTH halves of the map-stack switch, which is its only
|
||||
> eye level before detection sees it, so ground-backed labels only reappear
|
||||
> once the camera clears the ellipsoid. Rendered proof:
|
||||
> `scripts/qa-cockpit-plates.mjs`.
|
||||
> - **Street vehicles behind geometry lose their bracket and callout
|
||||
> (2026-11-09):** a contact a layer marks `depthTested: true` (only Street
|
||||
> Traffic does) is tested against the depth the scene drew, and is left out
|
||||
> of the overlay while a building, 3D tile, terrain or any other drawn
|
||||
> surface stands in front of it by more than max(3 m, 2% of its range). That
|
||||
> includes vehicles the road data routes through tunnels. Every other layer
|
||||
> is untouched: aircraft, vessels and satellites draw their markers over the
|
||||
> scene on purpose and keep their labels over it. The test runs on the GPU
|
||||
> (`src/data/sceneOcclusionProbe.js`): one occlusion query per contact,
|
||||
> repeated every 100 to 200 ms, answered a frame or two later, with nothing
|
||||
> read back from the GPU and so no stall. A contact hides as soon as a
|
||||
> "hidden" answer arrives and returns 600 ms after its last one, which keeps
|
||||
> a contact on a silhouette edge from blinking; a callout whose contact goes
|
||||
> behind something is dropped at once rather than faded out on the facade.
|
||||
> A contact new to the view is held back until its first answer (at most
|
||||
> 400 ms), so orbiting a city does not flash a bracket for each vehicle that
|
||||
> swings into frame behind a building. These times run on painted frames,
|
||||
> so a hidden tab or an idle scene does not expire them.
|
||||
> Do not swap this for `scene.pickPosition` per contact or for a depth
|
||||
> read-back: both wait on the GPU process (measured 0.2 to 1.4 ms per pick,
|
||||
> and 1.5 to 25 ms per `getBufferSubData` even behind a signalled sync
|
||||
> object). With no pick depth (2D or Columbus view, depth picking off) or
|
||||
> after a failed self-check, nothing is hidden and
|
||||
> `getDetectionDiagnostics().surfaceDepthMode` reads `off`; a WebGL 1
|
||||
> context reads depth back synchronously about 8 times a second and reads
|
||||
> `sync`. The renderer internals this relies on are listed, with the engine
|
||||
> version they were checked against, in `readSceneDepthSource`.
|
||||
> - **Required attribution has two named keep-out rules (2026-08-20):** the
|
||||
> Google/Cesium credit line must stay visible in every state, and below 900px
|
||||
> two surfaces used to paint over it — the command dock's popover tray (any
|
||||
|
||||
Reference in new issue
Block a user