- Pixel shader
A pixel shader is a shader program, often executed on a
graphics processing unit . It adds 3D shading and lighting effects to pixels in an image, for example those in video games. Microsoft's Direct X and Open GL support pixel shaders. InOpenGL a pixel shader is called a fragment shader.Function
A pixel shader computes color and other attributes of each pixel. Pixel shaders range from always outputting the same color, to applying a lighting value, to doing
bump mapping , shadows, specular highlights, translucency and other phenomena. A pixel shader alone cannot produce very complex effects, because it operates only on a single pixel, without knowledge of a scene's geometry or of neighboring pixels. A pixel shader is a computation kernel function. Pixel shaders can alter the depth of the pixel (forZ-buffering ), or output more than one color if multiple render targets are active.Programming
Pixel shaders have been programmed in Assembly, Cg, GLSL, HLSL and other languages.
Compatibility
Hardware
This shows which cards, graphic chips, and
DirectX -Version supports which Pixel-Shader-Version. Graphic chips usually are fully downward compatible (3.0 chip supports 2.0, 1.1, etc.).(Italics indicate products that are not yet available.)
See also
*
Direct3D
*Geometry shader
*Graphics pipeline
*OpenGL
*Vertex shader References
* [http://www.opengl.org/documentation/glsl/ OpenGL Shading Language] – Documentation of Shader in
OpenGL
* [http://www.lighthouse3d.com/opengl/glsl/index.php GLSL Tutorial (engl.)]
* [http://3dshaders.com/home/index.php?option=com_weblinks&catid=14&Itemid=34 OpenGL Shading Language examples]
* [http://www.gamedev.net/columns/hardcore/dxshader3/ Fundamentals of Pixel Shaders] at Gamedev.net
Wikimedia Foundation. 2010.