Annotations for "Projection Transform (Direct3D 9) (Windows)" topic.Tue, 01 Sep 2015 22:46:54 Z
http://msdn.microsoft.com/en-us/library/bb147302(v=vs.85).aspx#CommunityContent
MasterxiloThe whole story...After multiplication with the projection matrix or after the custom vertex shader, the fixed function pipeline always divides projectedPos.xyz by projectedPos.w, which preserves camera space z. Only this makes the projection work as intended - the projection matrix alone is not enough - try it by setting projectedPos.w = 1 in your VS. The projection will be messed up. Pos.w of the PS input still contains the camera relative z value. You can get linear z values by doing projectedPos.z /=Zfar; proWed, 14 Sep 2011 22:30:41 -0700