Skip to Main Content
HLSL and Pixel Shaders for XAML Developers
book

HLSL and Pixel Shaders for XAML Developers

by Walt Ritscher
July 2012
Intermediate to advanced content levelIntermediate to advanced
204 pages
4h 39m
English
O'Reilly Media, Inc.
Content preview from HLSL and Pixel Shaders for XAML Developers

Chapter 1. Shader 101

It seems an obvious question to ask at the beginning of an HLSL and shader book; what exactly is a shader? It’s a small program or algorithm written explicitly to run on a computer Graphics Processing Unit (GPU). It provides a way for developers to extend the rendering capabilities of the GPU. Any program that works closely with graphics will benefit from using shaders. The video game industry spins off custom shaders by the thousands; they are as vital to game projects as business entity classes are to line-of-business (LOB) applications. Nothing prohibits business programmers from experimenting with shaders in their LOB applications; in fact, recent trends in user interface (UI) design and information visualization cry out for shader use.

Because shaders run at the kernel level of the GPU, they are automatically parallelized by the GPU hardware and are extremely fast at manipulating graphic output. Typically, the GPU can process shaders several orders of magnitude faster than if the shader code is run on a CPU.

Why Should XAML Developers Learn HLSL?

If you are an XAML developer, I’ll wager you’ve heard about pixel shaders. In fact, you may be using some of these effects in your application already. WPF introduced the DropShadowEffect and BlurEffect in .NET 3.5 SP1 and both of these classes take advantage of pixel shaders. Silverlight added pixel shaders in Silverlight 3. The Windows Phone team disappointed developers by dropping support for shaders before the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Real-Time Shader Programming

Real-Time Shader Programming

Ron Fosner

Publisher Resources

ISBN: 9781449324995Errata Page