Tone-mapping options for .HDR image in r147?

I create equirectangular .hdr images in Maya for use as environment maps in ThreeJS. These allow me to create complex lighting and match its appearance exactly in ThreeJS. I’m migrating from r129 to r147, and my textures are coming in differently. It seems that ThreeJS now forces HDR images to be read as sRGB-encoded?

HDR images rendered correctly as Linear/Raw color in r129, closely matching Maya’s and Photoshop’s display:
image

HDR images rendered way wrong by ThreeJS in 147, and pretty closely matched in Maya by having it interpret them as sRGB:
image

I see that in the HDR example, ReinhardToneMapping is applied to the renderer, but this actually doesn’t match the proper appearance of the .hdr file as it would appear in other rendering environments:


(comparison between the .hdr file on its own, and the file as-rendered in the demo. Correct color is upper left, ThreeJS’ display is lower right.)

My best match using Reinhard:
image
Reinhard makes the image too saturated and higher-contrast, even when the overall luminance is a close match. Actually, the deficiencies here are the opposite of what is seen with the previous image, where Three’s version is lower-contrast and lower-saturation, meaning that if one asset looks right under Reinhard mapping then other assets probably look wrong. (I also had to use an exposure value of 5 here, whereas the official demo only uses 2)

Also, although the two look similar when viewed as images, applying them as envMaps shows a radical difference in brightness:
image

ReinhardToneMapping gets close, but it’s not as correct as just reading the HDR files as Linear in the first place.

I’ve experimented with as many variations of texture.encoding = THREE.LinearEncoding; as I can think of, and none of them have made any difference in how the texture displays. Is this flag ignored? Is there a way to correct this that I’ve missed?

This seems to happen with all HalfFloat DataTextures.

three.js does not force this. texture.encoding sets the choice between sRGB and Linear for 8-bit textures. But I don’t think that float16 and float32 .HDR textures support anything other than THREE.LinearEncoding in WebGL.

ReinhardToneMapping is applied to the renderer, but this actually doesn’t match the proper appearance of the .hdr file … ReinhardToneMapping gets close, but it’s not as correct as just reading the HDR files as Linear in the first place.

There’s a huge range of “correct” ways to define the image formation pipeline, tone mapping is a technical and design choice. Does Maya have a tone mapping option enabled? In Blender this would be called the “View Transform” and the default is a particular Filmic tone mapping that three.js does not specifically support.

A demo and example .HDR would be much more helpful than screenshots, if possible. I assume you are using PMREMGenerator when assigning .envMap ?