Parcourir la source

avoid depth texture error when material needs alpha testing but doesnt have alpha texture

Trevor Baron il y a 7 ans
Parent
commit
6283bf2a8a
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/Rendering/babylon.depthRenderer.ts

+ 1 - 1
src/Rendering/babylon.depthRenderer.ts

@@ -133,7 +133,7 @@
             var mesh = subMesh.getMesh();
 
             // Alpha test
-            if (material && material.needAlphaTesting()) {
+            if (material && material.needAlphaTesting() && material.getAlphaTestTexture()) {
                 defines.push("#define ALPHATEST");
                 if (mesh.isVerticesDataPresent(VertexBuffer.UVKind)) {
                     attribs.push(VertexBuffer.UVKind);