Browse Source

Merge pull request #6092 from sebavan/master

Fix refraction define setup
sebavan 6 năm trước cách đây
mục cha
commit
e7e07d29e1
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;
     }
 
     /**