Showing posts with label shaders. Show all posts
Showing posts with label shaders. Show all posts

Saturday, November 28, 2009

What are shaders?

Origin of 'shaders':
In 1989, a program known as renderman was introduced which would take the entire description of the scene through different camera angles. In 1995, it was used in the movie toy story and it was the first time that the public was introduced to the power of renderman. At the same time there was huge evolution in compuer graphics and chipsets. The concept of renderman was used in these graphics and chipsets as well.
And this is how the concept of shaders was introduced.


Definition:
Basically, shaders are programs that describe the traits of a pixel or a vertex. In technical words, shaders are a set of instructions used to calculate rendering effects on graphics hardware with a high degree of flexibility.


Types of shaders:
The unified shader model unifies these three a shaders in OpenGL and Direct3D 10.
read more...

Geometry shaders

Definition:
Geometry shaders add and remove vertices from a mesh. Geometry shaders can be used to generate geometry procedurally or to add volumetric detail to existing meshes that would be too costly to process on the CPU.


Software support:
Microsoft's Direct 3D 10 and Silicon Graphic's OpenGL 3.2 supports geometry shaders.


Description:
Geometry shader programs are executed after vertex shaders. They take as input a whole primitive, possibly with adjacency information. For example, when operating on rectangles, the four vertices are the geometry shader's input.


Uses in graphic system:
Typical uses of a geometry shader include point sprite generation, geometry tessellation, shadow volume extrusion, and single pass rendering to a cube map.
A geometry shader can generate new graphics primitives, such as points, lines, and triangles, from those primitives that were sent to the beginning of the graphics pipeline.
read more...

Vertex shaders

Definition:
A vertex shader is a graphics processing function used to add special effects to objects in a 3D environment.


Software support:
Microsoft's Direct 3D and Silicon Graphic's OpenGL supports shaders.


Description:
The purpose of vertex shaders is to transform each vertex's 3D position in virtual space to the 2D co-ordinate at which it appears on the screen. Vertex shaders can manipulate properties such as position, color, and texture coordinate, but cannot create new vertices. In simlple language, vertex shaders are used to smoothen up the sharp regions.
read more...

Pixel shaders

Definition:
A pixel shader is a type of shader program, often executed on a graphics processing unit. These programs are typically used to perform complex per-pixel effects.


Software support:
Microsoft's Direct 3D and Silicon Graphic's OpenGL supports shaders.


Description:
In OpenGL a pixel is called a fragment and hence pixel shaders are also known as fragment shaders. Pixel shaders calculate the colour of individual pixels.Pixel shaders are typically used for scene lighting and related effects such as bump mapping and color toning.

Related Posts with Thumbnails
read more...

Evolution of shaders

It took years to get the realistic gaming expirience. It was the evolution of games from pacman to doom3 to F.E.A.R2. The games got more and more realistic. Shaders were the key feature for the graphics.

At first the concept of pixel shaders was introduced. Pixel shaders the first shaders which improved the gaming  expirience. A few years later vertex shaders were introduced which took the gaming expirience from 2D to 3D. The last shader (as of now) was introduced lately in 2007 known as geometry shaders which took the gaming expirience to a new level. nVIDIA GeForce 8800 GPUs were the first providing hardware support for Geometry Shaders.

Shaders were categorised by versions. The combination of these shaders is also known as shader model. The first one was shader model 1.0 and from there it has evolved to shader model 5.0 which is featured by nVIDIA GTX 300 series cards.

So, what can we expect in future?
nVIDIA has been working on shader model 5.1/6.0 for some time and we are expecting that they will introduce it till the end of 2010.

[Note: We have tried our best to write this article in simple words. But the concept of shaders is so complicated that even if we try our best, its not possible to make it clear to everyone. Atleast not within two short paragraphs. Whatever you think about this article, whatever your opinion is, plzz let us know. Correct us if we are wrong.]
read more...