I am making a function to clip tris via software, but I don't know how this stuff ocurrs... I have heard about near clipping plane, scissor, far clipping plane, etc... but I really have no idea what they do when clipping... can someone help me?
I am making a function to clip tris via software, but I don't know how this stuff ocurrs... I have heard about near clipping plane, scissor, far clipping plane, etc... but I really have no idea what they do when clipping... can someone help me?
There are a number of ways to do this. Basic 3d geometry. You find where the triangle intersects your cliping region and split it in the line going through the triangle. if the remaining surface has 4 edges you split it into 2 triangles and send those if it has 3 edges, then you have a smaller triangle and you send that instead.. however you will need to change UV mapping coordinates if a texture was being splatted on the triangle.
I am making a function to clip tris via software, but I don't know how this stuff ocurrs... I have heard about near clipping plane, scissor, far clipping plane, etc... but I really have no idea what they do when clipping... can someone help me?