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

+10 -2
View File
@@ -55,6 +55,7 @@ export interface ModulationSector {
export interface EffectsDiagnostics {
style: string | null;
/** The passes that draw: `style:<id>` for each style, `bloom`, ... */
passes: string[];
}
@@ -67,12 +68,19 @@ export interface EffectsPort {
* languages; the Off removes it (turning it off when it is the style).
*/
defineStyle(definition: StyleDefinition): Off | null;
/**
* Make `id` the style, or none. The style it replaces, if its intensity
* is above 0, keeps drawing with the new one until its intensity is set
* to 0, so the application crossfades by fading one out as it fades the other in.
* Styles draw in the order they were defined.
*/
setStyle(id: string | null, params?: Record<string, number>): void;
/** A style's intensity, 0..1; kept while it is not the style. 1 at first. */
setStyleIntensity(id: string, intensity: number): void;
setStyleParams(id: string, params: Record<string, number>): void;
/** `bloom`. */
/** `bloom`. `strength`, 0..1, is kept while bloom is off. */
bloom(settings: { enabled: boolean; strength?: number }): void;
/** `sharpen`. */
/** `sharpen`. `amount`, 0..1, is kept while sharpen is off. */
sharpen(settings: { enabled: boolean; amount?: number }): void;
/** `screenModulation`. */
screenModulation?(sector: ModulationSector | null): void;