Take the tour ×  If i have a vertex shader that manage some
movements and variations about the position of some vertex in my
OpenGL context, OpenGL is smart enough to just run this shader
on only the vertex visible on the screen?  This part of the
OpenGL programmable pipeline is not clear to me because all the
sources are not really really clear about this, they talk about
fragments and pixels and I get that, but what about vertex
shaders?  If you need a reference i'm reading from this right
now and this online book has a couple of examples about this.
share|improve this question add comment  1 Answer  up vote 10
down vote accepted  Pretty much the vertex shader has to run on
all the vertexes you provide to the pipeline. The reason is
simply because the vertex shader can alter the position of the
vertex. Before the vertex shader runs the renderer will have no
idea whether the vertex is in or out of the frustum. I suppose
more correctly it doesn't even know what a position is until
told via glPosition; prior