瀏覽代碼

Fix Env from Image Bitmap

sebavan 4 年之前
父節點
當前提交
7a6f894d30
共有 1 個文件被更改,包括 1 次插入1 次删除
  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
                         // Uncompress the data to a RTT
                         rgbdPostProcess!.onApply = (effect) => {
                         rgbdPostProcess!.onApply = (effect) => {
                             effect._bindTexture("textureSampler", tempTexture);
                             effect._bindTexture("textureSampler", tempTexture);
-                            effect.setFloat2("scale", 1, 1);
+                            effect.setFloat2("scale", 1, (image instanceof ImageBitmap) ? -1 : 1);
                         };
                         };
 
 
                         if (!engine.scenes.length) {
                         if (!engine.scenes.length) {