sebavan 6 年之前
父節點
當前提交
fd48eb616a

+ 5 - 0
src/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.ts

@@ -613,6 +613,11 @@ export class DefaultRenderingPipeline extends PostProcessRenderPipeline implemen
             this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name, this._cameras);
         }
 
+        // In multicamera mode, the scene needs to autoclear in between cameras.
+        if (this._scene.activeCameras && this._scene.activeCameras.length > 1) {
+            this._scene.autoClear = true;
+        }
+
         if (!this._enableMSAAOnFirstPostProcess(this.samples) && this.samples > 1) {
             Logger.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0");
         }

+ 3 - 0
src/PostProcesses/imageProcessingPostProcess.ts

@@ -40,6 +40,9 @@ export class ImageProcessingPostProcess extends PostProcess {
      * If sets to null, the scene one is in use.
      */
     public set imageProcessingConfiguration(value: ImageProcessingConfiguration) {
+        // We are almost sure it is applied by post process as
+        // We are in the post process :-)
+        value.applyByPostProcess = true;
         this._attachImageProcessingConfiguration(value);
     }