参考资料
修正postprocessing导致的颜色空间问题
问题
在项目中使用 OutlinePass 时候,发现场景变暗。
问题点
linear颜色空间 和 sRGB颜色空间的问题。
解决办法
使用threejs的GammaCorrectionShader。
this.effectComposer.addPass(this.renderPass);
// 伽马纠正放在 renderPass 之后
const gammaCorrectionShader = new ShaderPass(GammaCorrectionShader);
this.effectComposer.addPass(gammaCorrectionShader);