In my project, I have created two scenes: one for regular objects and another for clone objects with special effects using EffectComposer (BloomPass, FilmPass). I attempted to use renderer.render(scene, camera)
along with composer.render()
, but unfortunately, it did not work as expected. After some trial and error, I came up with the following solution:
var toggle = 1;
function render() {
if (toggle == 1) { renderer.render(scene, camera); toggle = 0; }
else { composer.render(); toggle = 1;
}
Can anyone suggest a better way to combine these two renderers seamlessly?