Skip to content

Commit 686e62b

Browse files
authored
Merge pull request #2509 from sebavan/DDS
Hmmmmm....
2 parents e030fda + e89a33b commit 686e62b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Tools/babylon.dds.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@
461461
dataLength = width * height * 4;
462462
var floatArray: ArrayBufferView;
463463

464-
if (engine.badOS || (!engine.getCaps().textureHalfFloat && !engine.getCaps().textureFloat)) { // Required because iOS has many issues with float and half float generation
464+
if (engine.badOS || engine.badDesktopOS || (!engine.getCaps().textureHalfFloat && !engine.getCaps().textureFloat)) { // Required because iOS has many issues with float and half float generation
465465
if (bpp === 128) {
466466
floatArray = DDSTools._GetFloatAsUIntRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, i);
467467
}
@@ -476,7 +476,7 @@
476476
else {
477477
if (bpp === 128) {
478478
floatArray = DDSTools._GetFloatRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, i);
479-
} else if (bpp === 64 && (!engine.getCaps().textureHalfFloat || engine.badDesktopOS)) { // Let's fallback to full float if not half float or false report of it...
479+
} else if (bpp === 64 && !engine.getCaps().textureHalfFloat) {
480480
floatArray = DDSTools._GetHalfFloatAsFloatRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, i);
481481

482482
info.textureType = Engine.TEXTURETYPE_FLOAT;

src/babylon.engine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@
876876
this._badOS = regexpBadOs.test(navigator.userAgent);
877877

878878
//Detect if we are running on a faulty buggy OS.
879-
var regexpBadDesktopOS = /AppleWebKit.*10.[\d] /
879+
var regexpBadDesktopOS = /AppleWebKit.*10.[\d]/
880880
//ua sniffing is the tool of the devil.
881881
this._badDesktopOS = regexpBadDesktopOS.test(navigator.userAgent);
882882

0 commit comments

Comments
 (0)