mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Occlusion test without Cesium: the depth probe moves to render/occlusion and reads depth textures too
The GPU probe behind query.occlusionTest no longer depends on Cesium: a renderer hands it the frame's depth through readSource (a DepthSource), and createDepthOcclusionTest builds the query port's test from it. Besides depth packed into RGBA8, as Cesium keeps it for picking, it reads a depth texture (encoding 'depth', on the GPU only), and log depth with no near plane decodes too. Cesium's sceneOcclusionProbe.js keeps only its scene reader. Exported as gods-eye-view/render/occlusion.
This commit is contained in:
1 parent
619c19ea67
commit
730dff53dd
10 files changed
+952
-706
No files matched your search
@@ -116,7 +116,11 @@ optional, so a renderer written before it still conforms:
|
||||
(`zoomOutGuard.js`). The application turns it on where a renderer has it.
|
||||
- `query.occlusionTest()` (capability `occlusionTest`) tests many points
|
||||
against the depth of the frames drawn without waiting for the GPU; the
|
||||
detection overlay leaves out the street vehicles it finds hidden.
|
||||
detection overlay leaves out the street vehicles it finds hidden. A WebGL
|
||||
renderer that hands over its frame's depth gets one from
|
||||
`@gods-eye-view/core/render/occlusion` (`createDepthOcclusionTest`, given a
|
||||
`DepthSource`: depth packed into RGBA8 or a depth texture, standard or
|
||||
logarithmic, with the view it was drawn from).
|
||||
- `RendererPlugin.applicationHooks(renderer)` hands the application what
|
||||
only some renderers have (`ApplicationHooks`); see
|
||||
[The application and its renderer](#the-application-and-its-renderer).
|
||||
@@ -243,8 +247,9 @@ on (no `renderer.id`, no engine type, no engine object's presence).
|
||||
stays framed (`camera.controls.keepEarthFramed`, which the scene turns
|
||||
on; Cesium's is `src/render/cesium/zoomOutGuard.js`); the detection
|
||||
overlay leaves out street vehicles something stands in front of through
|
||||
`query.occlusionTest()` under the `occlusionTest` capability (Cesium's is
|
||||
`src/render/cesium/sceneOcclusionProbe.js`; without it every such
|
||||
`query.occlusionTest()` under the `occlusionTest` capability (the GPU
|
||||
probe is `src/render/occlusion/depthProbe.js`, which Cesium's
|
||||
`src/render/cesium/sceneOcclusionProbe.js` feeds; without it every such
|
||||
vehicle's bracket shows); and an inline panel whose host stops animation
|
||||
frames keeps drawing through `resize` and `frame.renderNow()`
|
||||
(`src/app/panelRendering.js`), stopping at a frame that throws.
|
||||
|
||||
Reference in new issue
Block a user