Negative near plane for Perspective matrix?
Members - Reputation: 194
Posted 15 November 2012 - 05:46 AM
I tried it with the DX api math library and it doesnt work as expected, so is there anyway of adapting the creation of of the perspective matrix?
The reason Im asking is because Im trying to draw lines that are drawn by transforming 3d points by a viewProj matrix, and then sending the XY values to a 2D line drawing library. This creates problems when one of the 3d points defining a line is behind the camera.
I could solve this by "sliding" the vertices to clip with the view frustum in 3d space, but im hoping the above would be an easier approach. Im not using the depth either, so precision isnt a problem.
Members - Reputation: 637
Posted 15 November 2012 - 05:54 AM
When you have things that are partially behind the camera, you have to clip the geometry to only render things that are infront of the camera plane
Edited by luca-deltodesco, 15 November 2012 - 05:55 AM.