How I can use OutlineEffect and EffectComposer?

Hi, I just started to learn Threejs. I used a loader called MMDLoader and I put OutlineEffect. But now Im trying to figure how I can use effectComposer effects without lose OutlineEffect (Im talking about the OutlineEffect class NO the OutlinePass).

attempts that didnt worked for me:

CASE 1
this.effectComposer.render();
this.effect.render( this.scene, this.camera);

RESULT: Only OutlineEffect work

CASE 2
this.effect.render( this.scene, this.camera);
this.effectComposer.render();

RESULT: Only EffectPasses work (NOT OutlineEffect)

CASE 3 .- Im trying to emulate the source code from a old working example (OutlineEffect + unrealBloom)

So:

this.effect.render( this.scene, this.camera, this.effectComposer.readBuffer );
this.effectComposer.render();

RESULT: Same as case 2, but now I also got a infinite warnings:

“OutlineEffect.js:440 THREE.OutlineEffect.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead”

I dont know what that means or how fix that.

Any help will be appreciate :slight_smile:
Sorry for my English. I’m still learning it.

For the future - cases 1 & 2 you should be able to solve / merge together by disabling some or all autoClear options on the second render callee (if you render second call with effect composer, you should disable clearing on RenderPass instead.) But, in this case, it probably won’t solve your actual issue.

As for how to actually solve the issue - maybe this would help :eyes: (if you don’t want postprocessing outlines) ?

Hi mjurczyk, thanks for answer. I disabled autoClear in outlineEffect from the instance variable (this.effect.autoClear=false), but nothing happens, same from the instance variable for RenderPass (this.rpass.clear=false). Infact I tested every posible combination and the only time I get a diferent result was when I disabled autoClearColor/ and/ or the autoClearDepth from renderer.

this.renderer = new THREE.WebGLRenderer( { antialias: true } );
this.renderer.autoClearColor= false;

but it was a complety mess; I got ugly motions trail effect and the effects just not working well