.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:

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