I have a shoe that's partly behind transparent objects. At the top left you can see the selected object (filter), there are actually 2 of them, one being slightly larger, and they both just have transparent BSDF for a material. Their only purpose is to add to the Transparent Depth of the Light Path node in the material setup of the shoe itself.
As you can see, the part of the shoe that is behind these filters is not being rendered, which is exactly the effect I need. I achieve this by checking if Transparent Depth is less then 2 (1,5 is effectively the same here, since it returns integers) and plugging the result into the Alpha. And here's what the Less Than node returns:
Now, if I change it to Greater Than, it should just be inverted, which it is:
However, when I plug the result of the Greater Than into the Alpha, it does not do what I expect it to, creating some mess instead:
It makes no sense to me why this is happening. I thought it was an issue with number of bounces, but I've increased them, you can see on the right there's plenty.