Wow, this is a pretty complicated problem. Basically you do not bring perspective into the equation. Your final x, y coordinate is divided by the z value you get when you rotate. This means that you will get a smaller change in the texture space (s, t) that you get from the camera.
However, by doing this, you effectively interpolate linearly as z increases. I wrote an ANCIENT demo that did this back in 1997. This is called "affine" texture mapping.
The thing is that you divide x and y by z, you really need to interpolate your values with "1 / z". This correctly takes into account the perspective that applies (when you divide x and y) by z. Therefore, you get a “perspective correct” texture mapping .
I wish I could talk about this in detail, but over the past 15-plus years of alcohol abuse my memory is a bit vague.) I would like to visit the software rendering the other day, because I am convinced that with the release of OpenCL it will soon become the best a way to create a rendering engine!
In any case, I hope that some help and apologies I can no longer help.
(Aside from when I figured out all this visualization 15 years ago, I liked that now I had all the resources available, the Internet made my work and life easier. It was incredibly painful. I remember how I initially tried to perform 1 / z interpolation but it decreased as it approached, and I abandoned it when I had to turn things around ... to this day, as my knowledge increased exponentially, I STILL really wish I wrote a "slow", but completely promising correct rendering ... one day I will turn to him ;))
Good luck
source share