|
@@ -61036,6 +61036,7 @@ var BABYLON;
|
|
|
// Getters and setters
|
|
|
_this._depthOfFieldEnabled = true;
|
|
|
_this._lensFlareEnabled = true;
|
|
|
+ _this._cameras = cameras || [];
|
|
|
// Initialize
|
|
|
_this._scene = scene;
|
|
|
// Create pass post-processe
|
|
@@ -61086,15 +61087,15 @@ var BABYLON;
|
|
|
set: function (enabled) {
|
|
|
var blurIndex = this.gaussianBlurHPostProcesses.length - 1;
|
|
|
if (enabled && !this._depthOfFieldEnabled) {
|
|
|
- this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRGaussianBlurH" + blurIndex, this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRGaussianBlurV" + blurIndex, this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRDepthOfField", this._scene.cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRGaussianBlurH" + blurIndex, this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRGaussianBlurV" + blurIndex, this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRDepthOfField", this._cameras);
|
|
|
this._depthRenderer = this._scene.enableDepthRenderer();
|
|
|
}
|
|
|
else if (!enabled && this._depthOfFieldEnabled) {
|
|
|
- this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRGaussianBlurH" + blurIndex, this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRGaussianBlurV" + blurIndex, this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRDepthOfField", this._scene.cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRGaussianBlurH" + blurIndex, this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRGaussianBlurV" + blurIndex, this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRDepthOfField", this._cameras);
|
|
|
}
|
|
|
this._depthOfFieldEnabled = enabled;
|
|
|
},
|
|
@@ -61108,19 +61109,19 @@ var BABYLON;
|
|
|
set: function (enabled) {
|
|
|
var blurIndex = this.gaussianBlurHPostProcesses.length - 2;
|
|
|
if (enabled && !this._lensFlareEnabled) {
|
|
|
- this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRLensFlare", this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRLensFlareShift", this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRGaussianBlurH" + blurIndex, this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRGaussianBlurV" + blurIndex, this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRLensFlareCompose", this._scene.cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRLensFlare", this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRLensFlareShift", this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRGaussianBlurH" + blurIndex, this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRGaussianBlurV" + blurIndex, this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, "HDRLensFlareCompose", this._cameras);
|
|
|
this._setDepthOfFieldSavePostProcess("HDRPostLensFlareDepthOfFieldSource");
|
|
|
}
|
|
|
else if (!enabled && this._lensFlareEnabled) {
|
|
|
- this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRLensFlare", this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRLensFlareShift", this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRGaussianBlurH" + blurIndex, this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRGaussianBlurV" + blurIndex, this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRLensFlareCompose", this._scene.cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRLensFlare", this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRLensFlareShift", this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRGaussianBlurH" + blurIndex, this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRGaussianBlurV" + blurIndex, this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRLensFlareCompose", this._cameras);
|
|
|
this._setDepthOfFieldSavePostProcess("HDRBaseDepthOfFieldSource");
|
|
|
}
|
|
|
this._lensFlareEnabled = enabled;
|
|
@@ -61130,8 +61131,8 @@ var BABYLON;
|
|
|
});
|
|
|
// Sets depth-of-field save post-process
|
|
|
StandardRenderingPipeline.prototype._setDepthOfFieldSavePostProcess = function (name) {
|
|
|
- this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRPostLensFlareDepthOfFieldSource", this._scene.cameras);
|
|
|
- this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, name, this._scene.cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.disableEffectInPipeline(this._name, "HDRPostLensFlareDepthOfFieldSource", this._cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.enableEffectInPipeline(this._name, name, this._cameras);
|
|
|
switch (name) {
|
|
|
case "HDRBaseDepthOfFieldSource":
|
|
|
this._currentDepthOfFieldSource = this.textureAdderFinalPostProcess;
|
|
@@ -61297,8 +61298,8 @@ var BABYLON;
|
|
|
};
|
|
|
// Dispose
|
|
|
StandardRenderingPipeline.prototype.dispose = function () {
|
|
|
- for (var i = 0; i < this._scene.cameras.length; i++) {
|
|
|
- var camera = this._scene.cameras[i];
|
|
|
+ for (var i = 0; i < this._cameras.length; i++) {
|
|
|
+ var camera = this._cameras[i];
|
|
|
this.originalPostProcess.dispose(camera);
|
|
|
this.downSampleX4PostProcess.dispose(camera);
|
|
|
this.brightPassPostProcess.dispose(camera);
|
|
@@ -61314,7 +61315,7 @@ var BABYLON;
|
|
|
this.lensFlareComposePostProcess.dispose(camera);
|
|
|
this.depthOfFieldPostProcess.dispose(camera);
|
|
|
}
|
|
|
- this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._scene.cameras);
|
|
|
+ this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
|
|
|
_super.prototype.dispose.call(this);
|
|
|
};
|
|
|
// Serialize rendering pipeline
|