Render Outline effect with custom depth filter

Hello, Im using this outline effect

(its a video detailling how to make it and i can provide the final bp for each function and material to illustrate the problem cause the video is 1h30 -_-)

Its super cool but i would love to be able to filter actor that get this outline effect (landscape and grass without this outline effect),

thing is from what i understand, it sample and compare pixel so u need a specific way to filter so im assuming thats why in this video the dude is using custom depth pass to filter which actor can have the outline effect or not.

I have two problem because of that,

  • custom depth buffer doesn’t work with nanite in unreal 5.1 at least

  • and i can’t realy bulk edit custom depth buffer easily on each actor or even the spawned one

so final question is: how do i isolate this outline effect to not occur on my landscape and grass

Someone on a discord advised me to use a specular gbuffer range but i dont know how concretely make it