Tuesday, 4 June 2013

GPU

GPU:

A graphics processing unit (GPU) is a specialized electronic circuit designed to rapidly manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display.

GPU in a phone:

This is a GPU located on the motherboard
of a mobile device.


GPU in a computer:

This is a GPU which can be located inside a compuer.
Due to the size difference, the computer GPU has the
capability to much stronger.


GPU in a games console:


 
This is a GPU located inside a Play Station 3.


The CPU is a general purposepeice of hardware, often refered to as the brain of a PC. The GPU is specialised for graphics. This means that the GPU is optimised to process trigonometry type processes, this means that they process the triangles in any object displayed on a screen.
CPUs on the other hand are optimised to process more general math for processes overall.

Although CPUs and GPUs are very different they do have a key similarity which is that both peices of hardware, they're both connected to the circuit board that process arthimical and output operations, they both also use "cores" to do any task they undertake.

There are several different API used to communicate with GPU, the main ones are DirectX and VideoToolBox. DirectX is used by Microsoft for Windows on PCs and on the Xbox 360. VideoToolBox is used by Apple for the MAC OS and Apple TV.

A GPU goes through a variety of intense computations to display 3d graphics, this is usualy known a a graphics pipeline. There are various steps of the Grphics Pipeline before the final image can be displayed on screen.

Steps of the Graphics Pipeline:


Per-vertex lighting and shading:

Geometry in a 3D scene is lit according to the different locations of light sources.
Some, (Mostly older) hardware implementations of the Graphics Timeline compute lighting only at the vertices of the polygons being render. The different lighting values of vertices  are then interpolated during the rasterization process.

Clipping:
Geometric primitives that now fall completely outside of the viewing frustum will not be visible and are discarded at this stage to increase work speed and decrease chance of loss of frame rate.

Projection transformation:
In the case of a Perspective projection, objects which are distant from the camera are made smaller. This is achieved by dividing the X and Y coordinates of each vertex of each primitive by its Z coordinate(which represents its distance from the camera).

Viewport transformation:
The post-clip vertices are transformed once again to be in window space. In practice, this transform is very simple: applying a scale (multiplying by the width of the window) and a bias (adding to the offset from the screen origin). At this point, the vertices have coordinates which directly relate to pixels in a raster.

Scan conversion and rasterization:
Rasterization is the process by which the 2D image space representation of the scene is converted into raster format and the correct resulting pixel values are determined. From now on, operations will be carried out on each single pixel. This stage is rather complex, involving multiple steps often referred as a group under the name of pixel pipeline.

Texturing and fragment shading:
At this stage of the pipeline individual fragments (or pre-pixels) are assigned a color based on values interpolated from the vertices during rasterization, from a texture in memory, or from a shader program.

Display:

The final colored pixels can then be displayed on a computer monitor or other display.
 






No comments:

Post a Comment