I’m trying to highlight different parts of a static mesh. These different parts are defined via material elements. The highlight involves outlining said part, which seems to be something that can only be done through using custom depth, which seems to be available only for the entire mesh.
Is there any way to achieve what I want without breaking each part into a separate static mesh?
To directly answer your question, no the custom depth setting is based on the mesh and not on the mesh’s shader. If you use additional smaller broken meshes which only render in Custom Depth pass while your Main Mesh renders in the Main Pass only and is not broken apart, you can then use the highlighting effects in your Post Process.