Texture gets little bit darker when the image is in AppleRGB ICC

I found in r139 the images of AppleRGB ICC profile get little darker while It doesn’t happen in r121.

This is the video of going back and forth between r139 and r121. This sample renders three textures of different ICC profiles: sRGB IEC61966-2.1(left), GrayScale-Gamma1.8(bottom), and Apple RGB (right).

You can see the texture of the right side flickers.

Has there been an update that respects ICC profile recently? And how can I turn it off?

They share the same material and texture properties. They only differs in image source so it shouldn’t be the encoding issue.

I don’t think three.js or WebGL itself have ever had support for custom ICC profiles. As detailed in the color management docs, we support sRGB and Linear-sRGB color spaces. For correct conversions you’ll need to set texture.encoding and renderer.outputEncoding to one of those two.

three.js r137 added changes in how the sRGB/Linear-sRGB conversions are implemented (see WebGLRenderer: Remove inline sRGB decode. by Mugen87 · Pull Request #23129 · mrdoob/three.js · GitHub), moving the decode/encode into the WebGL API, but if your input textures are in neither of those color spaces then I don’t think correct behavior is well-defined here.

2 Likes