Browse Source

Fix wrong volumeIndexOfRefraction after cloning

Popov72 5 năm trước cách đây
mục cha
commit
615677d4c2

+ 1 - 1
src/Materials/PBR/pbrSubSurfaceConfiguration.ts

@@ -154,6 +154,7 @@ export class PBRSubSurfaceConfiguration {
     @expandToProperty("_markAllSubMeshesAsTexturesDirty")
     @expandToProperty("_markAllSubMeshesAsTexturesDirty")
     public indexOfRefraction = 1.5;
     public indexOfRefraction = 1.5;
 
 
+    @serialize()
     private _volumeIndexOfRefraction = -1.0;
     private _volumeIndexOfRefraction = -1.0;
 
 
     /**
     /**
@@ -163,7 +164,6 @@ export class PBRSubSurfaceConfiguration {
      * This ONLY impacts refraction. If not provided or given a non-valid value,
      * This ONLY impacts refraction. If not provided or given a non-valid value,
      * the volume will use the same IOR as the surface.
      * the volume will use the same IOR as the surface.
      */
      */
-    @serialize()
     @expandToProperty("_markAllSubMeshesAsTexturesDirty")
     @expandToProperty("_markAllSubMeshesAsTexturesDirty")
     public get volumeIndexOfRefraction(): number {
     public get volumeIndexOfRefraction(): number {
         if (this._volumeIndexOfRefraction >= 1.0) {
         if (this._volumeIndexOfRefraction >= 1.0) {