Bläddra i källkod

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

Julien Moreau-Mathis 8 år sedan
förälder
incheckning
f919989426
1 ändrade filer med 5 tillägg och 0 borttagningar
  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 = []