DirectX Orthographic projection matrix?
BlitzMax Forums/BlitzMax Programming/DirectX Orthographic projection matrix?
| ||
I've managed to set the DirectX matrix so that I can render in 2D with a Z co-ordinate, however this is not orthographic as distant objects are projected from the center of the screen. How do I kill the perspective? Here is the Matrix :- Local zf#=-.1,zn#=.1 ' Near and Far Z Range Local w# = width Local h# = height matrix=[.. 2.0/w ,0.0 ,0.0 ,0.0,.. 0.0 ,-2.0/h ,0.0 ,0.0,.. 0.0 ,0.0 ,1.0/(zn-zf) ,1.0,.. -1-(1.0/width),1+(1.0/height),zn/(zn-zf) ,1.0] |
| ||
http://www.codeguru.com/Cpp/misc/misc/math/article.php/c10123__2/ Hopefully this will help you... |
| ||
Thanks, that helped. |