Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

MSAA breaks post process material that compares scene depth and custom depth

I'm not sure whether this is an issue that's just inherent to MSAA or not, but I can't seem to find any proper information on this issue.

1) Download Tom Looman's outline shader. http://www.tomlooman.com/multi-color-outline-post-process-in-unreal-engine-4/

2) Enable Forward Renderer

3) Set custom depth stencil pass to enabled with stencil

4) Create a new material with a base color input of 0.1

5) Create an unbound post process volume using the post process material.

6) Create some spheres and place them in a similar manner to what's shown below. Enable custom depth on them and set their custom depth stencil value to 254. Apply the material we made previously to them to improve visibilty of the effect.

7) Observe the effect rendering correctly

alt text

8) Switch to MSAA with atleast 2 samples.

9) The effect no longer works correctly.

alt text

Product Version: UE 4.17
fxaa.png (467.0 kB)
msaa.png (455.0 kB)
more ▼

asked Aug 27 '17 at 09:20 PM in Bug Reports

avatar image

16 1 8 10

avatar image Doug E ♦♦ STAFF Aug 31 '17 at 05:26 PM

Hey Selentic,

Could you provide a sample project that shows the behavior you're seeing. When following your reproduction steps, I don't see any difference in the spheres between steps 7 and 9. Additionally, this issue seems to be mentioned at the bottom of the download page you linked. As mentioned there, can you try replacing the occlusion test with the setup provided (https://i.imgtc.com/7oRS9n9.png) ?

avatar image Selentic Sep 01 '17 at 03:17 AM

Hi Doug. Here is the project.


Just toggle between MSAA and FXAA/TAA, and the issue should appear.

The posts from the material's page are mine, as is the workaround which I found after I made this post. However the workaround is noticeably less accurate and doesn't fully solve the issue.

Basically the issue seems to stem from this:

alt text

This is a screenshot taken from another project. One under MSAA, the other under FXAA, while using the post process material below. The depth comparison produces entirely different (incorrect) results under MSAA.

alt text

msaadepthbug.jpg (128.4 kB)
depthmat.jpg (116.4 kB)
avatar image MillhouseOne Nov 22 '17 at 08:20 PM

Would you mind sharing your workaround? I'm running into this as well but your project's dropbox link has expired.

avatar image Selentic Nov 23 '17 at 03:06 AM


That was how I solved it. It's not as accurate, but for my needs it didn't need to be.

avatar image MillhouseOne Nov 23 '17 at 04:47 AM

Ah, thanks for posting! I need a little more accuracy, but hopefully your post will help someone else in a similar situation.

avatar image Glutamatkrieger Apr 10 '18 at 08:46 PM

This picture is not avaiable anymore. Can you repost your solution ? Thanks in Advance

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey Selentic-

Sorry for the delayed response. I have entered a report based on the sample project you provided: https://issues.unrealengine.com/issue/UE-49851 . You can track the report's status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.


Doug Wilson

more ▼

answered Sep 15 '17 at 07:00 PM

avatar image MillhouseOne Nov 22 '17 at 08:19 PM

I too am running into this, but noticed the issue is flagged as "won't fix."

Is there an alternate approach we can rely on or is there any insight into why this will not be fixed?

avatar image nyronic Apr 14 '18 at 01:08 AM

Any update on this? We're also running into this issue with MSAA and scenedepth.

avatar image Alan Liu May 21 '18 at 10:06 AM

Any update on this? We're also running into this issue with MSAA and scenedepth.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question