Multi-pass algorithms that compare fragment Z to a depth texture sample can exercise this sort of thing.