Run styles, bloom and sharpen through a Cesium effects port

The effects port puts each style the app defines on its own post-process
stage, takes the scene's bloom stage and adds a sharpen stage, with the
mappings the application uses today. An animated style holds frames and
advances its time uniform while it draws. A replaced style keeps drawing
until its intensity is 0, so the app can crossfade; the contract, the stub
and a new conformance check say so. The conformance renderer has the
port; the application renderer does not yet.
This commit is contained in:
Sameh Khamis committed 2026-11-06 16:32:39 -08:00
1 parent 765a0db094
commit bbda6dd0a1
11 files changed
+814 -9

No files matched your search

+8 -1
View File
@@ -34,6 +34,9 @@ import { cesiumCapabilities, createCesiumPorts } from './ports.js';
const viewers = new WeakMap();
/** Capabilities of ports the application renderer does not have yet. */
const NOT_YET = ['styles', 'bloom', 'sharpen'];
/** A Set no one can change once built, so `capabilities` stays true. */
export class ReadonlySet extends Set {
#sealed;
@@ -91,7 +94,11 @@ export function createCesiumRendererPlugin({
let capabilities;
try {
viewer = createViewer({ container, creditContainer });
capabilities = new ReadonlySet(cesiumCapabilities(viewer.scene));
// Effects are not the application's yet: its styles still run
// through stages of their own.
capabilities = new ReadonlySet(
cesiumCapabilities(viewer.scene).filter((c) => !NOT_YET.includes(c)),
);
ports = createCesiumPorts(viewer, { capabilities });
input = createCesiumInput(viewer, {
query: ports.query,