Explorar o código

Merge pull request #7625 from Popov72/pbr-misc

Fix subSurface parameters not copied in the PBR clone methods
David Catuhe %!s(int64=5) %!d(string=hai) anos
pai
achega
f7bdc461bb

+ 1 - 0
dist/preview release/what's new.md

@@ -333,6 +333,7 @@
 - Prevent depth buffer clear in shadow maps ([Sebavan](https://github.com/sebavan/)
 - Fix for bug where the light gizmo causes lights to flip orientation ([#7603](https://github.com/BabylonJS/Babylon.js/issues/7603)) ([drigax](https://github.com/drigax))
 - Fix for bug where directional lights are inverted when using a right handed scene coordinate system. ([drigax](https://github.com/drigax))
+- Fix subSurface parameters not copied in the PBR clone methods ([Popov72](https://github.com/Popov72))
 
 ## Breaking changes
 

+ 1 - 0
src/Materials/PBR/pbrMaterial.ts

@@ -738,6 +738,7 @@ export class PBRMaterial extends PBRBaseMaterial {
         this.anisotropy.copyTo(clone.anisotropy);
         this.brdf.copyTo(clone.brdf);
         this.sheen.copyTo(clone.sheen);
+        this.subSurface.copyTo(clone.subSurface);
 
         return clone;
     }

+ 1 - 0
src/Materials/PBR/pbrMetallicRoughnessMaterial.ts

@@ -91,6 +91,7 @@ export class PBRMetallicRoughnessMaterial extends PBRBaseSimpleMaterial {
         this.anisotropy.copyTo(clone.anisotropy);
         this.brdf.copyTo(clone.brdf);
         this.sheen.copyTo(clone.sheen);
+        this.subSurface.copyTo(clone.subSurface);
 
         return clone;
     }

+ 1 - 0
src/Materials/PBR/pbrSpecularGlossinessMaterial.ts

@@ -81,6 +81,7 @@ export class PBRSpecularGlossinessMaterial extends PBRBaseSimpleMaterial {
         this.anisotropy.copyTo(clone.anisotropy);
         this.brdf.copyTo(clone.brdf);
         this.sheen.copyTo(clone.sheen);
+        this.subSurface.copyTo(clone.subSurface);
 
         return clone;
     }