Browse Source

Fix Refraction Matrix

Sebastien Vandenberghe 8 years ago
parent
commit
0854a0bdd0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Materials/PBR/babylon.pbrBaseMaterial.ts

+ 2 - 2
src/Materials/PBR/babylon.pbrBaseMaterial.ts

@@ -1081,10 +1081,10 @@
 
                         var refractionTexture = this._getRefractionTexture();
                         if (refractionTexture && StandardMaterial.RefractionTextureEnabled) {
+                            this._uniformBuffer.updateMatrix("refractionMatrix", refractionTexture.getReflectionTextureMatrix());
+
                             var depth = 1.0;
                             if (!refractionTexture.isCube) {
-                                this._uniformBuffer.updateMatrix("refractionMatrix", refractionTexture.getReflectionTextureMatrix());
-
                                 if ((<any>refractionTexture).depth) {
                                     depth = (<any>refractionTexture).depth;
                                 }