Why postprocessing is removed from camera?

My setup: 1 scene, 2 cameras, firstcam has postprocessing effect, and renderTarget to a texture to be seen by the other main camera.
But firstcam postprocessing is not visible in the resulting renderTarget texture.

Roughly, what is working (without postprocessing, I followed Three.js Render Targets):

renderTarget = new THREE.WebGLRenderTarget(512,512)
renderer.render(scene, firstcam)

And what is NOT working (added among code above):

var custom = new ShaderPass(effect);
custom.renderToScreen = true;
firstcam.composer.render(renderer, scene, firstcam, 0.01);

When custom is applied to the main camera, it works fine though.
When applied to the camera used to render to target, it is ignored.

I read [Solved] How can I render a shader to a render target? - #7 by Nipson but I’d need more code to wrap my head around.

Would you please share a fiddle or codepen to understand how to use camera (or renderTarget texture) postprocessing as a texture?
Thank you very much

This is not the signature of EffectComposer.render(). It only has a single parameter deltaTime.

Besides, setting renderToScreen to true is not necessary anymore. The last pass in the pass chain is automatically rendered to screen.

Thank you very much for your reply @Mugen87 .

May I ask you for a link of an example of post-processed camera-to-texture seen by another camera?

TBH, I don’t not really understand what you are looking for but I hope the following example meets your requirements: three.js webgl - render-to-texture

1 Like

Thanks again @Mugen87
Eventually, my problem is similar to Postprocessing on a WebGLRenderTargets