Post Processing Shader help inside UE5

Hi there! New to the forum and fairly new to Unreal, this is my first time working with a shader for a personal project I am working on, I followed these two tutorials to get a stylized lineart effect.

Everything works pretty great, besides the landscape I made in engine. (see photo 1) I can only upload one photo as a new user so I have to condense them into one :sweat_smile:
This happens if there is any sort of slope in the terrain, so if it’s not completely flat the geo shows up. I tried using a custom stencil to tell the material to not apply itself to landscape and only to the objects, which fixes the terrain, but anything that isn’t above a mesh with the same shader applied or visible, it will not receive the shader, an example of this below (photo 2).


My next try was to create a landscape similar to what is in unreal in maya, and the geo still appears if the object isn’t completely flat (see photo 3).
I’m at a loss as to why some of my meshes seem to be fine, but anything that I’m not trying to import now isn’t working. I’m starting to believe this isn’t an issue with the shader material and instead something with my meshes, or how the two are interacting with each other, I’m not sure, again I’m completely new to a post-processing effect like this, but I am at my wit’s end :upside_down_face: I appreciate any help I can get, and I can share more info if need be!

I’m not entirely sure what your issue is here. I think your outline shader works as expected. Whenever you have stepping your landscape, the outline shader will pick it up.
It’s difficult to fix this, as you cannot stencil it out for your usecase, unfortunately a limitation of post.

Maybe one thing that might help you: have the tranlucent water (that is above the landscape), write into the DepthBuffer, so it affects the outline shader (instead of the landscape below).
You can do this by unticking the ‘Render after DoF’ tickbox in your water shader/material.
(At least I hope this will do what I suggest.)