I can’t quite understand one thing. How to find an inverse transformation matrix in Shader Graph without solving the equation?
So in my example, I can easily do a direction transformation from tangent space to world. The input vector is based on tangent space coordinates.
But what if I want this 0,0,1 vector in respect of tangent basis coordinated. So I need World to Tangent transform, and I also want to slightly modify the tangent vectors in built matrix. This is why I can’t use regular Transform Node, also kinda want to understand the math behind it.
For some reason, if I just transpose (flip) the matrix, or in other way change the Column to Row in Matrix Construction Node, it works. But I’m not sure if I understand why it works, it just flips rows to columns, right?
PS: Do I really need to solve this like in this video or there is a simpler approach?
For a uniformly scaled rotation matrix, the transpose matrix is equivalent to the inverse matrix. As a side note: swapping the order of the vector and matrix in the multiply also applies the matrix transposed.
Often the tangent to world matrix is uniform, or at least close enough that it’s a good enough approximation. But not always. In the case that it’s not, then yes, you have to do all of “that”.