To avoid explaining or writing down the formulas, I took the liberty and scanned selected pages from those books. The scans are in the attachment. There are 3 pages from "Mathematics for 3D Game Programming and Computer Graphics" by Eric Lengyel (named lenX.jpg, X >= 1 && X <= 3) as well as 3 pages from "Normal Mapping wtihout Precomputed Tangents" in ShaderX5 by Christian Schuler (named schX.jpg, X >= 1 && X <= 3. What bothers me is the final formulation of the tangent frame. In Lengyel, in file len2.jpg there is formula 6.35 at the bottom of the page, and something similar in sch3.jpg at the top of the page.
For short, I see Lengyel defining tangent vectors like this:
PositionDelta = TexCoordDelta * Tangentwhereas Schuler defines it:
PositionDelta * Tangent = TexCoordDeltaWhere does this discrepancy come from?
Moreover, I swiftly tried computing the tangent vector and visualizing it, and the Lengyel's result was quite close to the visualization of precomputed tangents, whereas Schuler looked completely broken. Note that for Schuler I literally took the code from the book. I'm quite sure that I screwed up cause pictures in Schuler's article are correct so his algorithm must work. In the meantime I struggle with this I thought I could write about these formulas' discrepancy where it all starts so maybe you guys could give me some hint. Any idea?







