Hey guys.
I've the last couple of hours tried to implement an infinite projection matrix without succes. So I took a step back to see if I could even make some sense of the "normal" perspective projection matrix used by XNA. Normally I used the CreatePerspectiveFieldOfView() method to create the matrix. Here is what I've tried so far. What is XNA left-handed or right This code works but the view aspect is fu**ed up. Anyone who can clearify or better show how it's in XNA The infinite matrix that is.
float Q = drawParameters.Far / (drawParameters.Near - drawParameters.Far); float yScale = 1 / (float)Math.Tan((drawParameters.CameraFov) / 2.0f); float xScale = drawParameters.ViewAspectRatio * yScale;infinite.M11 = xScale;
infinite.M22 = yScale;
infinite.M33 = Q;
infinite.M34 = -1.0f;
infinite.M43 = Q * drawParameters.Near;
Regards