Jump to content
  • Advertisement


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


1 to 1 screen mapping (D3D8)

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

i cant seem to see this in the documentation how to setup the model + view matrices so i have an orthogonal viewpoint (ie non perspective) with a one to one mapping ie (0,0) maps to the lowerleft + (windowwidth,winheight) maps to the upper right ps without using the D3DX libraries http://members.xoom.com/myBollux

Share this post

Link to post
Share on other sites
Just set the projection matrix to something like

--------- 0 0 0

0 --------- 0 0

0 0 Q 1

0 0 -QZn 0

with Q = Zf/(Zf-Zn)
Zf = far clipping plane
Zn = near clipping plane

That is assuming you still want to do z-buffering.

Hmmm... that didn't show up too well.

A 0 0 0
0 B 0 0
0 0 C 1
0 0 D 0

A = (1 / ScreenWidth)
B = (1 / ScreenHeight)
C = Q
D = -QZn

Edited by - ludemann8 on March 19, 2001 10:10:23 AM

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!