How can I move a scene texture after making changes to it?

I know that to change how a scene texture is placed on screen in a post process you can plug in a texture coordinate node and do whatever you want to that, add to shift it, multiply to stretch it, whatever. However, I need to make changes to the scene texture before I move it. I have to multiply it by a value that I get from the scene depth, and then I need to change how it is placed on screen. How can I do this? Is there some mystery node that can change the UV values after? Can I make a custom node that tells it to sample the pixel a few space over from the one it wants to sample? Can I make it generate a screen texture from what I’ve created that I can call up somewhere else?