Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualHodgman

Posted 17 March 2013 - 11:46 PM

In 3DS, is Y your "up" axis, or is "Z" up?

You probably shouldn't be multiplying individual components of the matrix by -1, but should be scaling an entire axis of the matrix by (-1,-1,-1,-1).

 

DirectX uses whatever handedness you choose to use. You can use it with left handed or right handed matrices.

 

Transposing a matrix does not convert between handedness; it converts between column-major storage and row-major storage. D3D's HLSL and GL's GLSL both operate on column-major storage by default, though fixed-function D3D, and the D3DX helpers often use row-major storage.

 

It also converts matrices that are designed to operate on row-vectors to ones that will work on column-vectors, and vice versa.

Whether you're using row-vectors or column-vectors depends on whether you write vector * matrix, or matrix * vector in your shader code.


#1Hodgman

Posted 17 March 2013 - 11:44 PM

DirectX uses whatever handedness you choose to use. You can use it with left handed or right handed matrices.

 

Transposing a matrix does not convert between handedness; it converts between column-major storage and row-major storage. D3D's HLSL and GL's GLSL both operate on column-major storage by default, though fixed-function D3D, and the D3DX helpers often use row-major storage.

 

It also converts between transform matrices that are designed to operate on row-vectors to ones that will work on column-vectors, and vice versa.

Whether you're using row-vectors or column-vectors depends on whether you write vector * matrix, or matrix * vector in your shader code.


PARTNERS