David Catuhe 8 gadi atpakaļ
vecāks
revīzija
f9ff6a7ce8

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


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


+ 5 - 2
dist/preview release/babylon.max.js

@@ -24177,7 +24177,7 @@ var BABYLON;
             return result;
         };
         // Force shader compilation including textures ready check
-        Material.prototype.forceCompilation = function (mesh, options, onCompiled) {
+        Material.prototype.forceCompilation = function (mesh, onCompiled, options) {
             var _this = this;
             var subMesh = new BABYLON.BaseSubMesh();
             var scene = this.getScene();
@@ -24187,7 +24187,7 @@ var BABYLON;
                     subMesh._materialDefines._renderId = -1;
                 }
                 var alphaTestState = engine.getAlphaTesting();
-                engine.setAlphaTesting(options.alphaTest);
+                engine.setAlphaTesting(options ? options.alphaTest : _this.needAlphaTesting());
                 if (_this.isReadyForSubMesh(mesh, subMesh)) {
                     scene.unregisterBeforeRender(beforeRenderCallback);
                     if (onCompiled) {
@@ -30019,6 +30019,9 @@ var BABYLON;
             return (this.alpha < 1.0) || (this._opacityTexture != null) || this._shouldUseAlphaFromAlbedoTexture() || this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled;
         };
         PBRBaseMaterial.prototype.needAlphaTesting = function () {
+            if (this._forceAlphaTest) {
+                return true;
+            }
             if (this._linkRefractionWithTransparency) {
                 return false;
             }

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


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


+ 4 - 0
src/Materials/PBR/babylon.pbrBaseMaterial.ts

@@ -445,6 +445,10 @@
         }
 
         public needAlphaTesting(): boolean {
+            if (this._forceAlphaTest) {
+                return true;
+            }
+
             if (this._linkRefractionWithTransparency) {
                 return false;
             }

+ 2 - 2
src/Materials/babylon.material.ts

@@ -505,7 +505,7 @@
         }
 
         // Force shader compilation including textures ready check
-        public forceCompilation(mesh: AbstractMesh, options: { alphaTest: boolean }, onCompiled: (material: Material) => void): void {
+        public forceCompilation(mesh: AbstractMesh, onCompiled: (material: Material) => void, options: { alphaTest: boolean }): void {
             var subMesh = new BaseSubMesh();
             var scene = this.getScene();
             var engine = scene.getEngine();
@@ -516,7 +516,7 @@
                 }
                 
                 var alphaTestState = engine.getAlphaTesting();
-                engine.setAlphaTesting(options.alphaTest);
+                engine.setAlphaTesting(options ? options.alphaTest : this.needAlphaTesting());
                 
                 if (this.isReadyForSubMesh(mesh, subMesh)) {
                     scene.unregisterBeforeRender(beforeRenderCallback);