Aras Pranckevicius
2007-02-14 13:06:15 UTC
Hi,
Is there a way to convert just the raw projection matrix (i.e. 16
floats, no other data known) between coordinate/projection conventions
of OpenGL and D3D?
What I'm looking for is a function that gets 16 floats on input and
spits out 16 floats in return; handling ortho, perspective and other
(think oblique) projections equally well.
I can't think of a generic method myself (just scale/bias works for
ortho, but not for perspective for example), and my homogeneous math
is in not very good shape...
Is there a way to convert just the raw projection matrix (i.e. 16
floats, no other data known) between coordinate/projection conventions
of OpenGL and D3D?
What I'm looking for is a function that gets 16 floats on input and
spits out 16 floats in return; handling ortho, perspective and other
(think oblique) projections equally well.
I can't think of a generic method myself (just scale/bias works for
ortho, but not for perspective for example), and my homogeneous math
is in not very good shape...
--
Aras Pranckevicius
work: www.unity3d.com
home: nesnausk.org/nearaz
Aras Pranckevicius
work: www.unity3d.com
home: nesnausk.org/nearaz