我想将整个场景做灰度处理,因为我想把它作为基础效果对切换其它后处理效果时作为中间的过渡效果。应用灰度后处理时渲染效果是正确的,
var effectColorify,
copyPass;
effectColorify = new THREE.ShaderPass(THREE.ColorifyShader);
effectColorify.uniforms['color'].value.setRGB(0.8, 0.8, 0.8); // Grayscale
copyPass = new THREE.ShaderPass(THREE.CopyShader);
copyPass.renderToScreen = true;
this.composerGrayscale = new THREE.EffectComposer(this.engine.renderer);
this.composerGrayscale.addPass(this.renderPass);
this.composerGrayscale.addPass(effectColorify);
this.composerGrayscale.addPass(copyPass);
但是没法做到淡入淡出,我想应该加个透明度调整的对应接口,但是具体怎么做我心里没底。