Sebastien Vandenberghe vor 8 Jahren
Ursprung
Commit
e89a33bb03
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 2 2
      src/Tools/babylon.dds.ts
  2. 1 1
      src/babylon.engine.ts

+ 2 - 2
src/Tools/babylon.dds.ts

@@ -461,7 +461,7 @@
                             dataLength = width * height * 4;
                             var floatArray: ArrayBufferView;
 
-                            if (engine.badOS || (!engine.getCaps().textureHalfFloat && !engine.getCaps().textureFloat)) { // Required because iOS has many issues with float and half float generation
+                            if (engine.badOS || engine.badDesktopOS || (!engine.getCaps().textureHalfFloat && !engine.getCaps().textureFloat)) { // Required because iOS has many issues with float and half float generation
                                 if (bpp === 128) {
                                     floatArray = DDSTools._GetFloatAsUIntRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, i);                                    
                                 }
@@ -476,7 +476,7 @@
                             else {
                                 if (bpp === 128) {
                                     floatArray = DDSTools._GetFloatRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, i);
-                                } else if (bpp === 64 && (!engine.getCaps().textureHalfFloat || engine.badDesktopOS)) { // Let's fallback to full float if not half float or false report of it...
+                                } else if (bpp === 64 && !engine.getCaps().textureHalfFloat) {
                                     floatArray = DDSTools._GetHalfFloatAsFloatRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, i);
 
                                     info.textureType = Engine.TEXTURETYPE_FLOAT;

+ 1 - 1
src/babylon.engine.ts

@@ -876,7 +876,7 @@
             this._badOS = regexpBadOs.test(navigator.userAgent);
 
             //Detect if we are running on a faulty buggy OS.
-            var regexpBadDesktopOS = /AppleWebKit.*10.[\d] /
+            var regexpBadDesktopOS = /AppleWebKit.*10.[\d]/
             //ua sniffing is the tool of the devil.
             this._badDesktopOS = regexpBadDesktopOS.test(navigator.userAgent);