mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Cesium effects port draws screenModulation, the marker sweep
The adapter's effects port now has screenModulation: a contract sector shades points, billboards (labels among them) and icon sets in their own vertex shaders, swapped into this scene's command list as the primitives update, and tints models on the CPU after every owner has written its colour. Geometry and picks are unchanged. It is the sweep the cyber HUD already draws, carried into src/render/cesium/screenModulation.js and driven by a sector instead of document settings; nothing is installed until a sector is set, and disposal gives everything back. The capability is advertised on the Cesium version the command swap is tested against; diagnostics list the pass while it draws, and listeners hear when it starts or stops (a native shader it cannot take stops it). A set asks for a frame unless it changes nothing drawn: the same sector, or only the angle of a sweep while no shaded marker was in view. cyberSonarSector() gives the sector for the cyber sweep; the app switches to the port in the next commit. Conformance: the screenModulation check runs on Cesium; new checks read the pixels (in the band an icon draws, outside it and at radius 0 it dims to the floor, strength 1 draws it in the colour, clearing restores it) and check the member is absent without the capability.
This commit is contained in:
1 parent
ab678443ce
commit
85a04b1367
11 files changed
+1573
-10
No files matched your search
@@ -23,6 +23,7 @@ import { willDraw } from './frame.js';
|
||||
import { createCesiumGlobe } from './globe.js';
|
||||
import { createCesiumQuery, queryCapabilities } from './query.js';
|
||||
import { createCesiumQuality } from './quality.js';
|
||||
import { screenModulationSupported } from './screenModulation.js';
|
||||
import {
|
||||
atEndOfTick,
|
||||
billboardLoadError,
|
||||
@@ -54,7 +55,8 @@ const GLOBE_CAPABILITIES = [
|
||||
* to those it lists. Depth picks, height samples and ray casts all need
|
||||
* depth textures, which `sampleHeightSupported` and `pickPositionSupported`
|
||||
* report. Styles, bloom and sharpen are post-process stages every scene
|
||||
* runs.
|
||||
* runs; the screen modulation runs on the Cesium version it was tested
|
||||
* against.
|
||||
* @param {object} scene
|
||||
* @param {Iterable<string>} [only]
|
||||
* @returns {string[]}
|
||||
@@ -70,6 +72,8 @@ export function cesiumCapabilities(scene, only) {
|
||||
'styles',
|
||||
'bloom',
|
||||
'sharpen',
|
||||
// The marker sweep's command swap is tested against one Cesium version.
|
||||
...(screenModulationSupported() ? ['screenModulation'] : []),
|
||||
...GLOBE_CAPABILITIES,
|
||||
...queryCapabilities(scene),
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user