Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualNusakan

Posted 06 January 2013 - 02:38 AM

Could this be the problem?

XMMATRIX w = XMLoadFloat4x4(&world);
XMMATRIX v = XMLoadFloat4x4(&view);
XMMATRIX p = XMLoadFloat4x4(&proj);


w = XMMatrixTranspose(w);
v = XMMatrixTranspose(v);
p = XMMatrixTranspose(p);



XMStoreFloat4x4(&world, w);
XMStoreFloat4x4(&view, v);
XMStoreFloat4x4(&proj, p);
I am not sure why you would transpose your world and projection matrix.

To map your model from object space to screen space;
- you first multiply it with a world(aka model matrix) to transform your model in to world space.no need to transpose it as far as I'm aware of it.
- After transforming the model into world space, you multiply with view matrix in order to transform into eye space. View matrix is the inverse matrix of the camera's rotation and position. Thus it makes sense to transpose the view matrix (only if your matrix is orthogonal) however, you also need to invert the position component.
- After transforming your model in to eye space, you multiply with the projection matrix in order to map into screen. again i don't see why you would need a transpose of the projection matrix here.

#3Nusakan

Posted 06 January 2013 - 02:37 AM

Could this be the problem?

XMMATRIX w = XMLoadFloat4x4(&world);
XMMATRIX v = XMLoadFloat4x4(&view);
XMMATRIX p = XMLoadFloat4x4(&proj);


w = XMMatrixTranspose(w);
v = XMMatrixTranspose(v);
p = XMMatrixTranspose(p);



XMStoreFloat4x4(&world, w);
XMStoreFloat4x4(&view, v);
XMStoreFloat4x4(&proj, p);
I am not sure why you would transpose your world and projection matrix.

To map your model from object space to screen space;
- you first multiply it with a world(aka model matrix) no need to transpose it as far as I'm aware of it.
- After converting the model into world space, you multiply with view matrix in order to map into eye space. View matrix is the inverse matrix of the camera's rotation and position. Thus it makes sense to transpose the view matrix (only if your matrix is orthogonal) however, you also need to invert the position component.
- After converting your model in to eye space, you multiply with the projection matrix in order to map into screen. again i don't see why you would need a transpose of the projection matrix here.

#2Nusakan

Posted 06 January 2013 - 02:33 AM

Could this be the problem?

XMMATRIX w = XMLoadFloat4x4(&world);
XMMATRIX v = XMLoadFloat4x4(&view);
XMMATRIX p = XMLoadFloat4x4(&proj);


w = XMMatrixTranspose(w);
v = XMMatrixTranspose(v);
p = XMMatrixTranspose(p);



XMStoreFloat4x4(&world, w);
XMStoreFloat4x4(&view, v);
XMStoreFloat4x4(&proj, p);
I am not sure why you would transpose your world and projection matrix.

To map your model from object space to world space;
- you first multiply it with a world(aka model matrix) no need to transpose it as far as I'm aware of it.
- After converting the model into world space, you multiply with view matrix in order to map into eye space. View matrix is the inverse matrix of the camera's rotation and position. Thus it makes sense to transpose the view matrix (only if your matrix is orthogonal) however, you also need to invert the position component.
- After converting your model in to eye space, you multiply with the projection matrix in order to map into screen. again i don't see why you would need a transpose of the projection matrix here.

#1Nusakan

Posted 06 January 2013 - 02:19 AM

Could this be the problem?

 

XMMATRIX w = XMLoadFloat4x4(&world);
XMMATRIX v = XMLoadFloat4x4(&view);
XMMATRIX p = XMLoadFloat4x4(&proj);
 
 
w = XMMatrixTranspose(w);
v = XMMatrixTranspose(v);
p = XMMatrixTranspose(p);

 
 
XMStoreFloat4x4(&world, w);
XMStoreFloat4x4(&view, v);
XMStoreFloat4x4(&proj, p);

 

I am not sure why you would transpose your world and projection matrix.


PARTNERS