4
$\begingroup$

In the following two graphs,

  • the red lines are borders of the perspective-projection frustum,
  • the blue lines are to be rasterized,
  • the green lines are perspective-projection lines, which are wrong.

How do modern GPU pipelines do such clipping given only a perspective-projection matrix?

enter image description here

enter image description here

$\endgroup$
0

1 Answer 1

2
$\begingroup$

3D clipping is usually done in clipspace coordinates, that means the perspective matrix is used for sending the primitives to clipspace before doing the actual perspective projection. You can visualize the clipspace as a view frustum but with the shape of a box. So it is very fast to clip primitives against a AABB. The math is a little involved, but is all explained in this blog post:

Calculating the gluPerspective matrix and other OpenGL matrix maths | Unspecified Behaviour Blog

$\endgroup$
2
  • $\begingroup$ Thanks, but the blog post doesn't explain perspective clipping. $\endgroup$
    – chaosink
    Dec 29, 2017 at 18:26
  • $\begingroup$ I think it does. What is perspective clipping for you? $\endgroup$ Dec 29, 2017 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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