Pārlūkot izejas kodu

Added material.resetCheckOnlyOnceFlag

David catuhe 9 gadi atpakaļ
vecāks
revīzija
f67273b1e9

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 8 - 8
dist/preview release/babylon.core.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 895 - 894
dist/preview release/babylon.d.ts


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 15 - 15
dist/preview release/babylon.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 7 - 1
dist/preview release/babylon.max.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 15 - 15
dist/preview release/babylon.noworker.js


+ 3 - 0
src/Materials/babylon.material.js

@@ -152,6 +152,9 @@ var BABYLON;
         };
         Material.prototype.trackCreation = function (onCompiled, onError) {
         };
+        Material.prototype.resetCheckOnlyOnceFlag = function () {
+            this._wasPreviouslyReady = false;
+        };
         Material.prototype._preBind = function () {
             var engine = this._scene.getEngine();
             engine.enableEffect(this._effect);

+ 4 - 0
src/Materials/babylon.material.ts

@@ -167,6 +167,10 @@
         public trackCreation(onCompiled: (effect: Effect) => void, onError: (effect: Effect, errors: string) => void) {
         }
 
+        public resetCheckOnlyOnceFlag(): void {
+            this._wasPreviouslyReady = false;
+        }
+
         public _preBind(): void {
             var engine = this._scene.getEngine();
 

+ 3 - 0
src/Materials/babylon.standardMaterial.js

@@ -517,6 +517,9 @@ var BABYLON;
                 if (this._defines.FOG) {
                     fallbacks.addFallback(1, "FOG");
                 }
+                if (this._defines.POINTSIZE) {
+                    fallbacks.addFallback(0, "POINTSIZE");
+                }
                 for (var lightIndex = 0; lightIndex < maxSimultaneousLights; lightIndex++) {
                     if (!this._defines["LIGHT" + lightIndex]) {
                         continue;

+ 4 - 0
src/Materials/babylon.standardMaterial.ts

@@ -602,6 +602,10 @@
                     fallbacks.addFallback(1, "FOG");
                 }
 
+                if (this._defines.POINTSIZE) {
+                    fallbacks.addFallback(0, "POINTSIZE");
+                }
+
                 for (var lightIndex = 0; lightIndex < maxSimultaneousLights; lightIndex++) {
                     if (!this._defines["LIGHT" + lightIndex]) {
                         continue;