Shader#Vertex shaders

Vertex shaders ( Vertex Shader also, abbreviation VS) are programs that are typically performed by the graphics processor of a 3D graphics card over the graphics pipeline ( in the so-called shader units). Often, the shader units themselves are called vertex shader.


A vertex shader is used to manipulate the geometry of a scene. For this purpose, the coordinates of the vertices (vertices of three-dimensional objects ) of the surfaces to be transformed. Thus, the shape of objects affect, which in turn is also reflected in their lighting. However, the vertex shader can only modify existing geometry. He can neither remove nor add new geometries, for this the Geometry Shader is responsible. In terms of functionality thus the vertex shader replaces the older and less flexible Transform & Lighting (T & L).

With the help of vertex shaders effects such as Vertex Lighting, Terrain-/Objektdeformation, water waves or fish -eye lens are possible. Most of today's graphics chips contain shader units that execute the vertex shader. Thus, this geometry must not run on the system's CPU computations, making it relieves and can be used for other tasks. Usually several shader units are installed in GPUs, so they do not become a bottleneck of the graphics pipeline.

Additional information on the processing chain and to program shaders are available in the article shader.



The following table shows an overview with which version of DirectX support what graphics cards or graphics chips which vertex shader version. For completeness, also T & L, the predecessor of vertex shaders, incorporated. It should be noted that older versions of graphics chips typically support also, such as vertex shader 3.0 chips can also work with vertex shaders version 2.0. This backward compatibility is mainly the graphics card driver and not the GPU.


Because depending on the shader version of the functionality and programmability can vary greatly different, a developer is in principle before the election,

  • To dispense with the vertex shader and calculate everything using the CPU. This approach is no longer accessible, because as good as any modern 3D application performance requirements already ensure that it adequately fast graphics cards requires, but which in turn are as up to date that they already contain vertex shader units.
  • To support many vertex shader versions by each to be supported version of own optimized shader writes (so-called render paths). Here, all graphics cards are supported, which are compatible with the targeted Shader versions.
  • Only vertex shader versions from a specific version support.

From DirectX version 10 is the so-called fixed-function pipeline, a given vertex and pixel shader combination for simple tasks, no longer supported. The programmer must therefore always specify a vertex shader.