Can outline pass be used to render outlines only, without a render pass?


I tried playing around with the example here:

It seems to me, if I remove the “composer.addPass( renderPass );” code line, then the outpass lines don’t get cleared whenever I rotate the camera.
I tried calling composer.renderer.clear() before the render() call, that didn’t help either.

Am I doing something wrong? My goal is to render only the outlines of the objects.

Thank you for your help in advance!

This has no effect when using EffectComposer since the internal render targets are not used at the moment when you call clear(). The solution is do add an instance of ClearPass instead of RenderPass. Meaning:

const clearPass = new ClearPass();
composer.addPass( clearPass );

This replaces the clear operation which is done by RenderPass by default.


Thank you, it solved it! :slight_smile: