Usage

Vertex-Shader Basics

When in operation, a programmable vertex shader replaces the vertex processing done by the graphics pipeline. While using a vertex shader, state information regarding transformation and lighting operations is ignored by the fixed function pipeline. When the vertex shader is disabled and fixed function processing is returned, all current state settings apply.

Tessellation of high-order primitives should be done before the vertex shader executes. Implementations that perform surface tessellation after the shader processing must do so in a way that is not apparent to the application and shader code.

As a minimum, a vertex shader must output vertex position in homogeneous clip space. Optionally, the vertex shader can output texture coordinates, vertex color, vertex lighting, fog factors, and so on.

Pixel-Shader Basics

Pixel processing is performed by pixel shaders on individual pixels. Pixel shaders work in concert with vertex shaders; the output of a vertex shader provides the inputs for a pixel shader. Other pixel operations (fog blending, stencil operations, and render-target blending) occur after execution of the shader.

Using Shaders in Direct3D 9(Windows)

http://msdn.microsoft.com/en-us/library/windows/desktop/bb509704(v=vs.85).aspx

Using Shaders in Direct3D 10 (Windows)

http://msdn.microsoft.com/en-us/library/windows/desktop/bb509703(v=vs.85).aspx

http://www.nvidia.com/docs/IO/8228/D3DTutorial1_Shaders.ppt

http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/shader-programming-part-i-fundamentals-of-vert-r1496