Jelajahi Sumber

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

David Catuhe 5 tahun lalu
induk
melakukan
4e614f2c78
2 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 3 0
      gui/src/3D/controls/button3D.ts
  2. 2 0
      src/Engines/thinEngine.ts

+ 3 - 0
gui/src/3D/controls/button3D.ts

@@ -124,6 +124,9 @@ export class Button3D extends AbstractButton3D {
             this._facadeTexture.rootContainer.scaleY = this._contentScaleRatio;
             this._facadeTexture.rootContainer.scaleY = this._contentScaleRatio;
             this._facadeTexture.premulAlpha = true;
             this._facadeTexture.premulAlpha = true;
         }
         }
+        else {
+            this._facadeTexture.rootContainer.clearControls();
+        }
 
 
         this._facadeTexture.addControl(value);
         this._facadeTexture.addControl(value);
 
 

+ 2 - 0
src/Engines/thinEngine.ts

@@ -2616,6 +2616,8 @@ export class ThinEngine {
             this._alphaState.reset();
             this._alphaState.reset();
 
 
             this._unpackFlipYCached = null;
             this._unpackFlipYCached = null;
+
+            this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0);
         }
         }
 
 
         this._resetVertexBufferBinding();
         this._resetVertexBufferBinding();