0

So many answers are saying that triangles behind the viewer will show in front of far plane. So what? I mean we don't care if those triangles or primitives out of Frustum will be upside down or change position when we transform from Clipping Space to NDC. Because as long as they are not inside Frustum in Clipping Space, then they will not in NDC either(Based on the picture page 115 on Mathematics for 3D Game Programming and Computer Graphics). Any primitives or vertices behind near plane that we cannot see will be in front of far plane after perspective division, so they still cannot be seen. Yes the coordinates of those maybe wrong because Z and -Z(suppose we don't have 0 division problem), but it doesn't affect things inside the NDC and we don't need them anymore so we don't care if they are correct.

Some answers says that clipping can be perform in NDC but it's more expensive so we choose to do it in Clipping Space. This point is feasible.

So theoretically does it matter if we do clipping in NDC?

genpfault
  • 49,394
  • 10
  • 79
  • 128
ForeverDK
  • 1
  • 1
  • 2
    When you only think about a single point, both spaces will work. But think about a line that goes from the center of the viewfrustum straight through the near plane. The resulting clipped line has to stop at the near plane. But when your first convert to NDC, the point outside of the frustum might be be flipped to a place behind the far plane. When you now clip, the plane would end at the far plane instead of the near plane. You might want to read this answer for more details: https://stackoverflow.com/questions/41952225/why-clipping-should-be-done-in-ccs-not-ndcs/41953552#41953552 – BDL Dec 06 '21 at 17:53
  • In addition to what others said, when clipping you need to interpolate the attributes at the newly generated vertices; the interpolation is linear in clip space, whereas NDC is a non-linear transformation. Therefore you need to interpolate the former. – Yakov Galka Dec 14 '21 at 14:54

0 Answers0