Regarding clipping

Hello All,

I have a small question regarding clipping. Now i know that the clipping happens in the clip space. So, we can throw away points if outside the view frustum, else retain it.
Now, suppose we have a line wherein one point is outside and another is inside. So, we need to clip this exactly till the point where the line intersects the view frustum.
Is this computation also done in the clip space?

So, we need to generate a new vertex in the above example(the intersection point). Is this also done in the clip space?

Thanks!

[QUOTE=myk45;1248685]So, we need to clip this exactly till the point where the line intersects the view frustum.
Is this computation also done in the clip space?[/QUOTE]
Yes. Once you’re coding in shaders, you’ll see that that CLIP-SPACE may be the only space in which the GPU receives your vertex positions.

> Once you’re coding in shaders, you’ll see that that CLIP-SPACE may be the only space in which the GPU receives your vertex positions.

Thanks for the reply Dark Photon. I’m a little confused. Clip space is the space in which the GPU receives vertex positions? Doesn’t the vertex shader typically output vertices in clip space? after the projection?

I guess what Dark Photon meant was the GPU receives the vertices from your vertex shader in clip space.

Yeah, i suppose. Thanks!