mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 07:42:23 +00:00
fix(ui): the Cesium engine's render.sharpen() mirrors the sharpen stage
VisualEffects sends its sharpen state to engine.render.setSharpen when a viewer exists too; the Cesium engine keeps it as state, and the Cesium stage itself is unchanged.
This commit is contained in:
1 parent
d50eaa28af
commit
26968f4903
2 files changed
+27
-9
No files matched your search
@@ -32,12 +32,11 @@ export class VisualEffects {
|
||||
createStage = (options) => new PostProcessStage(options),
|
||||
}) {
|
||||
this.viewer = viewer;
|
||||
// Cesium sharpens with its own post stage below; an engine without a
|
||||
// viewer (Navara) sharpens in its render pipeline.
|
||||
// Cesium sharpens with its own post stage below, and the engine's
|
||||
// render.sharpen() mirrors that stage (the Cesium engine keeps the state
|
||||
// only); an engine without a viewer (Navara) sharpens in its pipeline.
|
||||
this.engineRender =
|
||||
!viewer && typeof engine?.render?.setSharpen === 'function'
|
||||
? engine.render
|
||||
: null;
|
||||
typeof engine?.render?.setSharpen === 'function' ? engine.render : null;
|
||||
this.requestRender = requestRender;
|
||||
this.holdRender = holdRender;
|
||||
this.releaseRender = releaseRender;
|
||||
@@ -118,6 +117,7 @@ export class VisualEffects {
|
||||
});
|
||||
this.sharpenStage.enabled = false;
|
||||
this.viewer.scene.postProcessStages.add(this.sharpenStage);
|
||||
this.engineRender?.setSharpen({ enabled: false });
|
||||
this.applySharpenIntensity(sharpenIntensity);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user