What is a shader

A shader is a program that renders 3d material. It allows you to enhance how light reflects off 3d surfaces and objects. GPU’s are used to calcute the algorithum for a shader but it used to be done by CPU’s. There are three main parts to shaders, vertex shader, pixel shader and geometry shader.

  1.  A vertex shaders job is to change values of data that defines where a verticies is in a 3d enviroment to come out as a different colour, texture or position.
  2. A pixel shaders job is to calculate effects per pixel. Depending on screen resolution you can get more than 2 million pixels in a frame and when the frame rate runs at 60 frames per second this creates an extremely high amount of pixels to be rendered.
  3. A geometry shaders job is to add and remove verticies from the vertex shader.  

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: