mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
Test layers on one engine and share selection and shader helpers
Layer display tests no longer re-check Cesium primitives in every layer: they run on the fake engine, and one Cesium translation check per ground kind lives in the Cesium engine's ground tests. Their harnesses are shared, and the fake-engine, Cesium-engine and flights tests that repeated the contract suite are gone, 340 tests in all. The press-travel measurement is shared by the selection dispatcher and CCTV, which loses its ScreenSpaceEventHandler shim and world-click module. ALPR, installations and bikeshare share one selection keeper and selected marker write. Layers with their own click rules keep their handlers. Navara's pulse is a class like the ground pass, the ground and imagery passes share the surface uniforms, and the colour, log-depth and occlusion GLSL lives in one chunk module, each caller keeping its depth bias. The ground suite runs inside the contract suite (--only=ground:), and fixture and script names say what they test. Behaviour is unchanged on both engines.
This commit is contained in:
1 parent
7f478e3815
commit
b4556f9763
101 files changed
+1095
-4071
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { PACKED_DEPTH_GLSL } from './shaderChunks.js';
|
||||
// The depth test of gev's screen overlays on Navara (sprites, points and
|
||||
// lines drawn after tone mapping, overlay.js): there is no depth buffer in
|
||||
// the post-processing chain, so each fragment compares its own logarithmic
|
||||
@@ -15,6 +16,7 @@ export const OVERLAY_DEPTH_MODES = Object.freeze({
|
||||
|
||||
/** Fragment declarations: uniforms, the varying and gevOverlayHidden(). */
|
||||
export const OVERLAY_DEPTH_FRAGMENT = /* glsl */ `
|
||||
${PACKED_DEPTH_GLSL}
|
||||
uniform sampler2D tGevSceneDepth;
|
||||
uniform vec2 uGevResolution;
|
||||
uniform float uGevDepthMode;
|
||||
@@ -36,7 +38,7 @@ bool gevOverlayHidden() {
|
||||
#else
|
||||
float mine = gl_FragCoord.z;
|
||||
#endif
|
||||
bool occluded = mine > scene + 2e-6;
|
||||
bool occluded = packedDepthOccluded(mine, scene, 2e-6);
|
||||
return uGevDepthMode < 1.5 ? occluded : !occluded;
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in new issue
Block a user