mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
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:
1 parent
b49f9dddf0
commit
cbe1d841ea
6 files changed
+67
-27
No files matched your search
@@ -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'];
|
||||
|
||||
Reference in new issue
Block a user