Explorar o código

Fixing bugs when sprites, postprocesses and bounding boxes renderers are used together

David Catuhe %!s(int64=10) %!d(string=hai) anos
pai
achega
6de0ac8153

+ 1 - 0
Babylon/Sprites/babylon.spriteManager.js

@@ -107,6 +107,7 @@ var BABYLON;
             // VBOs
             engine.bindBuffers(this._vertexBuffer, this._indexBuffer, this._vertexDeclaration, this._vertexStrideSize, effect);
             // Draw order
+            engine.setDepthFunctionToLessOrEqual();
             effect.setBool("alphaTest", true);
             engine.setColorWrite(false);
             engine.draw(true, 0, max * 6);

+ 1 - 0
Babylon/Sprites/babylon.spriteManager.ts

@@ -148,6 +148,7 @@
             engine.bindBuffers(this._vertexBuffer, this._indexBuffer, this._vertexDeclaration, this._vertexStrideSize, effect);
 
             // Draw order
+            engine.setDepthFunctionToLessOrEqual();
             effect.setBool("alphaTest", true);
             engine.setColorWrite(false);
             engine.draw(true, 0, max * 6);

+ 1 - 1
Babylon/babylon.node.js

@@ -60,7 +60,7 @@ var BABYLON;
                 this._parentRenderId = this.parent._currentRenderId;
                 return false;
             }
-            return this.parent._currentRenderId <= this._currentRenderId && this.parent.isSynchronized();
+            return this.parent.isSynchronized();
         };
         Node.prototype.isSynchronized = function (updateCache) {
             var check = this.hasNewParent();

+ 1 - 1
Babylon/babylon.node.ts

@@ -86,7 +86,7 @@
                 return false;
             }
 
-            return this.parent._currentRenderId <= this._currentRenderId && this.parent.isSynchronized();
+            return this.parent.isSynchronized();
         }
 
         public isSynchronized(updateCache?: boolean): boolean {

+ 2 - 1
babylon.2.1-alpha.debug.js

@@ -5616,7 +5616,7 @@ var __extends = this.__extends || function (d, b) {
                 this._parentRenderId = this.parent._currentRenderId;
                 return false;
             }
-            return this.parent._currentRenderId <= this._currentRenderId && this.parent.isSynchronized();
+            return this.parent.isSynchronized();
         };
         Node.prototype.isSynchronized = function (updateCache) {
             var check = this.hasNewParent();
@@ -16061,6 +16061,7 @@ var BABYLON;
             // VBOs
             engine.bindBuffers(this._vertexBuffer, this._indexBuffer, this._vertexDeclaration, this._vertexStrideSize, effect);
             // Draw order
+            engine.setDepthFunctionToLessOrEqual();
             effect.setBool("alphaTest", true);
             engine.setColorWrite(false);
             engine.draw(true, 0, max * 6);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 12 - 11
babylon.2.1-alpha.js