浏览代码

Merge pull request #6414 from sebavan/master

Fix #6402
sebavan 6 年之前
父节点
当前提交
99c8148a24

+ 1 - 1
src/Materials/PBR/pbrMaterial.ts

@@ -762,7 +762,7 @@ export class PBRMaterial extends PBRBaseMaterial {
             material.brdf.parse(source.brdf);
         }
         if (source.sheen) {
-            material.sheen.parse(source.brdf);
+            material.sheen.parse(source.sheen);
         }
         if (source.subSurface) {
             material.subSurface.parse(source.subSurface);

+ 1 - 1
src/Materials/PBR/pbrMetallicRoughnessMaterial.ts

@@ -128,7 +128,7 @@ export class PBRMetallicRoughnessMaterial extends PBRBaseSimpleMaterial {
             material.brdf.parse(source.brdf);
         }
         if (source.sheen) {
-            material.sheen.parse(source.brdf);
+            material.sheen.parse(source.sheen);
         }
         if (source.subSurface) {
             material.subSurface.parse(source.subSurface);

+ 1 - 1
src/Materials/PBR/pbrSpecularGlossinessMaterial.ts

@@ -118,7 +118,7 @@ export class PBRSpecularGlossinessMaterial extends PBRBaseSimpleMaterial {
             material.brdf.parse(source.brdf);
         }
         if (source.sheen) {
-            material.sheen.parse(source.brdf);
+            material.sheen.parse(source.sheen);
         }
         if (source.subSurface) {
             material.subSurface.parse(source.subSurface);

+ 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);
     }