MSAA not working with custom Post Processing (CustomDepth)

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

noticed this today, push!

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

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.

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.

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.