Reputation: 827
I know that when we use an EffectComposer the scene is rendered into composer.renderTarget2 or composer.renderTarget1. In this example I read this :
renderer.render( scene, camera, composer.renderTarget2, true );
renderer.shadowMapEnabled = false;
depthPassPlugin.enabled = false;
// do postprocessing
composer.render( 0.1 );
So what is the effect of the first line ? The scene is rendered into composer.renderTarget2 but how renderTarget2 is used then ?
Thanks.
Upvotes: 0
Views: 4509
Reputation: 1647
renderTarget2 is a WebGLRenderTarget which specified the filter to use. Then the rendering runs the composer's passes.
useful example: http://bkcore.com/blog/3d/webgl-three-js-animated-selective-glow.html
Upvotes: 0