Browse Source

Moved PBR to push mode #1961

David Catuhe 8 years ago
parent
commit
ae2bff56ba

File diff suppressed because it is too large
+ 3709 - 3714
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 18 - 18
dist/preview release/babylon.js


File diff suppressed because it is too large
+ 383 - 426
dist/preview release/babylon.max.js


File diff suppressed because it is too large
+ 3709 - 3714
dist/preview release/babylon.module.d.ts


File diff suppressed because it is too large
+ 25 - 25
dist/preview release/babylon.worker.js


File diff suppressed because it is too large
+ 7558 - 7563
dist/preview release/customConfigurations/minimalViewer/babylon.d.ts


File diff suppressed because it is too large
+ 25 - 25
dist/preview release/customConfigurations/minimalViewer/babylon.js


File diff suppressed because it is too large
+ 383 - 426
dist/preview release/customConfigurations/minimalViewer/babylon.max.js


File diff suppressed because it is too large
+ 7558 - 7563
dist/preview release/customConfigurations/minimalViewer/babylon.module.d.ts


File diff suppressed because it is too large
+ 319 - 381
src/Materials/PBR/babylon.pbrBaseMaterial.ts


+ 20 - 11
src/Materials/PBR/babylon.pbrBaseSimpleMaterial.ts

@@ -11,77 +11,77 @@
          * Number of Simultaneous lights allowed on the material.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsLightsDirty")
         public maxSimultaneousLights = 4;
 
         /**
          * If sets to true, disables all the lights affecting the material.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsLightsDirty")
         public disableLighting = false;
 
         /**
          * Environment Texture used in the material (this is use for both reflection and environment lighting).
          */
         @serializeAsTexture()
-        @expandToProperty(null, "_reflectionTexture")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_reflectionTexture")
         public environmentTexture: BaseTexture;
 
         /**
          * If sets to true, x component of normal map value will invert (x = 1.0 - x).
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public invertNormalMapX = false;
 
         /**
          * If sets to true, y component of normal map value will invert (y = 1.0 - y).
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public invertNormalMapY = false;
 
         /**
          * Normal map used in the model.
          */
         @serializeAsTexture()
-        @expandToProperty(null, "_bumpTexture")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_bumpTexture")
         public normalTexture: BaseTexture;
 
         /**
          * Emissivie color used to self-illuminate the model.
          */
         @serializeAsColor3("emissive")
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public emissiveColor = new Color3(0, 0, 0);
 
         /**
          * Emissivie texture used to self-illuminate the model.
          */
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public emissiveTexture: BaseTexture;
 
         /**
          * Occlusion Channel Strenght.
          */
         @serialize()
-        @expandToProperty(null, "_ambientTextureStrength")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_ambientTextureStrength")
         public occlusionStrength: number = 1.0;
 
         /**
          * Occlusion Texture of the material (adding extra occlusion effects).
          */
         @serializeAsTexture()
-        @expandToProperty(null, "_ambientTexture")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_ambientTexture")
         public occlusionTexture: BaseTexture;
 
         /**
          * Defines the alpha limits in alpha test mode.
          */
         @serialize()
-        @expandToProperty(null, "_alphaCutOff")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_alphaCutOff")
         public alphaCutOff: number;
 
         protected _transparencyMode: number = PBRMaterial.PBRMATERIAL_OPAQUE;
@@ -96,6 +96,9 @@
          * Sets the transparency mode of the material.
          */
         public set transparencyMode(value: number) {
+            if (this._transparencyMode === value) {
+                return;
+            }
             this._transparencyMode = value;
             if (value === PBRMaterial.PBRMATERIAL_ALPHATESTANDBLEND) {
                 this._forceAlphaTest = true;
@@ -103,6 +106,8 @@
             else {
                 this._forceAlphaTest = false;
             }
+            
+            this._markAllSubMeshesAsTexturesDirty();
         }
 
         /**
@@ -116,8 +121,12 @@
          * If sets to true and backfaceCulling is false, normals will be flipped on the backside.
          */
         public set doubleSided(value: boolean) {
+            if (this._twoSidedLighting === value) {
+                return;
+            }
             this._twoSidedLighting = value;
             this.backFaceCulling = !value;
+            this._markAllSubMeshesAsTexturesDirty();
         }
 
         /**

+ 56 - 56
src/Materials/PBR/babylon.pbrMaterial.ts

@@ -45,7 +45,7 @@
          * This impacts both the direct diffuse and specular highlights.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public directIntensity: number = 1.0;
         
         /**
@@ -53,7 +53,7 @@
          * This helps controlling the emissive effect without modifying the emissive color.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public emissiveIntensity: number = 1.0;
         
         /**
@@ -61,7 +61,7 @@
          * either through harmonics for rough material or through the refelction for shiny ones.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public environmentIntensity: number = 1.0;
         
         /**
@@ -69,14 +69,14 @@
          * four lights of the scene. Those highlights may not be needed in full environment lighting.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public specularIntensity: number = 1.0;
 
         /**
          * Debug Control allowing disabling the bump map on this material.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public disableBumpMap: boolean = false;
 
         /**
@@ -85,7 +85,7 @@
          * This corresponds to a photographic exposure.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public cameraExposure: number = 1.0;
         
         /**
@@ -93,7 +93,7 @@
          * This property is here and not in the camera to allow controlling contrast without full screen post process.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public cameraContrast: number = 1.0;
         
         /**
@@ -101,7 +101,7 @@
          * This allows special effects like sepia, black and white to sixties rendering style. 
          */
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public cameraColorGradingTexture: BaseTexture = null;
         
         /**
@@ -111,54 +111,54 @@
          * corresponding to low luminance, medium luminance, and high luminance areas respectively.
          */
         @serializeAsColorCurves()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public cameraColorCurves: ColorCurves = null;
 
         /**
          * AKA Diffuse Texture in standard nomenclature.
          */
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public albedoTexture: BaseTexture;
         
         /**
          * AKA Occlusion Texture in other nomenclature.
          */
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public ambientTexture: BaseTexture;
 
         /**
          * AKA Occlusion Texture Intensity in other nomenclature.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public ambientTextureStrength: number = 1.0;
 
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public opacityTexture: BaseTexture;
 
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public reflectionTexture: BaseTexture;
 
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public emissiveTexture: BaseTexture;
         
         /**
          * AKA Specular texture in other nomenclature.
          */
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public reflectivityTexture: BaseTexture;
 
         /**
          * Used to switch from specular/glossiness to metallic/roughness workflow.
          */
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public metallicTexture: BaseTexture;
 
         /**
@@ -166,7 +166,7 @@
          * Can also be used to scale the metalness values of the metallic texture.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public metallic: number;
 
         /**
@@ -174,7 +174,7 @@
          * Can also be used to scale the roughness values of the metallic texture.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public roughness: number;
 
         /**
@@ -182,74 +182,74 @@
          * Gray Scale represents roughness in metallic mode and glossiness in specular mode.
          */
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public microSurfaceTexture: BaseTexture;
 
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public bumpTexture: BaseTexture;
 
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", null)
         public lightmapTexture: BaseTexture;
 
         @serializeAsTexture()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public refractionTexture: BaseTexture;
 
         @serializeAsColor3("ambient")
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public ambientColor = new Color3(0, 0, 0);
 
         /**
          * AKA Diffuse Color in other nomenclature.
          */
         @serializeAsColor3("albedo")
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public albedoColor = new Color3(1, 1, 1);
         
         /**
          * AKA Specular Color in other nomenclature.
          */
         @serializeAsColor3("reflectivity")
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public reflectivityColor = new Color3(1, 1, 1);
 
         @serializeAsColor3("reflection")
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public reflectionColor = new Color3(0.0, 0.0, 0.0);
 
         @serializeAsColor3("emissive")
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public emissiveColor = new Color3(0, 0, 0);
         
         /**
          * AKA Glossiness in other nomenclature.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public microSurface = 0.9;
 
         /**
          * source material index of refraction (IOR)' / 'destination material IOR.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public indexOfRefraction = 0.66;
         
         /**
          * Controls if refraction needs to be inverted on Y. This could be usefull for procedural texture.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public invertRefractionY = false;
 
         @serializeAsFresnelParameters()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public opacityFresnelParameters: FresnelParameters;
 
         @serializeAsFresnelParameters()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public emissiveFresnelParameters: FresnelParameters;
 
         /**
@@ -257,11 +257,11 @@
          * Materials half opaque for instance using refraction could benefit from this control.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public linkRefractionWithTransparency = false;
 
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useLightmapAsShadowmap = false;
         
         /**
@@ -269,14 +269,14 @@
          * A light for instance can be thought as emissive.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useEmissiveAsIllumination = false;
         
         /**
          * Secifies that the alpha is coming form the albedo channel alpha channel.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useAlphaFromAlbedoTexture = false;
         
         /**
@@ -284,49 +284,49 @@
          * A car glass is a good exemple of that. When sun reflects on it you can not see what is behind.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useSpecularOverAlpha = true;
         
         /**
          * Specifies if the reflectivity texture contains the glossiness information in its alpha channel.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useMicroSurfaceFromReflectivityMapAlpha = false;
 
         /**
          * Specifies if the metallic texture contains the roughness information in its alpha channel.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useRoughnessFromMetallicTextureAlpha = true;
 
         /**
          * Specifies if the metallic texture contains the roughness information in its green channel.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useRoughnessFromMetallicTextureGreen = false;
 
         /**
          * Specifies if the metallic texture contains the metallness information in its blue channel.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useMetallnessFromMetallicTextureBlue = false;
 
         /**
          * Specifies if the metallic texture contains the ambient occlusion information in its red channel.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useAmbientOcclusionFromMetallicTextureRed = false;
 
         /**
          * Specifies if the ambient texture contains the ambient occlusion information in its red channel only.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useAmbientInGrayScale = false;
         
         /**
@@ -334,7 +334,7 @@
          * The material will try to infer what glossiness each pixel should be.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useAutoMicroSurfaceFromReflectivityMap = false;
         
         /**
@@ -342,7 +342,7 @@
          * the creation of the material.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useScalarInLinearSpace = false;
         
         /**
@@ -351,7 +351,7 @@
          * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public usePhysicalLightFalloff = true;
         
         /**
@@ -359,63 +359,63 @@
          * A car glass is a good exemple of that. When the street lights reflects on it you can not see what is behind.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useRadianceOverAlpha = true;
         
         /**
          * Allows using the bump map in parallax mode.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useParallax = false;
 
         /**
          * Allows using the bump map in parallax occlusion mode.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public useParallaxOcclusion = false;
 
         /**
          * Controls the scale bias of the parallax mode.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public parallaxScaleBias = 0.05;
         
         /**
          * If sets to true, disables all the lights affecting the material.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsLightsDirty")
         public disableLighting = false;
 
         /**
          * Number of Simultaneous lights allowed on the material.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsLightsDirty")
         public maxSimultaneousLights = 4;  
 
         /**
          * If sets to true, x component of normal map value will invert (x = 1.0 - x).
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public invertNormalMapX = false;
 
         /**
          * If sets to true, y component of normal map value will invert (y = 1.0 - y).
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public invertNormalMapY = false;
 
         /**
          * If sets to true and backfaceCulling is false, normals will be flipped on the backside.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public twoSidedLighting = false;
 
         /**

+ 5 - 5
src/Materials/PBR/babylon.pbrMetallicRoughnessMaterial.ts

@@ -14,7 +14,7 @@
          * of the material.
          */
         @serializeAsTexture()
-        @expandToProperty(null, "_albedoColor")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_albedoColor")
         public baseColor: Color3;
         
         /**
@@ -22,7 +22,7 @@
          * well as opacity information in the alpha channel.
          */
         @serializeAsTexture()
-        @expandToProperty(null, "_albedoTexture")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_albedoTexture")
         public baseTexture: BaseTexture;
 
         /**
@@ -30,7 +30,7 @@
          * Can also be used to scale the metalness values of the metallic texture.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public metallic: number;
 
         /**
@@ -38,7 +38,7 @@
          * Can also be used to scale the roughness values of the metallic texture.
          */
         @serialize()
-        @expandToProperty(null)
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty")
         public roughness: number;
 
         /**
@@ -46,7 +46,7 @@
          * roughness value in the G channel to keep better precision.
          */
         @serializeAsTexture()
-        @expandToProperty(null, "_metallicTexture")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_metallicTexture")
         public metallicRoughnessTexture: BaseTexture;
 
         /**

+ 5 - 5
src/Materials/PBR/babylon.pbrSpecularGlossinessMaterial.ts

@@ -11,7 +11,7 @@
          * Specifies the diffuse Color of the material.
          */
         @serializeAsColor3()
-        @expandToProperty(null, "_albedoColor")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_albedoColor")
         public diffuseColor: Color3;
         
         /**
@@ -19,28 +19,28 @@
          * channel.
          */
         @serializeAsTexture()
-        @expandToProperty(null, "_albedoTexture")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_albedoTexture")
         public diffuseTexture: BaseTexture;
 
         /**
          * Specifies the specular color of the material. This indicates how reflective is the material (none to mirror).
          */
         @serializeAsColor3()
-        @expandToProperty(null, "_reflectivityColor")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_reflectivityColor")
         public specularColor: Color3;
 
         /**
          * Specifies the glossiness of the material. This indicates "how sharp is the reflection".
          */
         @serialize()
-        @expandToProperty(null, "_microSurface")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_microSurface")
         public glossiness: number;
         
         /**
          * Spectifies both the specular color RGB and the glossiness A of the material per pixels.
          */
         @serializeAsTexture()
-        @expandToProperty(null, "_reflectivityTexture")
+        @expandToProperty("_markAllSubMeshesAsTexturesDirty", "_reflectivityTexture")
         public specularGlossinessTexture: BaseTexture;
 
         /**

+ 6 - 4
src/Materials/babylon.materialHelper.ts

@@ -10,7 +10,7 @@
             }
         }
 
-        public static PrepareDefinesForFrameBoundValues(scene: Scene, engine: Engine, defines: MaterialDefines, useInstances: boolean): void {
+        public static PrepareDefinesForFrameBoundValues(scene: Scene, engine: Engine, defines: MaterialDefines, useInstances: boolean, forceAlphaTest = false): void {
             var changed = false;
 
             if (defines["CLIPPLANE"] !== (scene.clipPlane !== undefined && scene.clipPlane !== null)) {
@@ -18,7 +18,7 @@
                 changed = true;
             }
 
-            if (defines["ALPHATEST"] !== engine.getAlphaTesting()) {
+            if (defines["ALPHATEST"] !== (engine.getAlphaTesting() || forceAlphaTest)) {
                 defines["ALPHATEST"] = !defines["ALPHATEST"];
                 changed = true;
             }
@@ -33,9 +33,9 @@
             }
         }
 
-        public static PrepareDefinesForAttributes(mesh: AbstractMesh, defines: MaterialDefines, useVertexColor: boolean, useBones: boolean, useMorphTargets = false): void {
+        public static PrepareDefinesForAttributes(mesh: AbstractMesh, defines: MaterialDefines, useVertexColor: boolean, useBones: boolean, useMorphTargets = false): boolean {
             if (!defines._areAttributesDirty && defines._needNormals === defines._normals && defines._needUVs === defines._uvs) {
-                return;
+                return false;
             }               
 
             defines._normals = defines._needNormals;
@@ -84,6 +84,8 @@
                     defines["NUM_MORPH_INFLUENCERS"] = 0;
                 }
             }
+
+            return true;
         }
 
         public static PrepareDefinesForLights(scene: Scene, mesh: AbstractMesh, defines: MaterialDefines, specularSupported: boolean, maxSimultaneousLights = 4, disableLighting = false): boolean {

+ 1 - 1
src/Materials/babylon.standardMaterial.ts

@@ -495,7 +495,7 @@ module BABYLON {
                     }
 
                     if (scene.getEngine().getCaps().standardDerivatives && this._bumpTexture && StandardMaterial.BumpTextureEnabled) {
-                        // Bump texure can not be none blocking.
+                        // Bump texure can not be not blocking.
                         if (!this._bumpTexture.isReady()) {
                             return false;
                         } else {

+ 1 - 3
src/Tools/babylon.decorators.ts

@@ -24,9 +24,7 @@
                     }
                     this[key] = value;
                     
-                    if (setCallback) {
-                        target[setCallback].apply(this);
-                    }
+                    target[setCallback].apply(this);
                 },
                 enumerable: true,
                 configurable: true

BIN
tests/validation/ReferenceImages/highlights.png