Translation matrix D3D vs. RTR
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?
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
neneboricua
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..
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement