Przeglądaj źródła

Fix Env from Image Bitmap

sebavan 4 lat temu
rodzic
commit
7a6f894d30
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/Misc/environmentTextureTools.ts

+ 1 - 1
src/Misc/environmentTextureTools.ts

@@ -375,7 +375,7 @@ export class EnvironmentTextureTools {
                         // Uncompress the data to a RTT
                         rgbdPostProcess!.onApply = (effect) => {
                             effect._bindTexture("textureSampler", tempTexture);
-                            effect.setFloat2("scale", 1, 1);
+                            effect.setFloat2("scale", 1, (image instanceof ImageBitmap) ? -1 : 1);
                         };
 
                         if (!engine.scenes.length) {