How to remove an specific customstencil from scenedepth?

For one, in your project settings, make sure the Custom Depth pass is “Enabled with Stencil”.

After that, you can use an if like this (in your case, ExcludeStencilValue is 4):

1 Like