Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 1. Shader 101 > XAML and Shaders - Pg. 7

O'Reilly Media, Inc. 4/5/2012 different color, or a different position in space. Vertex shaders are a popular way to distort the original shape and are used to apply the first lighting pass to the object. The output of this stage is passed to the rasterizer. At this point in the pipeline the rasterized data is ready for the computer display. This is where the pixel shader, if there is one, goes to work. Figure 1-3. The pixel shader in the pipeline The pixel shader examines each rasterized pixel, applies the shader algorithm, and outputs the final color value. They are frequently used to blend additional textures with the original raster image. They excel at color modification and image distortion. If you want to apply a subtle leather texture to an image the pixel shader is your tool. XAML and Shaders Now that you've learned the fundamentals of the DirectX pipeline you're ready to take a closer look at how Silverlight and WPF use shaders. Let's examine what happens in the WPF world first. In WPF, the underlying graphics engine is DirectX. That means that