Sign in to follow this  

Near plane clipping in canonical view volume?

Recommended Posts

I've been tinkering off and on with my software rasterizer looking at different ways of handling clipping. Currently my pipeline works by taking my object/local space vertices from my model, multiplying them by a worldViewProjection matrix which I create, then I take my vertices and divide them by my w value which brings them into my canonical view volume (also do the same for the UVs for perspective correction and save the inv z for retrieving them later). After all this I then clip the triangles to the sides of my CVV. The clipping is working correctly the the top, left, right and bottom. However, I have been having trouble getting my vertices clipped correctly against the near plane such that I dont end up with divide by zero errors when I go to rasterize. Is there some big logical problem with the route I am taking, or perhaps I just need to go back and double check my calculations on the near plane?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this