简体   繁体   中英

three.js EffectComposer's render target

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM