diff --git a/CHANGES.md b/CHANGES.md index d83761531d1e..7cba86a56462 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ Change Log * Added the ability to specify the width of the intersection volume for `Scene.sampleHeight`, `Scene.clampToHeight`, `Scene.sampleHeightMostDetailed`, and `Scene.clampToHeightMostDetailed`. [#7287](https://github.com/AnalyticalGraphicsInc/cesium/pull/7287) ##### Fixes :wrench: +* Fixed 3D Tiles performance regression. [#7482](https://github.com/AnalyticalGraphicsInc/cesium/pull/7482) * Fixed an issue where classification primitives with the `CESIUM_3D_TILE` classification type would render on terrain. [#7422](https://github.com/AnalyticalGraphicsInc/cesium/pull/7422) * Fixed an issue where 3D Tiles would show through the globe. [#7422](https://github.com/AnalyticalGraphicsInc/cesium/pull/7422) * Fixed crash when entity geometry show value is an interval that only covered part of the entity availability range [#7458](https://github.com/AnalyticalGraphicsInc/cesium/pull/7458) diff --git a/Source/Scene/Model.js b/Source/Scene/Model.js index b82a52fda3c2..fc6dfffa96c4 100644 --- a/Source/Scene/Model.js +++ b/Source/Scene/Model.js @@ -1128,6 +1128,10 @@ define([ Check.typeOf.number.greaterThanOrEquals('imageBasedLightingFactor.y', value.y, 0.0); Check.typeOf.number.lessThanOrEquals('imageBasedLightingFactor.y', value.y, 1.0); //>>includeEnd('debug'); + var imageBasedLightingFactor = this._imageBasedLightingFactor; + if ((value === imageBasedLightingFactor) || Cartesian2.equals(value, imageBasedLightingFactor)) { + return; + } this._shouldRegenerateShaders = this._shouldRegenerateShaders || (this._imageBasedLightingFactor.x > 0.0 && value.x === 0.0) || (this._imageBasedLightingFactor.x === 0.0 && value.x > 0.0); this._shouldRegenerateShaders = this._shouldRegenerateShaders || (this._imageBasedLightingFactor.y > 0.0 && value.y === 0.0) || (this._imageBasedLightingFactor.y === 0.0 && value.y > 0.0); Cartesian2.clone(value, this._imageBasedLightingFactor); @@ -1212,6 +1216,9 @@ define([ throw new DeveloperError('sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.'); } //>>includeEnd('debug'); + if (value === this._sphericalHarmonicCoefficients) { + return; + } this._sphericalHarmonicCoefficients = value; this._shouldRegenerateShaders = true; }