• FEATURED
• FEATURED
• FEATURED
• FEATURED
• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Negative near plane for Perspective matrix?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

### #1maya18222  Members

Posted 15 November 2012 - 05:46 AM

Is this possible?

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.

Any ideas?

### #2luca-deltodesco  Members

Posted 15 November 2012 - 05:54 AM

Having a negative viewing plane doesn't really make sense, the viewing plane is representing your eyes essentially, a negative viewing plane would mean you are seeing things that are behind you at the same time as things that are infront of you; straight lines passing through z = 0 would not look like lines anymore; as things approach z = 0 the perspective transform moves things to infinity.

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.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.