Stencil Buffer Depth value inconsistancies with MSAA
There appears to be some inconsistency or precision issues with scene depth and stencil buffer depth values when using MSAA instead of FXAA/TAA.
For example, Tom Loomans post process outline material outlined here: http://www.tomlooman.com/multi-color-outline-post-process-in-unreal-engine-4/
Will work as intended with TAA or FXAA, however has edge cases where the depth comparison between the Scene Depth node and the Custom/Stencil depth (for occlusion detection) is slightly different on thin geometry or edges (seems like precision issues) counting visible pixels as occluded in the check.
Also a simple post process that renders a flat color instead of scene texture of objects in the custom depth buffer that are occluded will show artifacts with MSAA on thin geometry and at edges but will be clean with the other AA options.
I am unaware of if this is an expected issue with MSAA because of how it re-samples the scene but figured I should bring it up.
asked May 25 '17 at 06:44 PM in Rendering
I think that maybe you could make a postprocessing material that does antialiasing instead of using MSAA, so you can solve those issues you have with that AA method on the custom one (unless you want some sort of supersampling; in that case I don´t know) ; If you don´t know where to start, maybe you can use a kernel that looks for differences in the stencil buffer and world normal to blend pixel colors.
answered Jan 16 '19 at 06:26 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here