Browse Source

Fix refraction define setup

sebavan 6 năm trước cách đây
mục cha
commit
8a422475e0
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/Materials/PBR/pbrSubSurfaceConfiguration.ts

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

@@ -366,7 +366,7 @@ export class PBRSubSurfaceConfiguration {
             return this._refractionTexture;
         }
 
-        if (this._linkRefractionWithTransparency) {
+        if (this._isRefractionEnabled) {
             return scene.environmentTexture;
         }
 
@@ -377,7 +377,7 @@ export class PBRSubSurfaceConfiguration {
      * Returns true if alpha blending should be disabled.
      */
     public get disableAlphaBlending(): boolean {
-        return this._linkRefractionWithTransparency;
+        return this.isRefractionEnabled && this._linkRefractionWithTransparency;
     }
 
     /**