The vertex shader is executed once for each vertex of the polygons of the object, returning its corresponding v2f
. Therefore, it means that the vertex shader won’t run for every pixel.
As the fragment shader takes as input a v2f
object, how is it supposed to run for every pixel, if the v2f
s are only generated for a few pixels that correspond to screen positions of vertices of the model?