瀏覽代碼

Merge pull request #2298 from sebavan/Development

Development
sebavan 8 年之前
父節點
當前提交
d01a9a2359

File diff suppressed because it is too large
+ 1344 - 1344
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 6 - 6
dist/preview release/babylon.js


+ 12 - 0
dist/preview release/babylon.max.js

@@ -44327,12 +44327,20 @@ var BABYLON;
             }
         };
         ShadowGenerator.prototype.recreateShadowMap = function () {
+            // Track render list.
+            var renderList = this._shadowMap.renderList;
             // Clean up existing data.
             this._disposeRTTandPostProcesses();
             // Reinitializes.
             this._initializeGenerator(this.blurBoxOffset);
+            // Reaffect the blur ESM to ensure a correct fallback if necessary.
+            if (this.useBlurExponentialShadowMap) {
+                this.useBlurExponentialShadowMap = true;
+            }
             // Reaffect the filter.
             this._applyFilterValues();
+            // Reaffect Render List.
+            this._shadowMap.renderList = renderList;
         };
         /**
          * Boolean : true when the ShadowGenerator is finally computed.
@@ -44480,15 +44488,19 @@ var BABYLON;
         ShadowGenerator.prototype._disposeRTTandPostProcesses = function () {
             if (this._shadowMap) {
                 this._shadowMap.dispose();
+                this._shadowMap = null;
             }
             if (this._shadowMap2) {
                 this._shadowMap2.dispose();
+                this._shadowMap2 = null;
             }
             if (this._downSamplePostprocess) {
                 this._downSamplePostprocess.dispose();
+                this._downSamplePostprocess = null;
             }
             if (this._boxBlurPostprocess) {
                 this._boxBlurPostprocess.dispose();
+                this._boxBlurPostprocess = null;
             }
         };
         /**

File diff suppressed because it is too large
+ 1344 - 1344
dist/preview release/babylon.module.d.ts


File diff suppressed because it is too large
+ 9 - 9
dist/preview release/babylon.worker.js


File diff suppressed because it is too large
+ 2539 - 2539
dist/preview release/customConfigurations/minimalViewer/babylon.d.ts


File diff suppressed because it is too large
+ 2539 - 2539
dist/preview release/customConfigurations/minimalViewer/babylon.module.d.ts


+ 12 - 2
src/Lights/Shadows/babylon.shadowGenerator.ts

@@ -345,14 +345,20 @@
         }
 
         public recreateShadowMap(): void {
+            // Track render list.
+            var renderList = this._shadowMap.renderList;
             // Clean up existing data.
             this._disposeRTTandPostProcesses();
-
             // Reinitializes.
             this._initializeGenerator(this.blurBoxOffset);
-
+            // Reaffect the blur ESM to ensure a correct fallback if necessary.
+            if (this.useBlurExponentialShadowMap) {
+                this.useBlurExponentialShadowMap = true;
+            }
             // Reaffect the filter.
             this._applyFilterValues();
+            // Reaffect Render List.
+            this._shadowMap.renderList = renderList;
         }
 
         /**
@@ -532,18 +538,22 @@
         private _disposeRTTandPostProcesses(): void {
             if (this._shadowMap) {
                 this._shadowMap.dispose();
+                this._shadowMap = null;
             }
 
             if (this._shadowMap2) {
                 this._shadowMap2.dispose();
+                this._shadowMap2 = null;
             }
 
             if (this._downSamplePostprocess) {
                 this._downSamplePostprocess.dispose();
+                this._downSamplePostprocess = null;
             }
 
             if (this._boxBlurPostprocess) {
                 this._boxBlurPostprocess.dispose();
+                this._boxBlurPostprocess = null;
             }
         }