I tried to upgrade to r112, but I had the surprise to see my rendering being much darker than with r111. I used to have gammaInput and gammaOutput set to true. I set outputEncoding to THREE.GammaEncoding but it doesn’t change anything. I tried to fiddle with gammaFactor to no avail either.
I found the problem. I’m using an EffectComposer, and I don’t have a GammaCorrection pass. Now I’m not sure why it was not a problem before and it is now…
Gamma correction should not automatically happen before post-processing is performed. Hence, you usually want to apply gamma correction at the end of your pass chain. R112 ensures that this workflow is enforced now. The old behavior was just wrong.
So using a gamma correction pass is the correct approach.
Also note that renderer.outputEncoding = THREE.sRGBEncoding should be preferred over GammaEncoding. Assuming you had a gamma factor of 2.2 before, they should be extremely similar.
I’m having a different problem now. It seems as soon as I render one frame without the EffectComposer, I don’t need the GammaCorrection pass anymore. If I disable my post processing pipeline then re-enable it, it will render a more pale image.
If I disable the GammaCorrection, it will first render too dark, then if I disable and re-enable the post processing it will render with gamma correction, even with the pass disabled.
What’s happening here ?
EDIT: if I do render only one frame without the EffectComposer first, then use the EffectComposer, then I have just some elements that render correctly and the rest render too pale.