Archived

This topic is now archived and is closed to further replies.

Translation matrix D3D vs. RTR

This topic is 5173 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In the boot Real-Time Rendering (2nd edition) a translation matrix has its translation components on the right column. 11 12 13 tx 21 22 21 ty 31 32 33 tz 41 42 43 44 But D3D seems to use the bottom row for translation. 11 12 13 14 21 22 21 24 31 32 33 34 tx ty tz 44 The only thing I can think of is that RTR is using column-major where D3D is using row-major (or maybe it’s the other way around). Anyone know for certain why this is?

Share this post


Link to post
Share on other sites
Yes, Real-Time Rendering uses column major matrices. Actually, pretty much all generic graphics books use column major matrices. The reason for this is because they''re using a right handed coordinate system. This means that the Z-axis would point AWAY from the screen instead of INTO the screen, as it does in Direct3D.

neneboricua

Share this post


Link to post
Share on other sites
quote:
Original post by neneboricua19 This means that the Z-axis would point AWAY from the screen instead of INTO the screen, as it does in Direct3D.


You can make Direct3D use the right-handed coordinate system too.
But most people who learn DirectX use left-handed.

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..

Share this post


Link to post
Share on other sites