You dare question the correctness of a piece of shader code found somewhere on the internet?mongoose7 wrote:Hmm, I don't think you should multiply the tangent by the normal matrix. The same for the binormal.
Well... How dare you?!
No seriously, it's not by the book, and i bet there's a whole lot of cases where this results in incorrect tangent and binormal. Still it's the easiest trick you can use to get (something fairly close to) normal or parallax mapping on animated meshes I know of.
Btw: if anyone has any more info on this from the mathematical point of view(how well does it work, cases when it doesn't work at all etc.), I'd be glad to learn something new