瀏覽代碼

Merge pull request #5038 from sebavan/master

Fix Validation Tests state caching
sebavan 7 年之前
父節點
當前提交
8583bd8908
共有 4 個文件被更改,包括 4 次插入2 次删除
  1. 2 1
      src/Engine/babylon.engine.ts
  2. 二進制
      tests/validation/ReferenceImages/edges.png
  3. 1 1
      tests/validation/config.json
  4. 1 0
      tests/validation/validation.js

+ 2 - 1
src/Engine/babylon.engine.ts

@@ -3875,7 +3875,6 @@
                 return;
             }
             this._currentEffect = null;
-            this._unpackFlipYCached = null;
             this._viewportCached.x = 0;
             this._viewportCached.y = 0;
             this._viewportCached.z = 0;
@@ -3889,6 +3888,8 @@
                 this._depthCullingState.reset();
                 this.setDepthFunctionToLessOrEqual();
                 this._alphaState.reset();
+
+                this._unpackFlipYCached = null;
             }
 
             this._resetVertexBufferBinding();

二進制
tests/validation/ReferenceImages/edges.png


+ 1 - 1
tests/validation/config.json

@@ -538,7 +538,7 @@
     },
     {
       "title": "Edges",
-      "playgroundId": "#TYAHX#113",
+      "playgroundId": "#TYAHX#114",
       "referenceImage": "edges.png"
     },
     {

+ 1 - 0
tests/validation/validation.js

@@ -126,6 +126,7 @@ function evaluate(test, resultCanvas, result, renderImage, index, waitRing, done
     var renderB64 = saveRenderImage(renderData, canvas);
     renderImage.src = renderB64;
 
+    engine.applyStates();
     currentScene.dispose();
     currentScene = null;
     engine.setHardwareScalingLevel(1);