|
@@ -44327,12 +44327,18 @@ 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 to ensure a correct fallback if necessary.
|
|
|
+ this.useBlurExponentialShadowMap = this.useBlurExponentialShadowMap;
|
|
|
// Reaffect the filter.
|
|
|
this._applyFilterValues();
|
|
|
+ // Reaffect Render List.
|
|
|
+ this._shadowMap.renderList = renderList;
|
|
|
};
|
|
|
/**
|
|
|
* Boolean : true when the ShadowGenerator is finally computed.
|
|
@@ -44480,15 +44486,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;
|
|
|
}
|
|
|
};
|
|
|
/**
|