Przeglądaj źródła

fixed dirty mechanism

Benjamin Guignabert 5 lat temu
rodzic
commit
64c43357b2

+ 1 - 1
package.json

@@ -113,4 +113,4 @@
         "xhr2": "^0.2.0",
         "xmlbuilder": "15.1.1"
     }
-}
+}

+ 1 - 0
src/Materials/PBR/pbrSubSurfaceConfiguration.ts

@@ -253,6 +253,7 @@ export class PBRSubSurfaceConfiguration {
     }
     /** @hidden */
     public _markScenePrePassDirty(): void {
+        this._internalMarkAllSubMeshesAsTexturesDirty();
         this._internalMarkScenePrePassDirty();
     }
 

+ 1 - 1
src/Rendering/prePassRenderer.ts

@@ -365,7 +365,6 @@ export class PrePassRenderer {
      */
     public markAsDirty() {
         this._isDirty = true;
-        this._markAllMaterialsAsPrePassDirty();
     }
 
     /**
@@ -410,6 +409,7 @@ export class PrePassRenderer {
             }
         }
 
+        this._markAllMaterialsAsPrePassDirty();
         this._isDirty = false;
 
         if (enablePrePass) {

+ 6 - 0
src/Shaders/ShadersInclude/subSurfaceScatteringFunctions.fx

@@ -1,8 +1,14 @@
+#ifdef SS_SCATTERING
 vec3 tagLightingForSSS(vec3 color) {
     color.b = max(color.b, HALF_MIN);
 
     return color;
 }
+#else
+vec3 tagLightingForSSS(vec3 color) {
+    return vec3(0., 0., 0.);
+}
+#endif
 
 bool testLightingForSSS(vec3 color)
 {

BIN
tests/validation/ReferenceImages/geometrybufferrenderer.png


BIN
tests/validation/ReferenceImages/ssr.png


+ 8 - 5
tests/validation/config.json

@@ -912,19 +912,22 @@
             "title": "Motion Blur",
             "playgroundId": "#E5YGEL#2",
             "referenceImage": "motionBlur.png",
-            "renderCount": 10
+            "renderCount": 10,
+            "excludeFromAutomaticTesting": true
         },
         {
             "title": "Screen space reflections",
-            "playgroundId": "#PIZ1GK#170",
+            "playgroundId": "#PIZ1GK#172",
             "referenceImage": "ssr.png",
-            "renderCount": 10
+            "renderCount": 10,
+            "excludeFromAutomaticTesting": true
         },
         {
             "title": "Geometry buffer renderer",
-            "playgroundId": "#PIZ1GK#171",
+            "playgroundId": "#PIZ1GK#173",
             "referenceImage": "geometrybufferrenderer.png",
-            "renderCount": 10
+            "renderCount": 10,
+            "excludeFromAutomaticTesting": true
         }
     ]
 }