|
@@ -73100,20 +73100,28 @@ var ReflectionBlock = /** @class */ (function (_super) {
|
|
|
};
|
|
|
ReflectionBlock.prototype._dumpPropertiesCode = function () {
|
|
|
var codeString = _super.prototype._dumpPropertiesCode.call(this);
|
|
|
+ if (this.texture) {
|
|
|
+ codeString += this._codeVariableName + ".texture.gammaSpace = " + this.texture.gammaSpace + ");\r\n";
|
|
|
+ }
|
|
|
codeString += this._codeVariableName + ".useSphericalHarmonics = " + this.useSphericalHarmonics + ";\r\n";
|
|
|
codeString += this._codeVariableName + ".forceIrradianceInFragment = " + this.forceIrradianceInFragment + ";\r\n";
|
|
|
return codeString;
|
|
|
};
|
|
|
ReflectionBlock.prototype.serialize = function () {
|
|
|
+ var _a, _b;
|
|
|
var serializationObject = _super.prototype.serialize.call(this);
|
|
|
serializationObject.useSphericalHarmonics = this.useSphericalHarmonics;
|
|
|
serializationObject.forceIrradianceInFragment = this.forceIrradianceInFragment;
|
|
|
+ serializationObject.gammaSpace = (_b = (_a = this.texture) === null || _a === void 0 ? void 0 : _a.gammaSpace) !== null && _b !== void 0 ? _b : true;
|
|
|
return serializationObject;
|
|
|
};
|
|
|
ReflectionBlock.prototype._deserialize = function (serializationObject, scene, rootUrl) {
|
|
|
_super.prototype._deserialize.call(this, serializationObject, scene, rootUrl);
|
|
|
this.useSphericalHarmonics = serializationObject.useSphericalHarmonics;
|
|
|
this.forceIrradianceInFragment = serializationObject.forceIrradianceInFragment;
|
|
|
+ if (this.texture) {
|
|
|
+ this.texture.gammaSpace = serializationObject.gammaSpace;
|
|
|
+ }
|
|
|
};
|
|
|
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
|
|
|
Object(_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_8__["editableInPropertyPage"])("Spherical Harmonics", _nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_8__["PropertyTypeForEdition"].Boolean, "ADVANCED", { "notifiers": { "update": true } })
|
|
@@ -92005,6 +92013,7 @@ var BaseTexture = /** @class */ (function (_super) {
|
|
|
* The higher the better but the slower. This defaults to 4 as it seems to be the best tradeoff.
|
|
|
*/
|
|
|
_this.anisotropicFilteringLevel = BaseTexture.DEFAULT_ANISOTROPIC_FILTERING_LEVEL;
|
|
|
+ _this._isCube = false;
|
|
|
_this._gammaSpace = true;
|
|
|
/**
|
|
|
* Is Z inverted in the texture (useful in a cube texture).
|
|
@@ -92143,15 +92152,17 @@ var BaseTexture = /** @class */ (function (_super) {
|
|
|
*/
|
|
|
get: function () {
|
|
|
if (!this._texture) {
|
|
|
- return false;
|
|
|
+ return this._isCube;
|
|
|
}
|
|
|
return this._texture.isCube;
|
|
|
},
|
|
|
set: function (value) {
|
|
|
if (!this._texture) {
|
|
|
- return;
|
|
|
+ this._isCube = value;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this._texture.isCube = value;
|
|
|
}
|
|
|
- this._texture.isCube = value;
|
|
|
},
|
|
|
enumerable: false,
|
|
|
configurable: true
|
|
@@ -93295,7 +93306,7 @@ var CubeTexture = /** @class */ (function (_super) {
|
|
|
if (!this._texture) {
|
|
|
var scene = this.getScene();
|
|
|
if (this._prefiltered) {
|
|
|
- this._texture = this._getEngine().createPrefilteredCubeTexture(this.url, scene, 0.8, 0, this._delayedOnLoad, undefined, this._format, undefined, this._createPolynomials);
|
|
|
+ this._texture = this._getEngine().createPrefilteredCubeTexture(this.url, scene, 0.8, 0, this._delayedOnLoad, undefined, this._format, forcedExtension, this._createPolynomials);
|
|
|
}
|
|
|
else {
|
|
|
this._texture = this._getEngine().createCubeTexture(this.url, scene, this._files, this._noMipmap, this._delayedOnLoad, null, this._format, forcedExtension, false, 0, 0, null, this._loaderOptions);
|