瀏覽代碼

Factor material.alpha in the global alpha value

Popov72 4 年之前
父節點
當前提交
6e4e270772
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Lights/Shadows/shadowGenerator.ts

+ 1 - 1
src/Lights/Shadows/shadowGenerator.ts

@@ -1134,7 +1134,7 @@ export class ShadowGenerator implements IShadowGenerator {
             }
 
             if (isTransparent && this.enableSoftTransparentShadow) {
-                effect.setFloat("softTransparentShadowSM", effectiveMesh.visibility);
+                effect.setFloat("softTransparentShadowSM", effectiveMesh.visibility * material.alpha);
             }
 
             if (shadowDepthWrapper) {