Opps, I don’t kow what I was thinking…
vM != Mv
(This is changing the vector between being a row vector to column vector in the second operation)
If column major order:
vM = DP4, DP4, DP4, DP4
Mv = MUL, MAD, MAD, MAD
If row major order:
vM = MUL, MAD, MAD, MAD
Mv = DP4, DP4, DP4, DP4
===========================
Some code explaining how MUL, MAD, MAD, MAD works:
Colum major M*v
MUL out, M[0], v
MAD out, M[1], v, out
MAD out, M[2], v, out
MAD out, M[3], v, out
as opposed to Colum major v*M
DP4 out.x, M[0], v
DP4 out.y, M[1], v
DP4 out.z, M[2], v
DP4 out.w, M[3], v