Shader#Pixel shaders

Pixel shader (also pixel shader, fragment shader, abbreviation PS) are programs that are executed by the graphics processor of a 3D graphics card over the graphics pipeline ( in the so-called shader units).

Function

Pixel Shaders are used to change to render fragments, for example, to achieve a more realistic representation of surface and material properties or change the texture representation. The pixels of the final image may be possibilities of several fragments, for example if due to transparency, multiple objects can be seen simultaneously. The shader process these objects independently of each other, hence the term fragment shader is actually the correct term, however, the term pixel shader has naturalized in Direct3D environment in OpenGL is correctly spoken of fragment shaders.

Pixel Shader differ from Vertex shaders, which change the vertices (vertices of the three-dimensional objects) in order to manipulate the 3D objects in its shape or position. Examples of the use of pixel shaders are Phong shading, reflections, shading, falloff, Bloom and Lens Flares; also HDR rendering is programmed with their help (using frame buffers that support more than 8 bits per subpixel ).

Since the shader units that execute the pixel shader, the GPU part, these programs do not run on the CPU of the system, thus this is relieved 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.

Compatibility

Hardware

The following table shows an overview with which version of DirectX support what graphics cards or processors which pixel shader version. It should be noted that GPUs older versions typically support also, such as pixel shader 3.0 processors can operate with pixel shaders version 2.0 (which is the merit of the graphics processor as the graphics card driver is not so much ).

Software

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

  • Many pixel shader versions to support, by selecting the common denominator, namely version 1.0. Here, all graphics cards are supported that have this minimum level of pixel shader capability. This option is rarely chosen because many effects can be utilized efficiently only above certain versions.
  • To support many pixel shader versions by each to be supported version own optimized shader writes (so-called render paths). Here, all graphics cards are supported, which are compatible with the targeted versions. One prominent example is Far Cry ( released in 2004, support since 2005).
  • Only pixel shader versions to support from a specific version. Examples include Europa Universalis III by Paradox Interactive or Virtua Tennis 3 by Sega (requires pixel shader 2.0 ahead ) and Splinter Cell: Double Agent by Ubisoft (sets than 3.0 ).
344325
de