Soft depth technique?

Hey there!

I wonder if there’s a way to use depth more permissively while rendering, e.g. if I’m rendering the pixel and its depth value is not far from the one that’s in the depth buffer, I render it anyways, but with some alpha.

I wonder how to do that in TD? I have tried to search for the ways to implement that, but no luck so far. I didn’t see the depth comparison operation in Pixel Shader.