Renderer sRGBEncoding won't work with my own skybox shader

Hi, I’m using RGBELoader to load HDR texture and use it as the source of my custom skybox shader.

I didn’t use a cubemap like the standard Three.js example but sampled each pixel from equirectangular texture using spherical coordinate.

As far as I understand setting renderer.outputEncoding = THREE.sRGBEncoding should make the trick to correct the overall gamma of the whole canvas regardless to what shader I’m using.

However, it’s turn out didn’t work.
Am I misunderstanding how the renderer.outputEncoding works?


Some visualize samples here:

  1. Using my own skybox shader with THREE.sRGBEncoding:

  2. Using official RGBELoader example without THREE.sRGBEncoding:

  3. Using official RGBELoader example with THREE.sRGBEncoding:

As you can see first and second have the same gamma shade.
There is no tone mapping involved in any samples.

I think I encountered the same issue like this one.

So renderer.outputEncoding doesn’t work with post-process…
In my case, I didn’t use Three.js’s post-process but my own full-screen fragment shader.

It’s worked now by manually applying LinearTosRGB after every process.