Drive the visual styles, bloom and sharpen through the effects port

VisualEffects defines each preset on the renderer and keeps its own
records of intensities and parameters, written through to the port, so
crossfades, the anime sky fade, bloom and sharpen behave as before. The
renderer animates the animated styles. Sensor picks read the style
records instead of the renderer's stages. The application renderer now
has the effects port and its capabilities.
This commit is contained in:
Sameh Khamis committed 2026-11-06 16:32:49 -08:00
1 parent bbda6dd0a1
commit 6a7905fc49
18 files changed
+375 -186

No files matched your search

+11 -6
View File
@@ -44,6 +44,7 @@ import {
} from '../../renderGovernor.js';
import { fakeInput } from '../../input/testDoubles.mjs';
import { framePortFor } from '../../testSupport/fakeFramePort.mjs';
import { registerStyleStages } from '../../styles/styleStages.js';
const BOSTON = { lat: 42.3601, lon: -71.0589 };
@@ -3446,12 +3447,16 @@ test('sensor clicks map displayed pixels into the pre-shader pick buffer', async
};
const uniforms = { intensity: 1, pixelation: 1 };
let preset = 'surveillance';
scene.postProcessStages = {
getStageByName: (name) =>
name === `godsEyeView_${preset}`
? { enabled: true, uniforms }
: undefined,
};
const stage = (name) =>
name === preset ? { enabled: true, uniforms } : undefined;
registerStyleStages(scene, {
get surveillance() {
return stage('surveillance');
},
get thermal() {
return stage('thermal');
},
});
const click = (position) => app.input.click(position);
click(new Cesium.Cartesian2(1440, 540));
assert.ok(Math.abs(actual.x - 1472) < 1e-6);