DX Projection Matrix.

BlitzMax Forums/BlitzMax Programming/DX Projection Matrix.

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

matrix=[..
         sx      ,0.0      ,0.0         ,0.0,..
         0.0      ,-sy      ,0.0         ,0.0,..
         0.0      ,0.0      ,2.0/depth   ,0.0,..
         -1-(1.0/width),1+(1.0/height),1.0,1.0] 

sx and sy are the matrix position or camera position (in your case the camera is pointed directly at the center of the view), depth = depth of view (only objects within this depth will be rendered). height and width are the size of your view on the world.