# How I can use OutlineEffect and EffectComposer?

**URL:** <https://discourse.threejs.org/t/how-i-can-use-outlineeffect-and-effectcomposer/25876>\
**Category:** Questions\
**Tags:** outline, effect-composer\
**Created:** [May 2, 2021, 3:03am UTC](https://discourse.threejs.org/t/how-i-can-use-outlineeffect-and-effectcomposer/25876 "2021-05-02T03:03:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MixTeR](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mixter/32/26747_2.png) [@MixTeR](https://discourse.threejs.org/u/MixTeR)\
**Post date:** [May 2, 2021, 3:03am UTC](https://discourse.threejs.org/t/how-i-can-use-outlineeffect-and-effectcomposer/25876/1 "2021-05-02T03:03:19Z")

</div>

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 🙂  
Sorry for my English. I’m still learning it.

---

<div class="post-metadata">

**Author:** ![mjurczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mjurczyk/32/10995_2.png) [@mjurczyk](https://discourse.threejs.org/u/mjurczyk)\
**Post date:** [May 2, 2021, 11:03am UTC](https://discourse.threejs.org/t/how-i-can-use-outlineeffect-and-effectcomposer/25876/2 "2021-05-02T11:03:28Z")

</div>

For the future - cases 1 & 2 you should be able to solve / merge together by disabling some or all [autoClear options](https://threejs.org/docs/index.html?q=webglren#api/en/renderers/WebGLRenderer.autoClear) on the second render callee (if you render second call with effect composer, you should disable clearing on [RenderPass](https://github.com/mrdoob/three.js/blob/927d8018adc0e915aa57d5e4882d8fc8e2718222/examples/jsm/postprocessing/RenderPass.js#L20) instead.) But, in this case, it probably won’t solve your actual issue.

As for how to actually solve the issue - maybe [this](https://discourse.threejs.org/t/ldraw-like-edges/17100) would help 👀 (if you don’t want postprocessing outlines) ?

---

<div class="post-metadata">

**Author:** ![MixTeR](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mixter/32/26747_2.png) [@MixTeR](https://discourse.threejs.org/u/MixTeR)\
**Post date:** [May 4, 2021, 11:33pm UTC](https://discourse.threejs.org/t/how-i-can-use-outlineeffect-and-effectcomposer/25876/3 "2021-05-04T23:33:42Z")

</div>

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
