Преглед на файлове

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) {