-
January 27th, 2011, 03:54 PM
#1
D3D9 Matrices + HLSL
0 down vote favorite
Hello,
I'm seeking help from all of you expert with Direct3D. Frankly I'm getting nuts by a really weird behavior from HLSL. It's the way I specify matrices.
Now my question D3DX 9 functions:
D3DXMatrixOrthoOffCenterRH and others...
Do they return a matrix that's used in this form: v' = v * M // Column major
or v' = M * v // Row major ???
I noticed the D3DXMatrixTrnaslate is in Column major and I assume the same for all functions.
Now does D3DX Project and Unproject functions takes in the same form returned by the above functions?
Have anyone experienced a really craziness from HLSL matrix multiplication?
Thanks.
-
February 11th, 2011, 08:17 AM
#2
Re: D3D9 Matrices + HLSL
The matrices in the graphics hardware is a transpose to the matrices in DirectX math. Whenever you give a matrix to a constant buffer, use the transpose of the matrix.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|