# Anti-aliasing with Outline shader material

**URL:** <https://forums.unrealengine.com/t/anti-aliasing-with-outline-shader-material/1862535>\
**Category:** Programming & Scripting\
**Tags:** Post-Processing, unreal-engine, Anti-Aliasing, Shaders, question\
**Created:** [May 18, 2024, 10:52pm UTC](https://forums.unrealengine.com/t/anti-aliasing-with-outline-shader-material/1862535 "2024-05-18T22:52:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sun\_dress](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sun\_dress](https://forums.unrealengine.com/u/Sun_dress)\
**Post date:** [May 18, 2024, 10:52pm UTC](https://forums.unrealengine.com/t/anti-aliasing-with-outline-shader-material/1862535/1 "2024-05-18T22:52:17Z")

</div>

I watched many tutorials on outline post process shaders and implemented many of them, but all of them have the same ghosting problem because of TAA and TSR anti-aliasing.

I tried all 4 types of AA with different options, but none of them produced acceptable results.  
FXAA - Don’t have a ghosting problem, but looks terrible by itself  
MSAA - Also no ghosting, but uses forward shading and looks just slightly better than FXAA  
TSR - Worst in terms of ghosting, but best looking  
TAA - Most compromise AA in terms of quality and ghosting because of r.TemporalAACurrentFrameWeight which help balance between ghosting and jagged lines. It is better than the other AA types, but it’s not seems like a good solution either

In the tutorials I watched there was a similar problem, but no one seems to care to fix it. Is it not possible? I would think that if there is so much tutorials on how to implement outline shader it is actually used in production and not just in youtube tutorials.

---

<div class="post-metadata">

**Author:** ![s.skooma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@s.skooma](https://forums.unrealengine.com/u/s.skooma)\
**Post date:** [January 29, 2025, 7:55pm UTC](https://forums.unrealengine.com/t/anti-aliasing-with-outline-shader-material/1862535/2 "2025-01-29T19:55:13Z")

</div>

I’m facing the same problem but I wasn’t being able to anti-alias the outlines with MSAA on forward shading. The base image itself is smoothed but outlines is jagged like MSAA wasn’t applied on them at all. I tried every blendable location in the post process material but none of them worked. Since you somehow managed to make it work can you share a tutorial or any info regarding toon outlines with forward shading? I want to give it a try even if it’s not ideal.

---

<div class="post-metadata">

**Author:** ![Sun\_dress](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sun\_dress](https://forums.unrealengine.com/u/Sun_dress)\
**Post date:** [February 16, 2025, 6:30pm UTC](https://forums.unrealengine.com/t/anti-aliasing-with-outline-shader-material/1862535/3 "2025-02-16T18:30:16Z")

</div>

Sorry for misleading, but it is not working. I no longer work on that project, but what I was trying to do is to get rid of ghosting artifacts. MSAA don’t have this problem, but if I had to guess it’s for the same reason the lines aren’t smooth. Probably just the way that forward shading works. No idea how to fix it
