The vertex shader is used to transform the attributes of vertices (points of a triangle) such as color, texture ... function that allows flexibility in shading an individual pixel.