Browse Source

fix for r114

Gregg Tavares 5 years ago
parent
commit
95f0717197

+ 7 - 0
threejs/threejs-postprocessing-3dlut-identity.html

@@ -142,6 +142,13 @@ function main() {
       const root = gltf.scene;
       scene.add(root);
 
+      // fix materials from r114
+      root.traverse(({material}) => {
+        if (material) {
+          material.depthWrite = true;
+        }
+      });
+
       root.updateMatrixWorld();
       // compute the box that contains all the stuff
       // from root and below

+ 7 - 0
threejs/threejs-postprocessing-3dlut-prep.html

@@ -92,6 +92,13 @@ function main() {
       const root = gltf.scene;
       scene.add(root);
 
+      // fix materials from r114
+      root.traverse(({material}) => {
+        if (material) {
+          material.depthWrite = true;
+        }
+      });
+
       // compute the box that contains all the stuff
       // from root and below
       const box = new THREE.Box3().setFromObject(root);

+ 7 - 0
threejs/threejs-postprocessing-3dlut-w-loader.html

@@ -230,6 +230,13 @@ function main() {
       const root = gltf.scene;
       scene.add(root);
 
+      // fix materials from r114
+      root.traverse(({material}) => {
+        if (material) {
+          material.depthWrite = true;
+        }
+      });
+
       root.updateMatrixWorld();
       // compute the box that contains all the stuff
       // from root and below

+ 7 - 0
threejs/threejs-postprocessing-3dlut.html

@@ -213,6 +213,13 @@ function main() {
       const root = gltf.scene;
       scene.add(root);
 
+      // fix materials from r114
+      root.traverse(({material}) => {
+        if (material) {
+          material.depthWrite = true;
+        }
+      });
+
       root.updateMatrixWorld();
       // compute the box that contains all the stuff
       // from root and below