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

+2 -1
View File
@@ -9,6 +9,7 @@ import { Effect as NavaraEffect, EffectDesc } from '@navaramap/three';
import { BloomEffect } from 'postprocessing';
import { createBloomPort } from './bloomSettings.js';
import { pipelinePassNames } from './internals.js';
import { withPassDisposal } from './frameDescriptor.js';
export const BLOOM_EFFECT_KEY = 'gevBloom';
@@ -20,7 +21,7 @@ function apply(effect, settings) {
}
/** config.gevBloom: { settings } (bloomSettingsFromStrength). */
class BloomEffectDesc extends EffectDesc {
class BloomEffectDesc extends withPassDisposal(EffectDesc) {
static key = BLOOM_EFFECT_KEY;
// Nothing anchors after it but the styles: before them, else before the
// final copy (the styles anchor after it).