Getting the fragment being overwritten

I’m having problems with accessing the right “background” fragment when drawing geometry of varied scale/translation/rotation on top of a steady background texture. I’ve done some thinking (probably not enough) and lots of trial and error but always ended up with the background being disfigured at least slightly where the shader is applied.

If someone could help with sorting out the transforms necessary I’d be very grateful!

perhaps my module Background (DX9 Tools).v4p helps you.
it is here: kalle.Modules.DX9

I don’t really see that helping me but I should have explained my problem better, however when making an isolated test patch/shader to illustrate the problem I ended up with a solution that works under most conditions. When I’ve spent some more time trying to improve it I’ll post an example.