diff --git a/packages/core/src/Camera.ts b/packages/core/src/Camera.ts index d2ecd294b9..de6f78a562 100644 --- a/packages/core/src/Camera.ts +++ b/packages/core/src/Camera.ts @@ -825,7 +825,11 @@ export class Camera extends Component { } private _checkMainCanvasAntialiasWaste(): void { - if (this.independentCanvasEnabled && Vector4.equals(this._viewport, PipelineUtils.defaultViewport)) { + if ( + this._phasedActiveInScene && + this.independentCanvasEnabled && + Vector4.equals(this._viewport, PipelineUtils.defaultViewport) + ) { Logger.warn( "Camera use independent canvas and viewport cover the whole screen, it is recommended to disable antialias, depth and stencil to save memory when create engine." ); diff --git a/packages/core/src/postProcess/PostProcessManager.ts b/packages/core/src/postProcess/PostProcessManager.ts index b973aecd36..46819d7319 100644 --- a/packages/core/src/postProcess/PostProcessManager.ts +++ b/packages/core/src/postProcess/PostProcessManager.ts @@ -12,6 +12,11 @@ import { BloomEffect, TonemappingEffect } from "./effects"; export class _PostProcessManager { static readonly UBER_SHADER_NAME = "UberPost"; + /** + * Whether the post process manager is active. + */ + isActive = true; + /** @internal */ _uberMaterial: Material; /** @internal */ @@ -23,7 +28,7 @@ export class _PostProcessManager { * Whether has active post process effect. */ get hasActiveEffect(): boolean { - return this._bloomEffect.enabled || this._tonemappingEffect.enabled; + return this.isActive && (this._bloomEffect.enabled || this._tonemappingEffect.enabled); } /**