浏览代码

If not webgl 2, force power of two for multiple render targets

Julien Moreau-Mathis 8 年之前
父节点
当前提交
f919989426
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/babylon.engine.ts

+ 5 - 0
src/babylon.engine.ts

@@ -3155,6 +3155,11 @@
             var width = size.width || size;
             var height = size.height || size;
 
+            if (this.webGLVersion < 2) {
+                width = Tools.GetExponentOfTwo(width, this._caps.maxTextureSize);
+                height = Tools.GetExponentOfTwo(height, this._caps.maxTextureSize);
+            }
+
             var textures = [];
             var attachments = []