I have a multi-composer pipeline of the form:
const renderScene = new RenderPass(scene, camera); const offscreenTarget = new WebGLRenderTarget(size.width, size.height); const comp = new EffectComposer(gl, offscreenTarget); comp.renderToScreen = false; comp.addPass(renderScene); const finalComposer = new EffectComposer(gl); const radialBlurShader = new RadialBlurShader(); radialBlurShader.uniforms.strength.value = 0.08; const radialPass = new ShaderPass(radialBlurShader); const finalPass = new ShaderPass(new GaussianBlurShader()); finalPass.needsSwap = true; finalComposer.addPass(renderScene); finalComposer.addPass(radialPass); finalComposer.addPass(finalPass);
The approach is similar to what’s described in:
Notice that the renderScene pass runs once in each pipeline. But I don’t want to run the renderScene pass twice. Is there a way to retrieve the render from the first composer (comp), extract the texture from the render target, and feed that into the tDiffuse of subsequent effects?