# Combine OutlinePass and multisampled WebGLRenderTarget

**URL:** <https://discourse.threejs.org/t/combine-outlinepass-and-multisampled-webglrendertarget/86482>\
**Category:** Questions\
**Tags:** effectcomposer, outlinepass, webglrendertarget, antialiasing\
**Created:** [August 22, 2025, 10:24am UTC](https://discourse.threejs.org/t/combine-outlinepass-and-multisampled-webglrendertarget/86482 "2025-08-22T10:24:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eisenbert](https://avatars.discourse-cdn.com/v4/letter/e/65b543/32.png) [@Eisenbert](https://discourse.threejs.org/u/Eisenbert)\
**Post date:** [August 22, 2025, 10:24am UTC](https://discourse.threejs.org/t/combine-outlinepass-and-multisampled-webglrendertarget/86482/1 "2025-08-22T10:24:32Z")

</div>

Hello, by using multisampled render target for EffectComposer my scene renders really nice… except for the OutlinePass, which has no anti aliasing at all (see screenshot below). I tried adding SMAAPass and/or FXAAPass after OutlinePass - both working together with N8AO ambient occlusion. The highlighting from OutlinePass then looks good, but other geometry worse, especially the thin white lines.

Question: Can OutlinePass somehow benefit from multisampling? Or is it possible to apply antialias pass only to OutlinePass? Are there a alternative solution to OutlinePass that also outlines hidden geometry like this but with an antialias technique? It is an animated scene with many elements so performance is also important.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/a/7/a786227e54ac5dafc2907799131d3b780f795a79.jpeg)

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [August 22, 2025, 2:22pm UTC](https://discourse.threejs.org/t/combine-outlinepass-and-multisampled-webglrendertarget/86482/2 "2025-08-22T14:22:04Z")

</div>

It looks like outlinepass creates a bunch of rendertargets internally.. perhaps you can change/adjust the resolution parameters you pass in to use a higher rez target?

> <https://github.com/mrdoob/three.js/blob/3e184cdd14494f4cea1d0faeab1046438cc5a06d/examples/jsm/postprocessing/OutlinePass.js>

( Or just copy the whole file and modify it if that’s easier )

---

<div class="post-metadata">

**Author:** ![Eisenbert](https://avatars.discourse-cdn.com/v4/letter/e/65b543/32.png) [@Eisenbert](https://discourse.threejs.org/u/Eisenbert)\
**Post date:** [August 25, 2025, 7:56am UTC](https://discourse.threejs.org/t/combine-outlinepass-and-multisampled-webglrendertarget/86482/3 "2025-08-25T07:56:15Z")

</div>

Thanks for your answer! I tried to increase the resolution as OutlinePass parameter, but can’t see any difference. Does it make sense to overload the OutlinePass in order to set the samples option of one or all of the 7 WebGLRenderTargets?

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [August 25, 2025, 8:00am UTC](https://discourse.threejs.org/t/combine-outlinepass-and-multisampled-webglrendertarget/86482/4 "2025-08-25T08:00:58Z")

</div>

Hmm i looked again and, what about changing:

```
	this.downSampleRatio = 2;

```

to 1?

.. and if not that.. then try setting .samples on all the targets?

just spitballing…

---

<div class="post-metadata">

**Author:** ![Eisenbert](https://avatars.discourse-cdn.com/v4/letter/e/65b543/32.png) [@Eisenbert](https://discourse.threejs.org/u/Eisenbert)\
**Post date:** [August 25, 2025, 8:17am UTC](https://discourse.threejs.org/t/combine-outlinepass-and-multisampled-webglrendertarget/86482/5 "2025-08-25T08:17:29Z")

</div>

Tried this already, outline gets thinner, but anti alias unaffected. I will play around with the sampling parameter…

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [August 25, 2025, 4:54pm UTC](https://discourse.threejs.org/t/combine-outlinepass-and-multisampled-webglrendertarget/86482/6 "2025-08-25T16:54:42Z")

</div>

I’ll just throw this out there as well.. I wrote/ported this implementation of the jumpflood algorithm for drawing outlines. It’s a completely different technique with its own quirks, but you get a lot more/different control of the kinds of outlines generated.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/2/a/2a239466025dbfb9488fd17387dc5e097e2719b0.jpeg)

[https://manthrax.github.io/jumpflood/index.html](https://manthrax.github.io/jumpflood/index.html)

---

<div class="post-metadata">

**Author:** ![Eisenbert](https://avatars.discourse-cdn.com/v4/letter/e/65b543/32.png) [@Eisenbert](https://discourse.threejs.org/u/Eisenbert)\
**Post date:** [August 26, 2025, 7:50am UTC](https://discourse.threejs.org/t/combine-outlinepass-and-multisampled-webglrendertarget/86482/7 "2025-08-26T07:50:07Z")

</div>

Oh, this looks interesting, thanks for sharing! What I also found out in the meanwhile: The OutlinePass from pmndrs/postprocessing supports multisampling via parameter of the same name.

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [August 26, 2025, 7:55am UTC](https://discourse.threejs.org/t/combine-outlinepass-and-multisampled-webglrendertarget/86482/8 "2025-08-26T07:55:54Z")

</div>

ahh good catch!
