.exr file not loading on iOS?

I’m trying to load the .exr demo from three.js examples on my iPhone, and I’m getting a black screen.

I’ve checked my developer console, and while the file does load (1.09MB in the Network tab), it just doesn’t display. Console warning says

THREE.WebGLRenderer: OES_texture_float_linear extension not supported.

Do I need to change the data type to something else like half_float? If so, how do I do this inside the EXRLoader?

Tested devices displaying the same issue:

  • iPhone 11
  • iPhone 12 Pro
  • Galaxy s10e

I’m afraid the iOS issues are caused by a broken WebGL implementation in WebKit. Certain tests of the WebGL conformance test suite are failing right now under probably all iOS devices. Unfortuntaley, it seems Apple does not care about this issue. More information right here:

1 Like

Thanks for that link. Turns out HalfFloatType works in iOS, and the EXRLoader.setDataType() method lets you set it, so it works if you do this:

let loaderEXR = new EXRLoader();

if (isIOS) {
	loaderEXR.setDataType(THREE.HalfFloatType); // Fixes bug on iOS
} else {
	loaderEXR.setDataType(THREE.FloatType);  // this is the default
}
2 Likes

I bumped into an error on iOS 14 that complaints about missing support for getBigInt64

TypeError: t.getBigInt64 is not a function

Anyone idea how to get around this error now that UnsignedByteType is not supported? I have to downgrade to version 135 otherwise. Or is it possible to add a polyfill for getBigInt64?

Downgrade to 135 plus using a different compression than dwa compression works. Then there is no call to parseInt64(). From 136 there is a call that triggers the error iOS 14 (three.js/EXRLoader.js at 71a8dca5329b1f275fbd32e7ab202e145bfe89a9 · mrdoob/three.js · GitHub)

edit: The issue with getBigInt64 has been adressed and will be available in r137

1 Like