Object intersection material change?

You could use customdepth, if you aren’t already.
It gives you the depth of the outside of the object where the effect begins, and you can use the pixeldepth of the inside of the object to say where the effect ends.
Unfortunately it wouldn’t work with objects overlapping in screenspace.