Forráskód Böngészése

Merge pull request #9375 from Popov72/fix-lod-rtt

Add validation test for CSM shadows and LODs
David Catuhe 4 éve
szülő
commit
34675771d4

BIN
tests/validation/ReferenceImages/shadowscsmandlod.png


+ 6 - 0
tests/validation/config.json

@@ -952,6 +952,12 @@
             "referenceImage": "shadowsandlod.png"
         },
         {
+            "title": "Shadows CSM and LODs",
+            "playgroundId": "#24HWT9#0",
+            "referenceImage": "shadowscsmandlod.png",
+            "excludedEngines": ["webgl1"]
+        },
+        {
             "title": "Glow layer and LODs",
             "playgroundId": "#UNS6ZV#2",
             "referenceImage": "glowlayerandlods.png"

+ 7 - 0
tests/validation/validation.js

@@ -160,6 +160,13 @@ function runTest(index, done) {
         done(false);
     }
 
+    const excludedEngines = config.tests[index].excludedEngines;
+    const webgl1 = !!window.disableWebGL2Support;
+    if (Array.isArray(excludedEngines) && (webgl1 && excludedEngines.indexOf("webgl1") >= 0 || !webgl1 && excludedEngines.indexOf("webgl2") >= 0)) {
+        done(true);
+        return;
+    }
+
     // Clear the plugin activated observables in case it is registered in the test.
     BABYLON.SceneLoader.OnPluginActivatedObservable.clear();