Browse Source

Factor material.alpha in the global alpha value

Popov72 4 năm trước cách đây
mục cha
commit
6e4e270772
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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) {