Jump to content
  • Advertisement

Archived

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

risingdragon3

orthogonal projection (D3D)

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

Advertisement
width is the width of the screen. Height is the height of the screen. near z is however close something has to be before it is behind the viewer. Far clipping plane is how far away something has to be before it is out of sight.



Just because you're outnumbered doesn't mean you're wrong.


sharewaregames.20m.com

Edited by - furby100 on January 11, 2001 12:34:01 PM

Share this post


Link to post
Share on other sites
quote:

width is the width of the screen. Height is the height of the screen. near z is however close
something has to be before it is behind the viewer. Far clipping plane is how far away
something has to be before it is out of site.


I get that!
But whats the matrix? i.e. is it
[1 0 0 0]
[0 1 0 0]
[0 0 0 0]
[0 0 0 1]
(I think this drops the z coordinate, am I right)?
If it is right, do I translate by -width/2, -height/2, 0 or what?
And what do I scale by?


------------------------------
BCB DX Library - RAD C++ Game development for BCB

Share this post


Link to post
Share on other sites
It translates it screen_res_width/2 and screen_res_height/2 (if you think about it, this must be correct). scalex = width/screen_res_width; scaley = height/screen_res_height

You could make it throw away the Z coordinate, but what happens in D3D is:
z = z/(farzplane - nearzplane)

This makes z between 0.0 and 1.0, and makes most efficient use of the Z-Buffer. And RHW is set to 1



Just because you''re outnumbered doesn''t mean you''re wrong.


sharewaregames.20m.com

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!