# MSAA not working with custom Post Processing (CustomDepth)

**URL:** <https://forums.unrealengine.com/t/msaa-not-working-with-custom-post-processing-customdepth/377927>\
**Category:** Rendering\
**Tags:** Post-Processing, msaa, custom-depth, unreal-engine, question\
**Created:** [November 30, 2016, 4:04pm UTC](https://forums.unrealengine.com/t/msaa-not-working-with-custom-post-processing-customdepth/377927 "2016-11-30T16:04:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tobias\_Tobasco](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tobias_tobasco/32/1194646_2.png) [@Tobias\_Tobasco](https://forums.unrealengine.com/u/Tobias_Tobasco)\
**Post date:** [November 30, 2016, 4:04pm UTC](https://forums.unrealengine.com/t/msaa-not-working-with-custom-post-processing-customdepth/377927/1 "2016-11-30T16:04:05Z")

</div>

Hello,

i have a custom outline post processing material in my project (PC,XB1,PS4), which uses stencils and custom depth. It’s not working with MSAA (because of the custom depth i guess?). Is there anything i can do to make it work? If not, will support for custom post processing + MSAA come in the near future?

Cheers

---

<div class="post-metadata">

**Author:** ![jinzay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jinzay](https://forums.unrealengine.com/u/jinzay)\
**Post date:** [March 18, 2017, 11:23am UTC](https://forums.unrealengine.com/t/msaa-not-working-with-custom-post-processing-customdepth/377927/2 "2017-03-18T11:23:01Z")

</div>

noticed this today, push!

---

<div class="post-metadata">

**Author:** ![MillhouseOne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MillhouseOne](https://forums.unrealengine.com/u/MillhouseOne)\
**Post date:** [December 14, 2017, 11:51pm UTC](https://forums.unrealengine.com/t/msaa-not-working-with-custom-post-processing-customdepth/377927/3 "2017-12-14T23:51:57Z")

</div>

You didn’t by chance figure out a good workaround for this, did you?

---

<div class="post-metadata">

**Author:** ![Doublezer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Doublezer0](https://forums.unrealengine.com/u/Doublezer0)\
**Post date:** [January 17, 2018, 3:19pm UTC](https://forums.unrealengine.com/t/msaa-not-working-with-custom-post-processing-customdepth/377927/4 "2018-01-17T15:19:42Z")

</div>

you can fix it by using the console command r.MSAACount 0 although im not sure that might be viable if you need a higher msaa count.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cb80bdeb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cb80bdeb](https://forums.unrealengine.com/u/anonymous_user_cb80bdeb)\
**Post date:** [February 5, 2018, 1:34am UTC](https://forums.unrealengine.com/t/msaa-not-working-with-custom-post-processing-customdepth/377927/5 "2018-02-05T01:34:43Z")

</div>

Setting MSAA count to 0 causes the engine to use TXAA instead. That’s why it seems to work, but you would just be disabling MSAA. If you aren’t having any problems with TXAA, you could just use that instead, though TXAA can cause some weird artifacts with some materials.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cb80bdeb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cb80bdeb](https://forums.unrealengine.com/u/anonymous_user_cb80bdeb)\
**Post date:** [February 5, 2018, 2:09am UTC](https://forums.unrealengine.com/t/msaa-not-working-with-custom-post-processing-customdepth/377927/6 "2018-02-05T02:09:13Z")

</div>

The most likely cause of this problem is that scene depth is being calculated per MSAA sample, while custom depth is being calculated only per pixel, so in places where scene depth varies across different samples on the same pixel, the scene depth and custom depth will not be equal.
