CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2011
    Posts
    1

    Angry 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.

  2. #2
    Join Date
    Jul 2010
    Posts
    88

    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
  •  





Click Here to Expand Forum to Full Width

Featured