Set CustomDepth Stencil Value in Material

Hey all,
Is there a way to set the customDpeth stencil Value in materials instead of per object?

You have to set the custom depth in the Static/SkeletalMeshComponents. I don’t think there is a way to do this in materials.

Can you think of any way to get a mask for a specific material in a post-processing material?

What exactly do you want to do?

I’m implementing a toon shader. I want the effect to only be applied on certain materials, such that a certain part of a mesh will have the toon shader applied to it, while other parts will be shaded normally.