how to get complete custom depth stencil mask?

Hi @iZerat,

I ran into the same issue a couple of months ago, so I knew there was a workaround.

This is a fantastic article that goes into great detail on how to fix this issue. Just note that the occluded area will be the sum of both stencil values, so you will have to search for that value separately.