Jump to content
  • Advertisement

Archived

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

RandolphU

D3D(X) projection

This topic is 6344 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

Is there way to use different FOV projections (mean lefthanded and righthanded) without changing normals in D3D7? I mean following: I create D3D7 device using ID3DXContext interface. As it is said in help, it sets lefthanded projection with FOV angle of PI/2. But I need to use righthanded projection, and then I change projection of device to righthanded, also I change culling to opposite. The problem is that lighting doesnt work with new projection and old normals. It means, that if I change vertex normals to opposite, everything is fine, but leaving old normals causes no diffuse and specular lighting at all. Same thing occures, if I leave lefthanded projection, but change view matrix to 1 0 0 0. Although, if I try the same with world 0 1 0 0 0 0-1 0 0 0 0 1 matrix, I dont need to change normals and everything works fine. Thanks for reading this long post!

Share this post


Link to post
Share on other sites
Advertisement
I barely understand the math behind projections, so I can''t really help you there. Direct3DX 8 (notice the X) has left and right-handed projection helper functions, so I suggest that you upgrade your SDK to version 8 and use those.

Note that D3DX is separate from D3D, so you can still use D3D7. The functions I''m referring to merely generate the matrices.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!