I've noticed in almost everything I've read so far that the term "clip space" is prepended with the word "homogeneous". Now I understand that it roughly means "all the same", but I don't understand why there is the express need to say "homogeneous clip space". When is clip space not homogeneous and why do we need to differentiate? And for that matter, what exactly does it mean that we're calling it "homogeneous clip space"? Homogenous in relation to what? In what way are the vertices "all the same"?
Answer
Clip space is called homogeneous because the values in it use homogeneous coordinates, i.e. they are in the form [x y z w] instead of [x y z]. In order to get the latter, perspective division must still occur:
[x y z w] → [x/w y/w z/w]
homogeneous normalized device
clip space coordinates (NDC)
The reason clipping is performed before perspective division is because divisions are expensive operations. Instead of testing e.g. |x| > 1
in NDC space, we can just test |x| > |w|
in homogeneous clip space, which gives exactly the same result, and allows to perform clipping before division.
No comments:
Post a Comment