Can custom depth be applied to individual material elements?

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?

Hi sgp -

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.

Thank You

Eric Ketchum

Thanks, I guess I’ll just give up on the outline to prevent having to break up the mesh.

We used to do outlines without post processing back in the gears days. We used a separate mesh with a vertex push shader. Info here:

link text