Thursday, 7 February 2013

Shaders

Shaders are a small computer programs that uses in the final output of a 3d model, appearance in the graphic pipeline. There are two types of Shaders. Pixel Shader and Vertex Shader. Both of these shader are GPU (Graphic Processing Unit) component.They both uses in the final output render of the 3d object. In modern video games Shaders are used a lot to create a range of output effects to a 3d scene or to a 3d model.

Pixel Shader
Pixel Shader is a graphics processing function, it also known as Fragment Shaders, they are used to show lighting and shadow effects on individual 3d objects or the whole scene view. Simply is to make the 3d objects or the entire scene looks more realistic. The pixel Shader calculates the colour of a pixel on the screen, basically if you looking at a picture on your laptop. Pixel shader calculates what each colour is on the picture, then showing the picture on the screen.

Vertex Shader

A vertex shader is also a graphics processing function, it's uses to add special effects to objects in a 3D environment by performing mathematical operations on the objects' vertex data. Each vertex can be defined by many different variables. For instance, a vertex is always defined by its location in a 3D environment using the x-, y-, and z- coordinates. Vertices may also be defined by colours, coordinates. Vertices may also be defined by colours and textures.

No comments:

Post a Comment