Pixel shader

from Wikipedia, the free encyclopedia

Pixel shaders (also called pixel shaders , fragment shaders , abbr. PS ) are programs that are executed by the graphics processor of a 3D graphics card in the course of the graphics pipeline (in what are known as shader units ).

function

Pixel shaders are used to change the fragments to be rendered, for example to achieve a more realistic representation of surface and material properties or to change the texture representation . The pixels of the final image may result from several fragments, for example when several objects can be seen at the same time due to transparency. The shaders process these objects independently of each other, so the term fragment shader is actually the correct name, but the term pixel shader has become established in the Direct3D environment; in OpenGL, fragment shaders are correctly used.

Pixel shaders differ from vertex shaders , which change the vertices (corner points of three-dimensional objects) in order to manipulate the shape or position of the 3D objects. Examples of the use of pixel shaders are phong shading , reflections , shading , falloff , blooming and lens flares ; and HDR rendering is programmed with their help (using frame buffers that are more than 8 bits per subpixel support).

Since the shader units that execute the pixel shaders are part of the GPU , these programs do not have to run on the system's CPU , which relieves the load and can be used for other tasks. As a rule, several shader units are built into GPUs so that they do not become a bottleneck in the graphics pipeline.

Additional information on the processing chain and the programming of shaders can be found in the article Shader .

compatibility

hardware

The following table gives an overview of which graphics cards or processors with which DirectX version support which pixel shader version. It should be noted here that graphics processors usually also support older versions, for example pixel shader 3.0 processors can also work with version 2.0 pixel shaders (which is less due to the graphics processor than the graphics card driver).

Pixel shader version required DirectX version 3DLabs ATI / AMD Intel Matrox NVIDIA S3 Graphics SiS XGI
1.0 / 1.1 8.0 - Radeon 9000 - - GeForce 3 series - Xabre series -
1.2 8.0a Wildcat VP - - - - - - -
1.3 8.0a - - - Parhelia series GeForce4-Ti / Go series - Mirage 2 -
1.4 8.1 - Radeon 8500-9250 - - - - - Volari V3 series (except V3XT)
2.0 9.0 Wildcat Realizm Radeon 9500-9800 , X300-X600 Intel GMA 900, 950 M series - DeltaChrome , GammaChrome , Chrome-S2x series Mirage 3, Mirage 3+ Volari V3XT, Volari V5 series, Volari V8 series, Volari 8300, Volari XP10
2.0a 9.0b - - - - GeForce FX series - - -
2.0b 9.0b - Radeon X700-X850 - - - - - -
3.0 9.0c - Radeon X1 series Intel GMA 3000, X3000 - GeForce 6 series , Geforce 7 series - - -
4.0 10 - Radeon HD 2000 series Intel GMA X3100, X3500, HD Graphics - Geforce-8-series , Geforce-9-series , Geforce-200-series - - -
4.1 10.1 - Radeon HD 3000 series , Radeon HD 4000 series - - Geforce 200 series , Geforce 300 series Chrome 400/500 series - -
5.0 11.0 - Radeon HD 5000 series , Radeon HD 6000 series , Radeon HD 7000 series Intel HD 4000 Graphics - Geforce 400 series , Geforce 500 series , Geforce 600 series - - -

software

Because the range of functions and the programmability can vary greatly depending on the shader version, a developer is basically faced with the choice:

  • support many pixel shader versions by choosing the common denominator, version 1.0. All graphics cards are supported that have this minimum level of pixel shader capability. This option is rarely chosen because many effects can only be used efficiently from certain versions.
  • to support many pixel shader versions by writing its own, optimized shader for each version to be supported (so-called render paths ). All graphics cards that are compatible with the targeted versions are supported. A prominent example of this is Far Cry (released in 2004, support since 2005).
  • only support pixel shader versions from a certain version. Examples are Europa Universalis III from Paradox Interactive or Virtua Tennis 3 from Sega (requires Pixel-Shader 2.0) and Splinter Cell: Double Agent from Ubisoft (requires 3.0).

See also

Web links