# At which stage of the pipeline is the projection transform applied?

I've found a site that provides an overview of the OpenGL pipeline:

Rendering pipeline overview

Now in the 3th phase (vertex processing) it says that after the transform feedback, there is the primitive clipping. If I am not mistaken, the primitive clipping must occur after that the vertices are multiplied by the projection matrix, otherwise it's impossible to determine if the primitives are inside or outside the view volume defined with glFrustum().

I know that in a typical GLSL shader you need to apply the modelview matrix to the vertices, so that you obtain a vertex in eye coordinates. So if I am not mistaken, at the end of the vertex shader you don't have vertices defined in clip coordinates yet. But this makes me think: where is the projection matrix applied? it seems like it's missing in this pipeline overview.

• "otherwise it's impossible to determine if the primitives are inside or outside the view volume defined with glFrustum()" That page defines the core profile of OpenGL; glFrustum does not exist in modern OpenGL anymore. Projection is the responsibility of the writer of the shader, not of the rendering pipeline. Apr 26 '18 at 16:34

This is not quite correct, you need to apply the modelviewprojection matrix and thus transform your vertices into Clip Space Coordinates. You can apply the ModelView Matrix in certain instances, e.g. if you want to calculate light in Eye Space. However, the gl_Position will then still not use the ModelView but the ModelViewProjection Matrix and your light/whatever- position will use the ModelView Matrix and be transferred to the fragment shader via the out variables.