Explorar o código

Factor material.alpha in the global alpha value

Popov72 %!s(int64=4) %!d(string=hai) anos
pai
achega
6e4e270772
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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) {