General-purpose computing on graphics processing units: Difference between revisions

Content deleted Content added
WipEout! (talk | contribs)
No edit summary
WipEout! (talk | contribs)
No edit summary
Line 7:
Programmable [[vertex]] and fragment [[shaders]] were added to the graphics pipeline to enable game programmers to generate even more realistic effects. Vertex shaders allow the programmer to alter per-vertex attributes, such as position, color, texture coordinates, and normal vector. Fragment shaders are used to calculate the color of a [[Fragment (computer graphics)|fragment]], or per-pixel. Programmable fragment shaders allow the programmer to substitute, for example, a lighting model other than those provided by default by the graphics card, typically simple [[Gouraud shading]]. Shaders have enabled graphics programmers to create lens effects, [[displacement mapping]], and [[depth of field]].
 
The programmability of the pipelines have trended according the Microsoft’s [[DirectX]] specification, with DirectX8 introducing Shader Model 1.1, DirectX8.1 Pixel Shader Models 1.2, 1.3 and 1.4, and DirectX9 defining [[Shader Model 2.x]] and 3.0. Each shader model increased the programming model flexibilities and capabilities, ensuring the conforming hardware follows suit. The DirectX10 specification unifies the programming specification for vertex, geometry (“Geometry Shaders” are new to DirectX10) and fragment processing allowing for a better fit for unified shader hardware, thus providing a single pool of computational pool of programmable resource.
 
===Data types===
Line 16:
*32 bits per pixel - 8 bits for each of red, green, blue, and alpha
 
For early fixed function or limited programmability graphics (i.e. up to and including DirectX8.1 compliant GPU's) this was sufficient because this is also the representation used in displays. This representation does have certain limitations, however. Given sufficient graphics processing power even graphics programmers would like to use better formats, such as [[floating point]] data formats, in order to obtain effects such as [[high dynamic range imaging]]. Many GPGPU applications require floating point accuracy, which came with graphics cards conforming to the DirectX9 specification.
 
As this is written ([[9 December]] [[2005]]) GPUs commonly support two floating point formats: