浏览代码

Merge remote-tracking branch 'upstream/master' into InProgress

sebastien 7 年之前
父节点
当前提交
c7d9954363
共有 42 个文件被更改,包括 27430 次插入27059 次删除
  1. 8939 8921
      Playground/babylon.d.txt
  2. 11103 11083
      dist/preview release/babylon.d.ts
  3. 51 51
      dist/preview release/babylon.js
  4. 73 18
      dist/preview release/babylon.max.js
  5. 52 52
      dist/preview release/babylon.worker.js
  6. 6720 6700
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts
  7. 54 54
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js
  8. 62 17
      dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js
  9. 62 17
      dist/preview release/customConfigurations/minimalGLTFViewer/es6.js
  10. 73 18
      dist/preview release/es6.js
  11. 3 3
      dist/preview release/gui/babylon.gui.min.js
  12. 4 4
      dist/preview release/inspector/babylon.inspector.bundle.js
  13. 3 3
      dist/preview release/inspector/babylon.inspector.min.js
  14. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  15. 2 2
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  16. 3 3
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  17. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  18. 3 3
      dist/preview release/loaders/babylonjs.loaders.min.js
  19. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  20. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  21. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  22. 3 3
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  23. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  24. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  25. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  26. 1 1
      dist/preview release/serializers/babylon.glTF2Serializer.min.js
  27. 1 1
      dist/preview release/serializers/babylonjs.serializers.min.js
  28. 63 63
      dist/preview release/viewer/babylon.viewer.js
  29. 73 18
      dist/preview release/viewer/babylon.viewer.max.js
  30. 2 2
      dist/preview release/what's new.md
  31. 1 2
      src/Engine/babylon.engine.ts
  32. 1 2
      src/Materials/Textures/babylon.renderTargetTexture.ts
  33. 9 0
      src/Mesh/babylon.instancedMesh.ts
  34. 6 0
      src/Particles/babylon.IParticleSystem.ts
  35. 13 1
      src/Particles/babylon.gpuParticleSystem.ts
  36. 15 2
      src/Particles/babylon.particleSystem.ts
  37. 2 2
      src/PostProcess/babylon.chromaticAberrationPostProcess.ts
  38. 8 1
      src/babylon.scene.ts
  39. 二进制
      tests/validation/ReferenceImages/DefaultRenderingPipeline.png
  40. 二进制
      tests/validation/ReferenceImages/defaultPipeline.png
  41. 二进制
      tests/validation/ReferenceImages/particles.png
  42. 16 3
      tests/validation/config.json

文件差异内容过多而无法显示
+ 8939 - 8921
Playground/babylon.d.txt


文件差异内容过多而无法显示
+ 11103 - 11083
dist/preview release/babylon.d.ts


文件差异内容过多而无法显示
+ 51 - 51
dist/preview release/babylon.js


+ 73 - 18
dist/preview release/babylon.max.js

@@ -10593,7 +10593,6 @@ var BABYLON;
                                         break;
                                 }
                             }
-                            break;
                         }
                     }
                 }
@@ -10761,7 +10760,7 @@ var BABYLON;
             this._badOS = /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent);
             // Detect if we are running on a faulty buggy desktop OS.
             this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-            BABYLON.Tools.Log("Babylon.js engine (v" + Engine.Version + ") launched");
+            console.log("Babylon.js engine (v" + Engine.Version + ") launched");
             this.enableOfflineSupport = (BABYLON.Database !== undefined);
         }
         Object.defineProperty(Engine, "LastCreatedEngine", {
@@ -20123,10 +20122,23 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         * Internal, gets the first post proces.
+         * @returns the first post process to be run on this camera.
+         */
+        Camera.prototype._getFirstPostProcess = function () {
+            for (var pp in this._postProcesses) {
+                if (this._postProcesses[pp] !== null) {
+                    return this._postProcesses[pp];
+                }
+            }
+            return null;
+        };
         Camera.prototype._cascadePostProcessesToRigCams = function () {
             // invalidate framebuffer
-            if (this._postProcesses.length > 0) {
-                this._postProcesses[0].markTextureDirty();
+            var firstPostProcess = this._getFirstPostProcess();
+            if (firstPostProcess) {
+                firstPostProcess.markTextureDirty();
             }
             // glue the rigPostProcess to the end of the user postprocesses & assign to each sub-camera
             for (var i = 0, len = this._rigCameras.length; i < len; i++) {
@@ -20156,6 +20168,9 @@ var BABYLON;
             if (insertAt == null || insertAt < 0) {
                 this._postProcesses.push(postProcess);
             }
+            else if (this._postProcesses[insertAt] === null) {
+                this._postProcesses[insertAt] = postProcess;
+            }
             else {
                 this._postProcesses.splice(insertAt, 0, postProcess);
             }
@@ -20165,7 +20180,7 @@ var BABYLON;
         Camera.prototype.detachPostProcess = function (postProcess) {
             var idx = this._postProcesses.indexOf(postProcess);
             if (idx !== -1) {
-                this._postProcesses.splice(idx, 1);
+                this._postProcesses[idx] = null;
             }
             this._cascadePostProcessesToRigCams(); // also ensures framebuffer invalidated
         };
@@ -20340,7 +20355,10 @@ var BABYLON;
             else {
                 var i = this._postProcesses.length;
                 while (--i >= 0) {
-                    this._postProcesses[i].dispose(this);
+                    var postProcess = this._postProcesses[i];
+                    if (postProcess) {
+                        postProcess.dispose(this);
+                    }
                 }
             }
             // Render targets
@@ -22960,6 +22978,13 @@ var BABYLON;
                     }
                 }
             }
+            // Particles
+            for (var _d = 0, _e = this.particleSystems; _d < _e.length; _d++) {
+                var particleSystem = _e[_d];
+                if (!particleSystem.isReady()) {
+                    return false;
+                }
+            }
             return true;
         };
         Scene.prototype.resetCachedMaterial = function () {
@@ -24052,7 +24077,7 @@ var BABYLON;
             if (this.textures) {
                 for (var i = 0; i < this.textures.length; i++) {
                     var texture = this.textures[i];
-                    if (texture && texture.isRenderTarget) {
+                    if (texture && texture.renderList) {
                         texture.freeRenderingGroups();
                     }
                 }
@@ -36770,7 +36795,7 @@ var BABYLON;
             if (!camera) {
                 return false;
             }
-            var postProcesses = postProcesses || camera._postProcesses;
+            var postProcesses = postProcesses || camera._postProcesses.filter(function (pp) { return pp != null; });
             if (!postProcesses || postProcesses.length === 0 || !this._scene.postProcessesEnabled) {
                 return false;
             }
@@ -36829,7 +36854,7 @@ var BABYLON;
             if (!camera) {
                 return;
             }
-            postProcesses = postProcesses || camera._postProcesses;
+            postProcesses = postProcesses || camera._postProcesses.filter(function (pp) { return pp != null; });
             if (postProcesses.length === 0 || !this._scene.postProcessesEnabled) {
                 return;
             }
@@ -51746,13 +51771,24 @@ var BABYLON;
             }
         };
         /**
+         * Is this system ready to be used/rendered
+         * @return true if the system is ready
+         */
+        ParticleSystem.prototype.isReady = function () {
+            var effect = this._getEffect();
+            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady()) {
+                return false;
+            }
+            return true;
+        };
+        /**
          * Renders the particle system in its current state.
          * @returns the current number of particles
          */
         ParticleSystem.prototype.render = function () {
             var effect = this._getEffect();
             // Check
-            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady() || !this._particles.length) {
+            if (!this.isReady() || !this._particles.length) {
                 return 0;
             }
             var engine = this._scene.getEngine();
@@ -51763,7 +51799,7 @@ var BABYLON;
             effect.setTexture("diffuseSampler", this.particleTexture);
             effect.setMatrix("view", viewMatrix);
             effect.setMatrix("projection", this._scene.getProjectionMatrix());
-            if (this._isAnimationSheetEnabled) {
+            if (this._isAnimationSheetEnabled && this.particleTexture) {
                 var baseSize = this.particleTexture.getBaseSize();
                 effect.setFloat3("particlesInfos", this.spriteCellWidth / baseSize.width, this.spriteCellHeight / baseSize.height, baseSize.width / this.spriteCellWidth);
             }
@@ -52816,6 +52852,16 @@ var BABYLON;
             configurable: true
         });
         /**
+         * Is this system ready to be used/rendered
+         * @return true if the system is ready
+         */
+        GPUParticleSystem.prototype.isReady = function () {
+            if (!this.emitter || !this._updateEffect.isReady() || !this._renderEffect.isReady() || !this.particleTexture || !this.particleTexture.isReady()) {
+                return false;
+            }
+            return true;
+        };
+        /**
          * Gets Wether the system has been started.
          * @returns True if it has been started, otherwise false.
          */
@@ -52968,7 +53014,7 @@ var BABYLON;
             }
             this._recreateUpdateEffect();
             this._recreateRenderEffect();
-            if (!this.emitter || !this._updateEffect.isReady() || !this._renderEffect.isReady()) {
+            if (!this.isReady()) {
                 return 0;
             }
             if (this._currentRenderId === this._scene.getRenderId()) {
@@ -55542,6 +55588,13 @@ var BABYLON;
             get: function () {
                 return this._sourceMesh.renderingGroupId;
             },
+            set: function (value) {
+                if (!this._sourceMesh || value === this._sourceMesh.renderingGroupId) {
+                    return;
+                }
+                //no-op with warning
+                BABYLON.Tools.Warn("Note - setting renderingGroupId of an instanced mesh has no effect on the scene");
+            },
             enumerable: true,
             configurable: true
         });
@@ -58888,8 +58941,7 @@ var BABYLON;
             for (var meshIndex = 0; meshIndex < currentRenderListLength; meshIndex++) {
                 var mesh = currentRenderList[meshIndex];
                 if (mesh) {
-                    if (!mesh.isReady()) {
-                        // Reset _currentRefreshId
+                    if (!mesh.isReady(this.refreshRate === 0)) {
                         this.resetRefreshCounter();
                         continue;
                     }
@@ -60437,7 +60489,10 @@ var BABYLON;
             camera.detachPostProcess(this);
             var index = camera._postProcesses.indexOf(this);
             if (index === 0 && camera._postProcesses.length > 0) {
-                this._camera._postProcesses[0].markTextureDirty();
+                var firstPostProcess = this._camera._getFirstPostProcess();
+                if (firstPostProcess) {
+                    firstPostProcess.markTextureDirty();
+                }
             }
             this.onActivateObservable.clear();
             this.onAfterRenderObservable.clear();
@@ -67143,7 +67198,7 @@ var BABYLON;
                 var camera = cams[i];
                 var cameraName = camera.name;
                 for (var j = 0; j < this._indicesForCamera[cameraName].length; j++) {
-                    if (camera._postProcesses[this._indicesForCamera[cameraName][j]] === undefined) {
+                    if (camera._postProcesses[this._indicesForCamera[cameraName][j]] === undefined || camera._postProcesses[this._indicesForCamera[cameraName][j]] === null) {
                         this._postProcesses[this._singleInstance ? 0 : cameraName].forEach(function (postProcess) {
                             cams[i].attachPostProcess(postProcess, _this._indicesForCamera[cameraName][j]);
                         });
@@ -69097,9 +69152,9 @@ var BABYLON;
             if (blockCompilation === void 0) { blockCompilation = false; }
             var _this = _super.call(this, name, "chromaticAberration", ["chromatic_aberration", "screen_width", "screen_height", "direction", "radialIntensity", "centerPosition"], [], options, camera, samplingMode, engine, reusable, null, textureType, undefined, null, blockCompilation) || this;
             /**
-             * The amount of seperation of rgb channels (default: 0)
+             * The amount of seperation of rgb channels (default: 30)
              */
-            _this.aberrationAmount = 0;
+            _this.aberrationAmount = 30;
             /**
              * The amount the effect will increase for pixels closer to the edge of the screen. (default: 0)
              */

文件差异内容过多而无法显示
+ 52 - 52
dist/preview release/babylon.worker.js


文件差异内容过多而无法显示
+ 6720 - 6700
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


文件差异内容过多而无法显示
+ 54 - 54
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 62 - 17
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -10593,7 +10593,6 @@ var BABYLON;
                                         break;
                                 }
                             }
-                            break;
                         }
                     }
                 }
@@ -10761,7 +10760,7 @@ var BABYLON;
             this._badOS = /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent);
             // Detect if we are running on a faulty buggy desktop OS.
             this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-            BABYLON.Tools.Log("Babylon.js engine (v" + Engine.Version + ") launched");
+            console.log("Babylon.js engine (v" + Engine.Version + ") launched");
             this.enableOfflineSupport = (BABYLON.Database !== undefined);
         }
         Object.defineProperty(Engine, "LastCreatedEngine", {
@@ -20123,10 +20122,23 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         * Internal, gets the first post proces.
+         * @returns the first post process to be run on this camera.
+         */
+        Camera.prototype._getFirstPostProcess = function () {
+            for (var pp in this._postProcesses) {
+                if (this._postProcesses[pp] !== null) {
+                    return this._postProcesses[pp];
+                }
+            }
+            return null;
+        };
         Camera.prototype._cascadePostProcessesToRigCams = function () {
             // invalidate framebuffer
-            if (this._postProcesses.length > 0) {
-                this._postProcesses[0].markTextureDirty();
+            var firstPostProcess = this._getFirstPostProcess();
+            if (firstPostProcess) {
+                firstPostProcess.markTextureDirty();
             }
             // glue the rigPostProcess to the end of the user postprocesses & assign to each sub-camera
             for (var i = 0, len = this._rigCameras.length; i < len; i++) {
@@ -20156,6 +20168,9 @@ var BABYLON;
             if (insertAt == null || insertAt < 0) {
                 this._postProcesses.push(postProcess);
             }
+            else if (this._postProcesses[insertAt] === null) {
+                this._postProcesses[insertAt] = postProcess;
+            }
             else {
                 this._postProcesses.splice(insertAt, 0, postProcess);
             }
@@ -20165,7 +20180,7 @@ var BABYLON;
         Camera.prototype.detachPostProcess = function (postProcess) {
             var idx = this._postProcesses.indexOf(postProcess);
             if (idx !== -1) {
-                this._postProcesses.splice(idx, 1);
+                this._postProcesses[idx] = null;
             }
             this._cascadePostProcessesToRigCams(); // also ensures framebuffer invalidated
         };
@@ -20340,7 +20355,10 @@ var BABYLON;
             else {
                 var i = this._postProcesses.length;
                 while (--i >= 0) {
-                    this._postProcesses[i].dispose(this);
+                    var postProcess = this._postProcesses[i];
+                    if (postProcess) {
+                        postProcess.dispose(this);
+                    }
                 }
             }
             // Render targets
@@ -22960,6 +22978,13 @@ var BABYLON;
                     }
                 }
             }
+            // Particles
+            for (var _d = 0, _e = this.particleSystems; _d < _e.length; _d++) {
+                var particleSystem = _e[_d];
+                if (!particleSystem.isReady()) {
+                    return false;
+                }
+            }
             return true;
         };
         Scene.prototype.resetCachedMaterial = function () {
@@ -24052,7 +24077,7 @@ var BABYLON;
             if (this.textures) {
                 for (var i = 0; i < this.textures.length; i++) {
                     var texture = this.textures[i];
-                    if (texture && texture.isRenderTarget) {
+                    if (texture && texture.renderList) {
                         texture.freeRenderingGroups();
                     }
                 }
@@ -36770,7 +36795,7 @@ var BABYLON;
             if (!camera) {
                 return false;
             }
-            var postProcesses = postProcesses || camera._postProcesses;
+            var postProcesses = postProcesses || camera._postProcesses.filter(function (pp) { return pp != null; });
             if (!postProcesses || postProcesses.length === 0 || !this._scene.postProcessesEnabled) {
                 return false;
             }
@@ -36829,7 +36854,7 @@ var BABYLON;
             if (!camera) {
                 return;
             }
-            postProcesses = postProcesses || camera._postProcesses;
+            postProcesses = postProcesses || camera._postProcesses.filter(function (pp) { return pp != null; });
             if (postProcesses.length === 0 || !this._scene.postProcessesEnabled) {
                 return;
             }
@@ -51746,13 +51771,24 @@ var BABYLON;
             }
         };
         /**
+         * Is this system ready to be used/rendered
+         * @return true if the system is ready
+         */
+        ParticleSystem.prototype.isReady = function () {
+            var effect = this._getEffect();
+            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady()) {
+                return false;
+            }
+            return true;
+        };
+        /**
          * Renders the particle system in its current state.
          * @returns the current number of particles
          */
         ParticleSystem.prototype.render = function () {
             var effect = this._getEffect();
             // Check
-            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady() || !this._particles.length) {
+            if (!this.isReady() || !this._particles.length) {
                 return 0;
             }
             var engine = this._scene.getEngine();
@@ -51763,7 +51799,7 @@ var BABYLON;
             effect.setTexture("diffuseSampler", this.particleTexture);
             effect.setMatrix("view", viewMatrix);
             effect.setMatrix("projection", this._scene.getProjectionMatrix());
-            if (this._isAnimationSheetEnabled) {
+            if (this._isAnimationSheetEnabled && this.particleTexture) {
                 var baseSize = this.particleTexture.getBaseSize();
                 effect.setFloat3("particlesInfos", this.spriteCellWidth / baseSize.width, this.spriteCellHeight / baseSize.height, baseSize.width / this.spriteCellWidth);
             }
@@ -54844,6 +54880,13 @@ var BABYLON;
             get: function () {
                 return this._sourceMesh.renderingGroupId;
             },
+            set: function (value) {
+                if (!this._sourceMesh || value === this._sourceMesh.renderingGroupId) {
+                    return;
+                }
+                //no-op with warning
+                BABYLON.Tools.Warn("Note - setting renderingGroupId of an instanced mesh has no effect on the scene");
+            },
             enumerable: true,
             configurable: true
         });
@@ -58190,8 +58233,7 @@ var BABYLON;
             for (var meshIndex = 0; meshIndex < currentRenderListLength; meshIndex++) {
                 var mesh = currentRenderList[meshIndex];
                 if (mesh) {
-                    if (!mesh.isReady()) {
-                        // Reset _currentRefreshId
+                    if (!mesh.isReady(this.refreshRate === 0)) {
                         this.resetRefreshCounter();
                         continue;
                     }
@@ -59739,7 +59781,10 @@ var BABYLON;
             camera.detachPostProcess(this);
             var index = camera._postProcesses.indexOf(this);
             if (index === 0 && camera._postProcesses.length > 0) {
-                this._camera._postProcesses[0].markTextureDirty();
+                var firstPostProcess = this._camera._getFirstPostProcess();
+                if (firstPostProcess) {
+                    firstPostProcess.markTextureDirty();
+                }
             }
             this.onActivateObservable.clear();
             this.onAfterRenderObservable.clear();
@@ -66445,7 +66490,7 @@ var BABYLON;
                 var camera = cams[i];
                 var cameraName = camera.name;
                 for (var j = 0; j < this._indicesForCamera[cameraName].length; j++) {
-                    if (camera._postProcesses[this._indicesForCamera[cameraName][j]] === undefined) {
+                    if (camera._postProcesses[this._indicesForCamera[cameraName][j]] === undefined || camera._postProcesses[this._indicesForCamera[cameraName][j]] === null) {
                         this._postProcesses[this._singleInstance ? 0 : cameraName].forEach(function (postProcess) {
                             cams[i].attachPostProcess(postProcess, _this._indicesForCamera[cameraName][j]);
                         });
@@ -68399,9 +68444,9 @@ var BABYLON;
             if (blockCompilation === void 0) { blockCompilation = false; }
             var _this = _super.call(this, name, "chromaticAberration", ["chromatic_aberration", "screen_width", "screen_height", "direction", "radialIntensity", "centerPosition"], [], options, camera, samplingMode, engine, reusable, null, textureType, undefined, null, blockCompilation) || this;
             /**
-             * The amount of seperation of rgb channels (default: 0)
+             * The amount of seperation of rgb channels (default: 30)
              */
-            _this.aberrationAmount = 0;
+            _this.aberrationAmount = 30;
             /**
              * The amount the effect will increase for pixels closer to the edge of the screen. (default: 0)
              */

+ 62 - 17
dist/preview release/customConfigurations/minimalGLTFViewer/es6.js

@@ -10566,7 +10566,6 @@ var BABYLON;
                                         break;
                                 }
                             }
-                            break;
                         }
                     }
                 }
@@ -10734,7 +10733,7 @@ var BABYLON;
             this._badOS = /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent);
             // Detect if we are running on a faulty buggy desktop OS.
             this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-            BABYLON.Tools.Log("Babylon.js engine (v" + Engine.Version + ") launched");
+            console.log("Babylon.js engine (v" + Engine.Version + ") launched");
             this.enableOfflineSupport = (BABYLON.Database !== undefined);
         }
         Object.defineProperty(Engine, "LastCreatedEngine", {
@@ -20096,10 +20095,23 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         * Internal, gets the first post proces.
+         * @returns the first post process to be run on this camera.
+         */
+        Camera.prototype._getFirstPostProcess = function () {
+            for (var pp in this._postProcesses) {
+                if (this._postProcesses[pp] !== null) {
+                    return this._postProcesses[pp];
+                }
+            }
+            return null;
+        };
         Camera.prototype._cascadePostProcessesToRigCams = function () {
             // invalidate framebuffer
-            if (this._postProcesses.length > 0) {
-                this._postProcesses[0].markTextureDirty();
+            var firstPostProcess = this._getFirstPostProcess();
+            if (firstPostProcess) {
+                firstPostProcess.markTextureDirty();
             }
             // glue the rigPostProcess to the end of the user postprocesses & assign to each sub-camera
             for (var i = 0, len = this._rigCameras.length; i < len; i++) {
@@ -20129,6 +20141,9 @@ var BABYLON;
             if (insertAt == null || insertAt < 0) {
                 this._postProcesses.push(postProcess);
             }
+            else if (this._postProcesses[insertAt] === null) {
+                this._postProcesses[insertAt] = postProcess;
+            }
             else {
                 this._postProcesses.splice(insertAt, 0, postProcess);
             }
@@ -20138,7 +20153,7 @@ var BABYLON;
         Camera.prototype.detachPostProcess = function (postProcess) {
             var idx = this._postProcesses.indexOf(postProcess);
             if (idx !== -1) {
-                this._postProcesses.splice(idx, 1);
+                this._postProcesses[idx] = null;
             }
             this._cascadePostProcessesToRigCams(); // also ensures framebuffer invalidated
         };
@@ -20313,7 +20328,10 @@ var BABYLON;
             else {
                 var i = this._postProcesses.length;
                 while (--i >= 0) {
-                    this._postProcesses[i].dispose(this);
+                    var postProcess = this._postProcesses[i];
+                    if (postProcess) {
+                        postProcess.dispose(this);
+                    }
                 }
             }
             // Render targets
@@ -22933,6 +22951,13 @@ var BABYLON;
                     }
                 }
             }
+            // Particles
+            for (var _d = 0, _e = this.particleSystems; _d < _e.length; _d++) {
+                var particleSystem = _e[_d];
+                if (!particleSystem.isReady()) {
+                    return false;
+                }
+            }
             return true;
         };
         Scene.prototype.resetCachedMaterial = function () {
@@ -24025,7 +24050,7 @@ var BABYLON;
             if (this.textures) {
                 for (var i = 0; i < this.textures.length; i++) {
                     var texture = this.textures[i];
-                    if (texture && texture.isRenderTarget) {
+                    if (texture && texture.renderList) {
                         texture.freeRenderingGroups();
                     }
                 }
@@ -36743,7 +36768,7 @@ var BABYLON;
             if (!camera) {
                 return false;
             }
-            var postProcesses = postProcesses || camera._postProcesses;
+            var postProcesses = postProcesses || camera._postProcesses.filter(function (pp) { return pp != null; });
             if (!postProcesses || postProcesses.length === 0 || !this._scene.postProcessesEnabled) {
                 return false;
             }
@@ -36802,7 +36827,7 @@ var BABYLON;
             if (!camera) {
                 return;
             }
-            postProcesses = postProcesses || camera._postProcesses;
+            postProcesses = postProcesses || camera._postProcesses.filter(function (pp) { return pp != null; });
             if (postProcesses.length === 0 || !this._scene.postProcessesEnabled) {
                 return;
             }
@@ -51719,13 +51744,24 @@ var BABYLON;
             }
         };
         /**
+         * Is this system ready to be used/rendered
+         * @return true if the system is ready
+         */
+        ParticleSystem.prototype.isReady = function () {
+            var effect = this._getEffect();
+            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady()) {
+                return false;
+            }
+            return true;
+        };
+        /**
          * Renders the particle system in its current state.
          * @returns the current number of particles
          */
         ParticleSystem.prototype.render = function () {
             var effect = this._getEffect();
             // Check
-            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady() || !this._particles.length) {
+            if (!this.isReady() || !this._particles.length) {
                 return 0;
             }
             var engine = this._scene.getEngine();
@@ -51736,7 +51772,7 @@ var BABYLON;
             effect.setTexture("diffuseSampler", this.particleTexture);
             effect.setMatrix("view", viewMatrix);
             effect.setMatrix("projection", this._scene.getProjectionMatrix());
-            if (this._isAnimationSheetEnabled) {
+            if (this._isAnimationSheetEnabled && this.particleTexture) {
                 var baseSize = this.particleTexture.getBaseSize();
                 effect.setFloat3("particlesInfos", this.spriteCellWidth / baseSize.width, this.spriteCellHeight / baseSize.height, baseSize.width / this.spriteCellWidth);
             }
@@ -54817,6 +54853,13 @@ var BABYLON;
             get: function () {
                 return this._sourceMesh.renderingGroupId;
             },
+            set: function (value) {
+                if (!this._sourceMesh || value === this._sourceMesh.renderingGroupId) {
+                    return;
+                }
+                //no-op with warning
+                BABYLON.Tools.Warn("Note - setting renderingGroupId of an instanced mesh has no effect on the scene");
+            },
             enumerable: true,
             configurable: true
         });
@@ -58163,8 +58206,7 @@ var BABYLON;
             for (var meshIndex = 0; meshIndex < currentRenderListLength; meshIndex++) {
                 var mesh = currentRenderList[meshIndex];
                 if (mesh) {
-                    if (!mesh.isReady()) {
-                        // Reset _currentRefreshId
+                    if (!mesh.isReady(this.refreshRate === 0)) {
                         this.resetRefreshCounter();
                         continue;
                     }
@@ -59712,7 +59754,10 @@ var BABYLON;
             camera.detachPostProcess(this);
             var index = camera._postProcesses.indexOf(this);
             if (index === 0 && camera._postProcesses.length > 0) {
-                this._camera._postProcesses[0].markTextureDirty();
+                var firstPostProcess = this._camera._getFirstPostProcess();
+                if (firstPostProcess) {
+                    firstPostProcess.markTextureDirty();
+                }
             }
             this.onActivateObservable.clear();
             this.onAfterRenderObservable.clear();
@@ -66418,7 +66463,7 @@ var BABYLON;
                 var camera = cams[i];
                 var cameraName = camera.name;
                 for (var j = 0; j < this._indicesForCamera[cameraName].length; j++) {
-                    if (camera._postProcesses[this._indicesForCamera[cameraName][j]] === undefined) {
+                    if (camera._postProcesses[this._indicesForCamera[cameraName][j]] === undefined || camera._postProcesses[this._indicesForCamera[cameraName][j]] === null) {
                         this._postProcesses[this._singleInstance ? 0 : cameraName].forEach(function (postProcess) {
                             cams[i].attachPostProcess(postProcess, _this._indicesForCamera[cameraName][j]);
                         });
@@ -68372,9 +68417,9 @@ var BABYLON;
             if (blockCompilation === void 0) { blockCompilation = false; }
             var _this = _super.call(this, name, "chromaticAberration", ["chromatic_aberration", "screen_width", "screen_height", "direction", "radialIntensity", "centerPosition"], [], options, camera, samplingMode, engine, reusable, null, textureType, undefined, null, blockCompilation) || this;
             /**
-             * The amount of seperation of rgb channels (default: 0)
+             * The amount of seperation of rgb channels (default: 30)
              */
-            _this.aberrationAmount = 0;
+            _this.aberrationAmount = 30;
             /**
              * The amount the effect will increase for pixels closer to the edge of the screen. (default: 0)
              */

+ 73 - 18
dist/preview release/es6.js

@@ -10566,7 +10566,6 @@ var BABYLON;
                                         break;
                                 }
                             }
-                            break;
                         }
                     }
                 }
@@ -10734,7 +10733,7 @@ var BABYLON;
             this._badOS = /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent);
             // Detect if we are running on a faulty buggy desktop OS.
             this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-            BABYLON.Tools.Log("Babylon.js engine (v" + Engine.Version + ") launched");
+            console.log("Babylon.js engine (v" + Engine.Version + ") launched");
             this.enableOfflineSupport = (BABYLON.Database !== undefined);
         }
         Object.defineProperty(Engine, "LastCreatedEngine", {
@@ -20096,10 +20095,23 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         * Internal, gets the first post proces.
+         * @returns the first post process to be run on this camera.
+         */
+        Camera.prototype._getFirstPostProcess = function () {
+            for (var pp in this._postProcesses) {
+                if (this._postProcesses[pp] !== null) {
+                    return this._postProcesses[pp];
+                }
+            }
+            return null;
+        };
         Camera.prototype._cascadePostProcessesToRigCams = function () {
             // invalidate framebuffer
-            if (this._postProcesses.length > 0) {
-                this._postProcesses[0].markTextureDirty();
+            var firstPostProcess = this._getFirstPostProcess();
+            if (firstPostProcess) {
+                firstPostProcess.markTextureDirty();
             }
             // glue the rigPostProcess to the end of the user postprocesses & assign to each sub-camera
             for (var i = 0, len = this._rigCameras.length; i < len; i++) {
@@ -20129,6 +20141,9 @@ var BABYLON;
             if (insertAt == null || insertAt < 0) {
                 this._postProcesses.push(postProcess);
             }
+            else if (this._postProcesses[insertAt] === null) {
+                this._postProcesses[insertAt] = postProcess;
+            }
             else {
                 this._postProcesses.splice(insertAt, 0, postProcess);
             }
@@ -20138,7 +20153,7 @@ var BABYLON;
         Camera.prototype.detachPostProcess = function (postProcess) {
             var idx = this._postProcesses.indexOf(postProcess);
             if (idx !== -1) {
-                this._postProcesses.splice(idx, 1);
+                this._postProcesses[idx] = null;
             }
             this._cascadePostProcessesToRigCams(); // also ensures framebuffer invalidated
         };
@@ -20313,7 +20328,10 @@ var BABYLON;
             else {
                 var i = this._postProcesses.length;
                 while (--i >= 0) {
-                    this._postProcesses[i].dispose(this);
+                    var postProcess = this._postProcesses[i];
+                    if (postProcess) {
+                        postProcess.dispose(this);
+                    }
                 }
             }
             // Render targets
@@ -22933,6 +22951,13 @@ var BABYLON;
                     }
                 }
             }
+            // Particles
+            for (var _d = 0, _e = this.particleSystems; _d < _e.length; _d++) {
+                var particleSystem = _e[_d];
+                if (!particleSystem.isReady()) {
+                    return false;
+                }
+            }
             return true;
         };
         Scene.prototype.resetCachedMaterial = function () {
@@ -24025,7 +24050,7 @@ var BABYLON;
             if (this.textures) {
                 for (var i = 0; i < this.textures.length; i++) {
                     var texture = this.textures[i];
-                    if (texture && texture.isRenderTarget) {
+                    if (texture && texture.renderList) {
                         texture.freeRenderingGroups();
                     }
                 }
@@ -36743,7 +36768,7 @@ var BABYLON;
             if (!camera) {
                 return false;
             }
-            var postProcesses = postProcesses || camera._postProcesses;
+            var postProcesses = postProcesses || camera._postProcesses.filter(function (pp) { return pp != null; });
             if (!postProcesses || postProcesses.length === 0 || !this._scene.postProcessesEnabled) {
                 return false;
             }
@@ -36802,7 +36827,7 @@ var BABYLON;
             if (!camera) {
                 return;
             }
-            postProcesses = postProcesses || camera._postProcesses;
+            postProcesses = postProcesses || camera._postProcesses.filter(function (pp) { return pp != null; });
             if (postProcesses.length === 0 || !this._scene.postProcessesEnabled) {
                 return;
             }
@@ -51719,13 +51744,24 @@ var BABYLON;
             }
         };
         /**
+         * Is this system ready to be used/rendered
+         * @return true if the system is ready
+         */
+        ParticleSystem.prototype.isReady = function () {
+            var effect = this._getEffect();
+            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady()) {
+                return false;
+            }
+            return true;
+        };
+        /**
          * Renders the particle system in its current state.
          * @returns the current number of particles
          */
         ParticleSystem.prototype.render = function () {
             var effect = this._getEffect();
             // Check
-            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady() || !this._particles.length) {
+            if (!this.isReady() || !this._particles.length) {
                 return 0;
             }
             var engine = this._scene.getEngine();
@@ -51736,7 +51772,7 @@ var BABYLON;
             effect.setTexture("diffuseSampler", this.particleTexture);
             effect.setMatrix("view", viewMatrix);
             effect.setMatrix("projection", this._scene.getProjectionMatrix());
-            if (this._isAnimationSheetEnabled) {
+            if (this._isAnimationSheetEnabled && this.particleTexture) {
                 var baseSize = this.particleTexture.getBaseSize();
                 effect.setFloat3("particlesInfos", this.spriteCellWidth / baseSize.width, this.spriteCellHeight / baseSize.height, baseSize.width / this.spriteCellWidth);
             }
@@ -52789,6 +52825,16 @@ var BABYLON;
             configurable: true
         });
         /**
+         * Is this system ready to be used/rendered
+         * @return true if the system is ready
+         */
+        GPUParticleSystem.prototype.isReady = function () {
+            if (!this.emitter || !this._updateEffect.isReady() || !this._renderEffect.isReady() || !this.particleTexture || !this.particleTexture.isReady()) {
+                return false;
+            }
+            return true;
+        };
+        /**
          * Gets Wether the system has been started.
          * @returns True if it has been started, otherwise false.
          */
@@ -52941,7 +52987,7 @@ var BABYLON;
             }
             this._recreateUpdateEffect();
             this._recreateRenderEffect();
-            if (!this.emitter || !this._updateEffect.isReady() || !this._renderEffect.isReady()) {
+            if (!this.isReady()) {
                 return 0;
             }
             if (this._currentRenderId === this._scene.getRenderId()) {
@@ -55515,6 +55561,13 @@ var BABYLON;
             get: function () {
                 return this._sourceMesh.renderingGroupId;
             },
+            set: function (value) {
+                if (!this._sourceMesh || value === this._sourceMesh.renderingGroupId) {
+                    return;
+                }
+                //no-op with warning
+                BABYLON.Tools.Warn("Note - setting renderingGroupId of an instanced mesh has no effect on the scene");
+            },
             enumerable: true,
             configurable: true
         });
@@ -58861,8 +58914,7 @@ var BABYLON;
             for (var meshIndex = 0; meshIndex < currentRenderListLength; meshIndex++) {
                 var mesh = currentRenderList[meshIndex];
                 if (mesh) {
-                    if (!mesh.isReady()) {
-                        // Reset _currentRefreshId
+                    if (!mesh.isReady(this.refreshRate === 0)) {
                         this.resetRefreshCounter();
                         continue;
                     }
@@ -60410,7 +60462,10 @@ var BABYLON;
             camera.detachPostProcess(this);
             var index = camera._postProcesses.indexOf(this);
             if (index === 0 && camera._postProcesses.length > 0) {
-                this._camera._postProcesses[0].markTextureDirty();
+                var firstPostProcess = this._camera._getFirstPostProcess();
+                if (firstPostProcess) {
+                    firstPostProcess.markTextureDirty();
+                }
             }
             this.onActivateObservable.clear();
             this.onAfterRenderObservable.clear();
@@ -67116,7 +67171,7 @@ var BABYLON;
                 var camera = cams[i];
                 var cameraName = camera.name;
                 for (var j = 0; j < this._indicesForCamera[cameraName].length; j++) {
-                    if (camera._postProcesses[this._indicesForCamera[cameraName][j]] === undefined) {
+                    if (camera._postProcesses[this._indicesForCamera[cameraName][j]] === undefined || camera._postProcesses[this._indicesForCamera[cameraName][j]] === null) {
                         this._postProcesses[this._singleInstance ? 0 : cameraName].forEach(function (postProcess) {
                             cams[i].attachPostProcess(postProcess, _this._indicesForCamera[cameraName][j]);
                         });
@@ -69070,9 +69125,9 @@ var BABYLON;
             if (blockCompilation === void 0) { blockCompilation = false; }
             var _this = _super.call(this, name, "chromaticAberration", ["chromatic_aberration", "screen_width", "screen_height", "direction", "radialIntensity", "centerPosition"], [], options, camera, samplingMode, engine, reusable, null, textureType, undefined, null, blockCompilation) || this;
             /**
-             * The amount of seperation of rgb channels (default: 0)
+             * The amount of seperation of rgb channels (default: 30)
              */
-            _this.aberrationAmount = 0;
+            _this.aberrationAmount = 30;
             /**
              * The amount the effect will increase for pixels closer to the edge of the screen. (default: 0)
              */

文件差异内容过多而无法显示
+ 3 - 3
dist/preview release/gui/babylon.gui.min.js


文件差异内容过多而无法显示
+ 4 - 4
dist/preview release/inspector/babylon.inspector.bundle.js


文件差异内容过多而无法显示
+ 3 - 3
dist/preview release/inspector/babylon.inspector.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


文件差异内容过多而无法显示
+ 3 - 3
dist/preview release/loaders/babylon.glTFFileLoader.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


文件差异内容过多而无法显示
+ 3 - 3
dist/preview release/loaders/babylonjs.loaders.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


文件差异内容过多而无法显示
+ 3 - 3
dist/preview release/materialsLibrary/babylonjs.materials.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/serializers/babylon.glTF2Serializer.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/serializers/babylonjs.serializers.min.js


文件差异内容过多而无法显示
+ 63 - 63
dist/preview release/viewer/babylon.viewer.js


+ 73 - 18
dist/preview release/viewer/babylon.viewer.max.js

@@ -10676,7 +10676,6 @@ var BABYLON;
                                         break;
                                 }
                             }
-                            break;
                         }
                     }
                 }
@@ -10844,7 +10843,7 @@ var BABYLON;
             this._badOS = /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent);
             // Detect if we are running on a faulty buggy desktop OS.
             this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-            BABYLON.Tools.Log("Babylon.js engine (v" + Engine.Version + ") launched");
+            console.log("Babylon.js engine (v" + Engine.Version + ") launched");
             this.enableOfflineSupport = (BABYLON.Database !== undefined);
         }
         Object.defineProperty(Engine, "LastCreatedEngine", {
@@ -20206,10 +20205,23 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        /**
+         * Internal, gets the first post proces.
+         * @returns the first post process to be run on this camera.
+         */
+        Camera.prototype._getFirstPostProcess = function () {
+            for (var pp in this._postProcesses) {
+                if (this._postProcesses[pp] !== null) {
+                    return this._postProcesses[pp];
+                }
+            }
+            return null;
+        };
         Camera.prototype._cascadePostProcessesToRigCams = function () {
             // invalidate framebuffer
-            if (this._postProcesses.length > 0) {
-                this._postProcesses[0].markTextureDirty();
+            var firstPostProcess = this._getFirstPostProcess();
+            if (firstPostProcess) {
+                firstPostProcess.markTextureDirty();
             }
             // glue the rigPostProcess to the end of the user postprocesses & assign to each sub-camera
             for (var i = 0, len = this._rigCameras.length; i < len; i++) {
@@ -20239,6 +20251,9 @@ var BABYLON;
             if (insertAt == null || insertAt < 0) {
                 this._postProcesses.push(postProcess);
             }
+            else if (this._postProcesses[insertAt] === null) {
+                this._postProcesses[insertAt] = postProcess;
+            }
             else {
                 this._postProcesses.splice(insertAt, 0, postProcess);
             }
@@ -20248,7 +20263,7 @@ var BABYLON;
         Camera.prototype.detachPostProcess = function (postProcess) {
             var idx = this._postProcesses.indexOf(postProcess);
             if (idx !== -1) {
-                this._postProcesses.splice(idx, 1);
+                this._postProcesses[idx] = null;
             }
             this._cascadePostProcessesToRigCams(); // also ensures framebuffer invalidated
         };
@@ -20423,7 +20438,10 @@ var BABYLON;
             else {
                 var i = this._postProcesses.length;
                 while (--i >= 0) {
-                    this._postProcesses[i].dispose(this);
+                    var postProcess = this._postProcesses[i];
+                    if (postProcess) {
+                        postProcess.dispose(this);
+                    }
                 }
             }
             // Render targets
@@ -23043,6 +23061,13 @@ var BABYLON;
                     }
                 }
             }
+            // Particles
+            for (var _d = 0, _e = this.particleSystems; _d < _e.length; _d++) {
+                var particleSystem = _e[_d];
+                if (!particleSystem.isReady()) {
+                    return false;
+                }
+            }
             return true;
         };
         Scene.prototype.resetCachedMaterial = function () {
@@ -24135,7 +24160,7 @@ var BABYLON;
             if (this.textures) {
                 for (var i = 0; i < this.textures.length; i++) {
                     var texture = this.textures[i];
-                    if (texture && texture.isRenderTarget) {
+                    if (texture && texture.renderList) {
                         texture.freeRenderingGroups();
                     }
                 }
@@ -36853,7 +36878,7 @@ var BABYLON;
             if (!camera) {
                 return false;
             }
-            var postProcesses = postProcesses || camera._postProcesses;
+            var postProcesses = postProcesses || camera._postProcesses.filter(function (pp) { return pp != null; });
             if (!postProcesses || postProcesses.length === 0 || !this._scene.postProcessesEnabled) {
                 return false;
             }
@@ -36912,7 +36937,7 @@ var BABYLON;
             if (!camera) {
                 return;
             }
-            postProcesses = postProcesses || camera._postProcesses;
+            postProcesses = postProcesses || camera._postProcesses.filter(function (pp) { return pp != null; });
             if (postProcesses.length === 0 || !this._scene.postProcessesEnabled) {
                 return;
             }
@@ -51829,13 +51854,24 @@ var BABYLON;
             }
         };
         /**
+         * Is this system ready to be used/rendered
+         * @return true if the system is ready
+         */
+        ParticleSystem.prototype.isReady = function () {
+            var effect = this._getEffect();
+            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady()) {
+                return false;
+            }
+            return true;
+        };
+        /**
          * Renders the particle system in its current state.
          * @returns the current number of particles
          */
         ParticleSystem.prototype.render = function () {
             var effect = this._getEffect();
             // Check
-            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady() || !this._particles.length) {
+            if (!this.isReady() || !this._particles.length) {
                 return 0;
             }
             var engine = this._scene.getEngine();
@@ -51846,7 +51882,7 @@ var BABYLON;
             effect.setTexture("diffuseSampler", this.particleTexture);
             effect.setMatrix("view", viewMatrix);
             effect.setMatrix("projection", this._scene.getProjectionMatrix());
-            if (this._isAnimationSheetEnabled) {
+            if (this._isAnimationSheetEnabled && this.particleTexture) {
                 var baseSize = this.particleTexture.getBaseSize();
                 effect.setFloat3("particlesInfos", this.spriteCellWidth / baseSize.width, this.spriteCellHeight / baseSize.height, baseSize.width / this.spriteCellWidth);
             }
@@ -52899,6 +52935,16 @@ var BABYLON;
             configurable: true
         });
         /**
+         * Is this system ready to be used/rendered
+         * @return true if the system is ready
+         */
+        GPUParticleSystem.prototype.isReady = function () {
+            if (!this.emitter || !this._updateEffect.isReady() || !this._renderEffect.isReady() || !this.particleTexture || !this.particleTexture.isReady()) {
+                return false;
+            }
+            return true;
+        };
+        /**
          * Gets Wether the system has been started.
          * @returns True if it has been started, otherwise false.
          */
@@ -53051,7 +53097,7 @@ var BABYLON;
             }
             this._recreateUpdateEffect();
             this._recreateRenderEffect();
-            if (!this.emitter || !this._updateEffect.isReady() || !this._renderEffect.isReady()) {
+            if (!this.isReady()) {
                 return 0;
             }
             if (this._currentRenderId === this._scene.getRenderId()) {
@@ -55625,6 +55671,13 @@ var BABYLON;
             get: function () {
                 return this._sourceMesh.renderingGroupId;
             },
+            set: function (value) {
+                if (!this._sourceMesh || value === this._sourceMesh.renderingGroupId) {
+                    return;
+                }
+                //no-op with warning
+                BABYLON.Tools.Warn("Note - setting renderingGroupId of an instanced mesh has no effect on the scene");
+            },
             enumerable: true,
             configurable: true
         });
@@ -58971,8 +59024,7 @@ var BABYLON;
             for (var meshIndex = 0; meshIndex < currentRenderListLength; meshIndex++) {
                 var mesh = currentRenderList[meshIndex];
                 if (mesh) {
-                    if (!mesh.isReady()) {
-                        // Reset _currentRefreshId
+                    if (!mesh.isReady(this.refreshRate === 0)) {
                         this.resetRefreshCounter();
                         continue;
                     }
@@ -60520,7 +60572,10 @@ var BABYLON;
             camera.detachPostProcess(this);
             var index = camera._postProcesses.indexOf(this);
             if (index === 0 && camera._postProcesses.length > 0) {
-                this._camera._postProcesses[0].markTextureDirty();
+                var firstPostProcess = this._camera._getFirstPostProcess();
+                if (firstPostProcess) {
+                    firstPostProcess.markTextureDirty();
+                }
             }
             this.onActivateObservable.clear();
             this.onAfterRenderObservable.clear();
@@ -67226,7 +67281,7 @@ var BABYLON;
                 var camera = cams[i];
                 var cameraName = camera.name;
                 for (var j = 0; j < this._indicesForCamera[cameraName].length; j++) {
-                    if (camera._postProcesses[this._indicesForCamera[cameraName][j]] === undefined) {
+                    if (camera._postProcesses[this._indicesForCamera[cameraName][j]] === undefined || camera._postProcesses[this._indicesForCamera[cameraName][j]] === null) {
                         this._postProcesses[this._singleInstance ? 0 : cameraName].forEach(function (postProcess) {
                             cams[i].attachPostProcess(postProcess, _this._indicesForCamera[cameraName][j]);
                         });
@@ -69180,9 +69235,9 @@ var BABYLON;
             if (blockCompilation === void 0) { blockCompilation = false; }
             var _this = _super.call(this, name, "chromaticAberration", ["chromatic_aberration", "screen_width", "screen_height", "direction", "radialIntensity", "centerPosition"], [], options, camera, samplingMode, engine, reusable, null, textureType, undefined, null, blockCompilation) || this;
             /**
-             * The amount of seperation of rgb channels (default: 0)
+             * The amount of seperation of rgb channels (default: 30)
              */
-            _this.aberrationAmount = 0;
+            _this.aberrationAmount = 30;
             /**
              * The amount the effect will increase for pixels closer to the edge of the screen. (default: 0)
              */

+ 2 - 2
dist/preview release/what's new.md

@@ -14,7 +14,7 @@
 - Added [VideoDome](http://doc.babylonjs.com/how_to/360videodome) class to easily support 360 videos ([DavidHGillen](https://github.com/DavidHGillen))
 - Added [GlowLayer](https://doc.babylonjs.com/how_to/glow_layer) to easily support glow from emissive materials ([sebavan](https://github.com/sebavan))
 - New [AssetContainer](http://doc.babylonjs.com/how_to/how_to_use_assetcontainer) Class and loading methods ([trevordev](https://github.com/trevordev))
-- Added depth of field, MSAA, sharpening, chromatic aberration and grain effect to the default pipeline ([trevordev](https://github.com/trevordev))
+- Added depth of field, sharpening, MSAA, chromatic aberration and grain effect to the default pipeline ([trevordev](https://github.com/trevordev))
 - Particle System SubEmitters- Spawn new Sub emitter when particles dies. Cone/Sphere shapes emitters ([IbraheemOsama](https://github.com/IbraheemOsama))
 
 ## Updates
@@ -88,7 +88,7 @@
 - Supports Environment Drag and Drop in Sandbox ([sebavan](https://github.com/sebavan))
 - EnvironmentHelper has no an onError observable to handle errors when loading the textures ([RaananW](https://github.com/RaananW))
 - (Viewer) Viewer supports model animations ([RaananW](https://github.com/RaananW))
-- Tests for sharpen, chromatic aberration and enable/disable post processes ([trevordev](https://github.com/trevordev))
+- Tests for sharpen, chromatic aberration, default pipeline and enable/disable post processes ([trevordev](https://github.com/trevordev))
 
 ## Bug fixes
 

+ 1 - 2
src/Engine/babylon.engine.ts

@@ -954,7 +954,6 @@
                                         break;
                                 }
                             }
-                            break;
                         }
                     }
                 }
@@ -1159,7 +1158,7 @@
             // Detect if we are running on a faulty buggy desktop OS.
             this._badDesktopOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
 
-            Tools.Log("Babylon.js engine (v" + Engine.Version + ") launched");
+            console.log("Babylon.js engine (v" + Engine.Version + ") launched");
 
             this.enableOfflineSupport = (Database !== undefined);
         }

+ 1 - 2
src/Materials/Textures/babylon.renderTargetTexture.ts

@@ -496,8 +496,7 @@
                 var mesh = currentRenderList[meshIndex];
 
                 if (mesh) {
-                    if (!mesh.isReady()) {
-                        // Reset _currentRefreshId
+                    if (!mesh.isReady(this.refreshRate === 0)) {
                         this.resetRefreshCounter();
                         continue;
                     }

+ 9 - 0
src/Mesh/babylon.instancedMesh.ts

@@ -58,6 +58,15 @@
             return this._sourceMesh.renderingGroupId;
         }
 
+        public set renderingGroupId(value: number) {
+            if (!this._sourceMesh || value === this._sourceMesh.renderingGroupId) {
+                return;
+            }
+
+            //no-op with warning
+            Tools.Warn("Note - setting renderingGroupId of an instanced mesh has no effect on the scene");
+        }
+
         /**
          * Returns the total number of vertices (integer).  
          */

+ 6 - 0
src/Particles/babylon.IParticleSystem.ts

@@ -165,5 +165,11 @@ module BABYLON {
          * Remove all active particles
          */
         reset(): void;
+
+        /**
+         * Is this system ready to be used/rendered
+         * @return true if the system is ready
+         */
+        isReady(): boolean;        
     }
 }

+ 13 - 1
src/Particles/babylon.gpuParticleSystem.ts

@@ -258,6 +258,18 @@
         }
 
         /**
+         * Is this system ready to be used/rendered
+         * @return true if the system is ready
+         */
+        public isReady(): boolean {
+            if (!this.emitter || !this._updateEffect.isReady() || !this._renderEffect.isReady() || !this.particleTexture || !this.particleTexture.isReady()) {
+                return false;
+            }
+
+            return true;
+        }        
+
+        /**
          * Gets Wether the system has been started.
          * @returns True if it has been started, otherwise false.
          */
@@ -505,7 +517,7 @@
             this._recreateUpdateEffect();
             this._recreateRenderEffect();
 
-            if (!this.emitter || !this._updateEffect.isReady() || !this._renderEffect.isReady() ) {
+            if (!this.isReady()) {
                 return 0;
             }
 

+ 15 - 2
src/Particles/babylon.particleSystem.ts

@@ -847,6 +847,19 @@
         }
 
         /**
+         * Is this system ready to be used/rendered
+         * @return true if the system is ready
+         */
+        public isReady(): boolean {
+            var effect = this._getEffect();
+            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady()) {
+                return false;
+            }
+
+            return true;
+        }
+
+        /**
          * Renders the particle system in its current state.
          * @returns the current number of particles
          */
@@ -854,7 +867,7 @@
             var effect = this._getEffect();
 
             // Check
-            if (!this.emitter || !effect.isReady() || !this.particleTexture || !this.particleTexture.isReady() || !this._particles.length) {
+            if (!this.isReady() || !this._particles.length) {
                 return 0;
             }
 
@@ -869,7 +882,7 @@
             effect.setMatrix("view", viewMatrix);
             effect.setMatrix("projection", this._scene.getProjectionMatrix());
 
-            if (this._isAnimationSheetEnabled) {
+            if (this._isAnimationSheetEnabled && this.particleTexture) {
                 var baseSize = this.particleTexture.getBaseSize();
                 effect.setFloat3("particlesInfos", this.spriteCellWidth / baseSize.width, this.spriteCellHeight / baseSize.height, baseSize.width / this.spriteCellWidth);
             }

+ 2 - 2
src/PostProcess/babylon.chromaticAberrationPostProcess.ts

@@ -4,9 +4,9 @@ module BABYLON {
      */
     export class ChromaticAberrationPostProcess extends PostProcess {
         /**
-         * The amount of seperation of rgb channels (default: 0)
+         * The amount of seperation of rgb channels (default: 30)
          */
-        aberrationAmount = 0;
+        aberrationAmount = 30;
 
         /**
          * The amount the effect will increase for pixels closer to the edge of the screen. (default: 0)

+ 8 - 1
src/babylon.scene.ts

@@ -1937,6 +1937,13 @@
                 }
             }
 
+            // Particles
+            for (var particleSystem of this.particleSystems) {
+                if (!particleSystem.isReady()) {
+                    return false;
+                }
+            }
+
             return true;
         }
 
@@ -3205,7 +3212,7 @@
             if (this.textures) {
                 for (let i = 0; i < this.textures.length; i++) {
                     let texture = this.textures[i];
-                    if (texture && texture.isRenderTarget) {
+                    if (texture && texture.renderList) {
                         (<RenderTargetTexture>texture).freeRenderingGroups();
                     }
                 }

二进制
tests/validation/ReferenceImages/DefaultRenderingPipeline.png


二进制
tests/validation/ReferenceImages/defaultPipeline.png


二进制
tests/validation/ReferenceImages/particles.png


+ 16 - 3
tests/validation/config.json

@@ -280,13 +280,19 @@
     },
     {
       "title": "Chromatic aberration",
-      "playgroundId": "#NAW8EA",
+      "playgroundId": "#NAW8EA#0",
       "renderCount": 20,
       "referenceImage": "chromaticAberration.png"
     },
     {
+      "title": "Default pipeline",
+      "playgroundId": "#NAW8EA#3",
+      "renderCount": 20,
+      "referenceImage": "defaultPipeline.png"
+    },
+    {
       "title": "Kernel Blur",
-      "playgroundId": "#Y0WKT0",
+      "playgroundId": "#Y0WKT0#0",
       "referenceImage": "KernelBlur.png"
     },
     {
@@ -309,6 +315,13 @@
       "referenceImage": "pbrrough.png"
     },
     {
+      "title": "Particles",
+      "renderCount": 100,
+      "scriptToRun": "/Demos/Particles/particles.js",
+      "functionToCall": "CreateParticlesTestScene",
+      "referenceImage": "particles.png"
+    },    
+    {
       "title": "Reflection probes",
       "renderCount": 20,
       "scriptToRun": "/Demos/RefProbe/reflectionProbe.js",
@@ -388,7 +401,7 @@
     },
     {
       "title": "Light Projection Texture",
-      "playgroundId": "#CQNGRK",
+      "playgroundId": "#CQNGRK#0",
       "referenceImage": "LightProjectionTexture.png"
     },
     {