mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-13 06:42:23 +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
@@ -2599,8 +2599,10 @@
|
||||
"src/data/detectionCohort.js",
|
||||
"src/data/detectionDraw.js",
|
||||
"src/data/detectionPolicy.js",
|
||||
"src/data/detectionOcclusion.js",
|
||||
"src/data/detectionPresentation.js",
|
||||
"src/data/detectionRenderDemand.js",
|
||||
"src/data/sceneOcclusionProbe.js",
|
||||
"src/data/earthquakes.js",
|
||||
"src/data/fireAnchors.js",
|
||||
"src/data/firmsAdapt.js",
|
||||
@@ -4083,6 +4085,8 @@
|
||||
"src/data/detection.js",
|
||||
"src/data/detectionRenderDemand.js",
|
||||
"src/data/detectionPresentation.js",
|
||||
"src/data/detectionOcclusion.js",
|
||||
"src/data/sceneOcclusionProbe.js",
|
||||
"src/data/modelEligibility.js",
|
||||
"src/app/layers/recentImagery.js",
|
||||
"src/layers/recentImagery/index.js",
|
||||
|
||||
Reference in new issue
Block a user