David `Deltakosh` Catuhe 5 年之前
父節點
當前提交
80ab7a1fb9
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/Lights/Shadows/shadowGenerator.ts

+ 5 - 0
src/Lights/Shadows/shadowGenerator.ts

@@ -1330,6 +1330,11 @@ export class ShadowGenerator implements IShadowGenerator {
             if (material && material.needAlphaTesting()) {
                 var alphaTexture = material.getAlphaTestTexture();
                 if (alphaTexture) {
+
+                    if (!alphaTexture.isReady()) {
+                        return false;
+                    }
+
                     defines.push("#define ALPHATEST");
                     if (mesh.isVerticesDataPresent(VertexBuffer.UVKind)) {
                         attribs.push(VertexBuffer.UVKind);