EXRLoader ‘out is not defined’ line 359

I get the mentioned error when I use the EXRLoader to load the following file:


There are two parts of this issue. First is the file itself. It’s an old file at the company I’m working at and I’m currently investigating how it was made. I think it was converted from this file: http://hdrmaps.com/glazed-patio. It does load in other applications that support .exr files (such as Substance Painter). It’s a valid file, but something about how it was compressed isn’t handled by the EXRLoader. I did do an experiment where I re-exported this file as an uncompressed exr and that loads fine with the EXRLoader. I’ll report back if I can discover exactly how this .exr file was compressed.

Second is the code. That out variable just isn’t defined in the js file. There is another variable, oe, which also isn’t defined. I’m not familiar with the .exr format so I’m not sure what that code should be doing. I guessed that out was supposed to be the outBuffer, but then a few lines down the code assigns ‘s’ to the -1st element of the array. It looks like this code isn’t finished? I’m mostly reporting this issue to point that out.

Three.js version
  • Dev
  • r92
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Tested on a 2016 MacBook Pro with a Radeon Pro 560

Author: Fantashit

3 thoughts on “EXRLoader ‘out is not defined’ line 359

  1. Seems glazed_patio.exr.zip is PIZ Wavelet compressed, there is some basic support for that compression, although there are a lot of untested edge cases. Will take a closer look.

  2. screen shot 2018-05-17 at 3 18 42 pm

    Kind of a fun update 🤣You can see I’ve nearly got it working, but obviously need another hour of debugging!

Comments are closed.