[gameprogrammer] Re: Shader
- From: Kevin Jenkins <gameprogrammer@xxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Tue, 06 Mar 2007 13:22:18 -0800
They are programs that are sent to your video card. There are two
kinds: Vertex and Pixel.
Vertex shaders take shader constants and a vertex lists, defined by
your 3d models. They output the modified vertices, along with other
per-vertex data, to the video card. For example, you may pass a
location as a constant, a float as another. I can use that to move
the vertices away from the point, thus creating a hole in my model.
The video card then uses the vertices to map the model to pixels,
along with per-pixel data created by or passed through the vertex shader.
The pixels are sent to the pixel shader, along with constants, and
access to loaded textures. The pixel shader can then manipulate the
pixels as desired, such as by adding two textures together, and
outputting the final color as the sum of those two textures. The
output of the pixel shader is only the final pixel color.
Edilson Vasconcelos de Melo Junior wrote:
Hi,
What are shaders? What they do? What is the best example of their use?
Thanks,
Dirso.
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- References:
- [gameprogrammer] Shader
- From: Edilson Vasconcelos de Melo Junior
Other related posts:
- » [gameprogrammer] Shader
- » [gameprogrammer] Re: Shader
Hi, What are shaders? What they do? What is the best example of their use? Thanks,Dirso.
- [gameprogrammer] Shader
- From: Edilson Vasconcelos de Melo Junior