Dispose the Navara bloom and sharpen passes when their effect is deleted

EffectComposer.removePass does not dispose a pass. One withPassDisposal mixin now does it for the bloom, sharpen, styles and overlay effects.
This commit is contained in:
German Khokhlov committed 2026-11-03 23:30:10 +04:00
1 parent b49f9dddf0
commit cbe1d841ea
6 files changed
+67 -27

No files matched your search

+4 -2
View File
@@ -20,7 +20,7 @@
// has no public call to merge effects. A disabled pass is skipped: off costs
// nothing.
import { withFrameUpdates } from './frameDescriptor.js';
import { withFrameUpdates, withPassDisposal } from './frameDescriptor.js';
import { Effect as NavaraEffect, EffectDesc } from '@navaramap/three';
import { Effect, EffectAttribute } from 'postprocessing';
import { RGBADepthPacking, Uniform } from 'three';
@@ -87,7 +87,9 @@ class UnsharpMaskEffect extends Effect {
}
/** config.gevSharpen: { amount } (Cesium's `amount` uniform). */
export class SharpenEffectDesc extends withFrameUpdates(EffectDesc) {
export class SharpenEffectDesc extends withPassDisposal(
withFrameUpdates(EffectDesc),
) {
static key = SHARPEN_EFFECT_KEY;
static insertAfter = ['toneMapping'];
static insertBefore = ['smaa', 'fxaa', 'gevOverlay', 'final'];