Original Post
I have a question about vertex shaders. Here is a sample shader.
vs.1.0
dp4 oPos.x , v0 , c4
dp4 oPos.y , v0 , c5
dp4 oPos.z , v0 , c6
dp4 oPos.w , v0 , c7
mov oD0 , v5
Ok in this case c4 to c7 holds WorldViewProj matrix, v5 is the diffuse color. Ok on to my few questions.
1) Now the first thing im confused about is the c4 to c7 thing. This holds the transpose of the product of the world, view and projection matricies according to MS''s code. Is the WorldViewProj matrix the "modelview" matrix in OpenGL?
2) I noticed before MS set the c4 to c7 registers w/ the WorldViewProj matrix, they did a transpose. Why did they do that?
3) Ok now they do 4, 4 component dot products between the position (v0) and c4 to c7. Why are they doing a dot product? And why is like say the x pos getting the dot prod between v0 and c4, y between v0 and c5, and so on?
I think i probably need to get the book called "Mathematics for Computer Graphics Applications." Because its the math im rusy on.
-SirKnight