由于业务需要,我们得实现一个透明背景的ThreeJS Canvas。并通过下面的方式创建:
r = new THREE.WebGLRenderer alpha: true
当我调用render()时,它能正确输出渲染结果。不过当我添加后处理与EffectComposer之后背景却变黑了,后处理效果是正确的:
cmp = new THREE.EffectComposer r
cmp.addPass new THREE.RenderPass scene, camera
effect = new THREE.FilmPass 0.9, 2, 2048, true
effect.renderToScreen = true
cmp.addPass effect
cmp.render 3
应该怎么解决这个问题?