|
@@ -24721,6 +24721,7 @@ var BABYLON;
|
|
|
if (flag & BABYLON.Material.MiscDirtyFlag) {
|
|
|
this._markAllSubMeshesAsMiscDirty();
|
|
|
}
|
|
|
+ this.getScene().resetCachedMaterial();
|
|
|
};
|
|
|
PushMaterial.prototype._markAllSubMeshesAsDirty = function (func) {
|
|
|
for (var _i = 0, _a = this.getScene().meshes; _i < _a.length; _i++) {
|
|
@@ -28666,11 +28667,9 @@ var BABYLON;
|
|
|
if (defines._areFresnelDirty) {
|
|
|
if (StandardMaterial.FresnelEnabled) {
|
|
|
// Fresnel
|
|
|
- if (this._diffuseFresnelParameters && this._diffuseFresnelParameters.isEnabled ||
|
|
|
- this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
|
|
|
- this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled ||
|
|
|
- this._refractionFresnelParameters && this._refractionFresnelParameters.isEnabled ||
|
|
|
- this._reflectionFresnelParameters && this._reflectionFresnelParameters.isEnabled) {
|
|
|
+ if (this._diffuseFresnelParameters || this._opacityFresnelParameters ||
|
|
|
+ this._emissiveFresnelParameters || this._refractionFresnelParameters ||
|
|
|
+ this._reflectionFresnelParameters) {
|
|
|
defines.DIFFUSEFRESNEL = (this._diffuseFresnelParameters && this._diffuseFresnelParameters.isEnabled);
|
|
|
defines.OPACITYFRESNEL = (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled);
|
|
|
defines.REFLECTIONFRESNEL = (this._reflectionFresnelParameters && this._reflectionFresnelParameters.isEnabled);
|