Directly calculate the transformation matrix by multiplying and inverting the Domain matrices. This removes a double-invert and decomposition of the matrices so it should be more accurate, and I think makes the math a lot easier to figure out. This also moves the "bias" for Nearest to be done in the input space rather than output. This should make it select the same pixels from the input even if the image is rotated 180 degrees. Co-authored-by: Bill Spitzak <bills@sidefx.com> Pull Request: https://projects.blender.org/blender/blender/pulls/125543