3
\$\begingroup\$

I'm trying to compute the line intersecting my plane (transformed to NDC) and the near plane.
I have troubles to get a correct result and I think it is coming from the near plane equation.

I suppose that the equation in normalized device coordinates is \$N=(0,0,1)\$ and \$O=(0,0,near)\$.
But what is the value of \$near\$? Is it constant or it depends on the frustum?

\$\endgroup\$
  • \$\begingroup\$ doesn't it go from -1 to 1? I thought NDC is a box that goes from -1 to 1 on all axis \$\endgroup\$ – Sidar Jan 23 '18 at 14:08
  • \$\begingroup\$ @Sidar, yes you're right. I managed to fix my issue, thanks. The equation of near plane in NDC is \$z+1=0\$ \$\endgroup\$ – Michael M. Jan 23 '18 at 15:44
  • \$\begingroup\$ might want to post the answer then =P \$\endgroup\$ – Sidar Jan 23 '18 at 15:59
3
\$\begingroup\$

In NDC, the clipping planes are a box that goes from -1 to 1.
Near plane equation is therefore \$Z+1=0\$ and far plane \$Z-1=0\$

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.