<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 - Entries tagged with HLSL</title>
    <atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Tags/hlsl/RSS"></atom:link>
    <itunes:summary></itunes:summary>
    <itunes:author>Microsoft</itunes:author>
    <itunes:subtitle></itunes:subtitle>
    <image>
      <url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
      <title>Channel 9 - Entries tagged with HLSL</title>
      <link>http://channel9.msdn.com/Tags/hlsl</link>
    </image>
    <itunes:image href=""></itunes:image>
    <itunes:category text="Technology"></itunes:category>
    <description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
    <link>http://channel9.msdn.com/Tags/hlsl</link>
    <language>en</language>
    <pubDate>Sat, 18 May 2013 22:20:50 GMT</pubDate>
    <lastBuildDate>Sat, 18 May 2013 22:20:50 GMT</lastBuildDate>
    <generator>Rev9</generator>
    <c9:totalResults>14</c9:totalResults>
    <c9:pageCount>1</c9:pageCount>
    <c9:pageSize>25</c9:pageSize>
  <item>
      <title>DirectCompute Lecture Series 250: Integration with the Graphics Pipeline</title>
      <description><![CDATA[ <p>Join James Fung from Nvidia as&nbsp;he&nbsp;shows you&nbsp;how&nbsp;to make use of vertex, pixel, and geometry shaders to add visualization to their DirectCompute applications. The following topics will be covered:</p><ul><li>A Quick explanation of the Direct3D graphics pipeline </li><li>Vertex and geometry shader overview </li><li>Binding resources and views for use by graphics stages </li><li>Visualizing 2D array data </li><li>Visualizing particle data (geometry shader) </li><li>Visualizing other data (histogram, waveform, and so on) </li><li>Example of Particle Simulation Compute with Rendering </li><li>Example of Ocean Simulation Rendering using FFT for Compute </li></ul><p>The demos used in this lecture are available from <a href="http://developer.download.nvidia.com/compute/directcompute/sdk/website/samples.html">NVIDIA's DirectCompute SDK Code Samples page</a>.<br><br>For more information on DirectCompute, <a href="http://code.msdn.microsoft.com/directcomputehol">download the PDC 2009 DirectCompute HOL</a>,&nbsp;<a href="http://channel9.msdn.com/posts/gclassy/DirectCompute-Expert-Roundtable-Discussion/">watch&nbsp;the DirectCompute Roundtable discussion</a>, see the <a href="http://go.microsoft.com/fwlink/?LinkId=194362">full DirectCompute lecture series</a>,&nbsp;and <a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=DirectComputeLecture&amp;DownloadId=12986">download the slides for this lecture</a>.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:640b69df7bb34294bf979de90187b774">]]></description>
      <comments>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-250-Integration-with-the-Graphics-Pipeline</comments>
      <itunes:summary> Join James Fung from Nvidia as&amp;nbsp;he&amp;nbsp;shows you&amp;nbsp;how&amp;nbsp;to make use of vertex, pixel, and geometry shaders to add visualization to their DirectCompute applications. The following topics will be covered: A Quick explanation of the Direct3D graphics pipeline Vertex and geometry shader overview Binding resources and views for use by graphics stages Visualizing 2D array data Visualizing particle data (geometry shader) Visualizing other data (histogram, waveform, and so on) Example of Particle Simulation Compute with Rendering Example of Ocean Simulation Rendering using FFT for Compute The demos used in this lecture are available from NVIDIA&#39;s DirectCompute SDK Code Samples page.For more information on DirectCompute, download the PDC 2009 DirectCompute HOL,&amp;nbsp;watch&amp;nbsp;the DirectCompute Roundtable discussion, see the full DirectCompute lecture series,&amp;nbsp;and download the slides for this lecture. </itunes:summary>
      <itunes:duration>1217</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-250-Integration-with-the-Graphics-Pipeline</link>
      <pubDate>Wed, 18 Aug 2010 18:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-250-Integration-with-the-Graphics-Pipeline</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/6/1/0/9/5/5/DCIntegrationGraphicsPipeline_512_ch9.png" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/1/0/9/5/5/DCIntegrationGraphicsPipeline_ch9.mp3" expression="full" duration="1217" fileSize="9739692" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/1/0/9/5/5/DCIntegrationGraphicsPipeline_ch9.mp4" expression="full" duration="1217" fileSize="79533274" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/1/0/9/5/5/DCIntegrationGraphicsPipeline_ch9.wma" expression="full" duration="1217" fileSize="9855093" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/1/0/9/5/5/DCIntegrationGraphicsPipeline_ch9.wmv" expression="full" duration="1217" fileSize="79990571" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/6/1/0/9/5/5/DCIntegrationGraphicsPipeline_ch9.wmv" length="79990571" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Gus Class</dc:creator>
      <itunes:author>Gus Class</itunes:author>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-250-Integration-with-the-Graphics-Pipeline/RSS</wfw:commentRss>
      <category>C9 Lectures</category>
      <category>compute shader</category>
      <category>D3D</category>
      <category>Direct 3D</category>
      <category>DirectCompute</category>
      <category>DirectCompute Lecture Series</category>
      <category>DirectX</category>
      <category>GPGPU</category>
      <category>GPU</category>
      <category>HLSL</category>
    </item>
  <item>
      <title>DirectCompute Lecture Series 230: GPU Accelerated Physics</title>
      <description><![CDATA[ <p>Join Lee Howes,&nbsp;a Senior SDE at ATI/AMD, as he gives you a deep dive into GPU accelerated physics. <br><br></p><p>This lecture explains how DirectCompute can be employed to create solutions simulating physical systems such as fluid and cloth systems. It also&nbsp;covers how to employ some of the libraries powered by DirectCompute and how to integrate these libraries into your application.&nbsp; <br><br>After completing the lecture,&nbsp;you will be able to understand the underlying algorithms of some of the physics systems written in DirectCompute, as well as how to make use of the libraries that implement them, such as <a href="http://bulletphysics.org/wordpress/">Bullet</a>.<br><br>For more information on DirectCompute, <a href="http://code.msdn.microsoft.com/directcomputehol">download the PDC 2009 DirectCompute HOL</a>,&nbsp;<a href="http://channel9.msdn.com/posts/gclassy/DirectCompute-Expert-Roundtable-Discussion/">watch&nbsp;the DirectCompute Roundtable discussion</a>, see the <a href="http://go.microsoft.com/fwlink/?LinkId=194362">full DirectCompute lecture series</a>,&nbsp;and <a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=DirectComputeLecture&amp;DownloadId=12985">download the slides for this lecture</a>.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:39b3a5dec5a9499ab8779de90187b96a">]]></description>
      <comments>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-230-GPU-Accelerated-Physics</comments>
      <itunes:summary> Join Lee Howes,&amp;nbsp;a Senior SDE at ATI/AMD, as he gives you a deep dive into GPU accelerated physics.  This lecture explains how DirectCompute can be employed to create solutions simulating physical systems such as fluid and cloth systems. It also&amp;nbsp;covers how to employ some of the libraries powered by DirectCompute and how to integrate these libraries into your application.&amp;nbsp; After completing the lecture,&amp;nbsp;you will be able to understand the underlying algorithms of some of the physics systems written in DirectCompute, as well as how to make use of the libraries that implement them, such as Bullet.For more information on DirectCompute, download the PDC 2009 DirectCompute HOL,&amp;nbsp;watch&amp;nbsp;the DirectCompute Roundtable discussion, see the full DirectCompute lecture series,&amp;nbsp;and download the slides for this lecture. </itunes:summary>
      <itunes:duration>1683</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-230-GPU-Accelerated-Physics</link>
      <pubDate>Wed, 11 Aug 2010 15:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-230-GPU-Accelerated-Physics</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/6/3/2/8/5/5/DirectCompute230GpuPhysics_512_ch9.png" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/3/2/8/5/5/DirectCompute230GpuPhysics_2MB_ch9.wmv" expression="full" duration="1683" fileSize="70381922" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/3/2/8/5/5/DirectCompute230GpuPhysics_ch9.mp3" expression="full" duration="1683" fileSize="13470157" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/3/2/8/5/5/DirectCompute230GpuPhysics_ch9.mp4" expression="full" duration="1683" fileSize="104838076" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/3/2/8/5/5/DirectCompute230GpuPhysics_ch9.wma" expression="full" duration="1683" fileSize="13625113" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/6/3/2/8/5/5/DirectCompute230GpuPhysics_ch9.wmv" expression="full" duration="1683" fileSize="101629095" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/6/3/2/8/5/5/DirectCompute230GpuPhysics_ch9.wmv" length="101629095" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Gus Class</dc:creator>
      <itunes:author>Gus Class</itunes:author>
      <slash:comments>3</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-230-GPU-Accelerated-Physics/RSS</wfw:commentRss>
      <category>C9 Lectures</category>
      <category>compute shader</category>
      <category>D3D</category>
      <category>Direct 3D</category>
      <category>DirectCompute</category>
      <category>DirectCompute Lecture Series</category>
      <category>DirectX</category>
      <category>GPGPU</category>
      <category>GPU</category>
      <category>HLSL</category>
    </item>
  <item>
      <title>DirectCompute Lecture Series 210: GPU Optimizations and Performance</title>
      <description><![CDATA[ <p>Join James Fung from Developer Technology at NVIDIA as he covers the following advanced topics for DirectCompute: <br><br>&nbsp;&nbsp; Work distribution best practices<br>&nbsp;&nbsp; Compute shader code best practices<br>&nbsp;&nbsp; Algorithm selection best practices<br>&nbsp;&nbsp; Multi-GPU best practices</p><p>He also gives an example problem, scan/reduction, and then goes through various optimizations for that problem.</p><p>For more information on DirectCompute, <a href="http://code.msdn.microsoft.com/directcomputehol">download the PDC 2009 DirectCompute HOL</a>,&nbsp;<a href="http://channel9.msdn.com/posts/gclassy/DirectCompute-Expert-Roundtable-Discussion/">watch&nbsp;the DirectCompute Roundtable discussion</a>, see the <a href="http://go.microsoft.com/fwlink/?LinkId=194362">full DirectCompute lecture series</a>,&nbsp;and <a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=DirectComputeLecture&amp;DownloadId=12929">download the slides for this lecture</a>.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:1bef068db7394e9cb2c99dea00a70110">]]></description>
      <comments>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-210-GPU-Optimizations-and-Performance</comments>
      <itunes:summary> Join James Fung from Developer Technology at NVIDIA as he covers the following advanced topics for DirectCompute: &amp;nbsp;&amp;nbsp; Work distribution best practices&amp;nbsp;&amp;nbsp; Compute shader code best practices&amp;nbsp;&amp;nbsp; Algorithm selection best practices&amp;nbsp;&amp;nbsp; Multi-GPU best practices He also gives an example problem, scan/reduction, and then goes through various optimizations for that problem. For more information on DirectCompute, download the PDC 2009 DirectCompute HOL,&amp;nbsp;watch&amp;nbsp;the DirectCompute Roundtable discussion, see the full DirectCompute lecture series,&amp;nbsp;and download the slides for this lecture. </itunes:summary>
      <itunes:duration>1270</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-210-GPU-Optimizations-and-Performance</link>
      <pubDate>Wed, 04 Aug 2010 15:31:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-210-GPU-Optimizations-and-Performance</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/9/2/7/7/5/5/DirectCompute210_512_ch9.png" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9/2/7/7/5/5/DirectCompute210_2MB_ch9.wmv" expression="full" duration="1270" fileSize="43107054" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9/2/7/7/5/5/DirectCompute210_ch9.mp3" expression="full" duration="1270" fileSize="10164747" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9/2/7/7/5/5/DirectCompute210_ch9.mp4" expression="full" duration="1270" fileSize="66665019" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9/2/7/7/5/5/DirectCompute210_ch9.wma" expression="full" duration="1270" fileSize="10284665" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/9/2/7/7/5/5/DirectCompute210_ch9.wmv" expression="full" duration="1270" fileSize="59767313" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/9/2/7/7/5/5/DirectCompute210_ch9.wmv" length="59767313" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Gus Class</dc:creator>
      <itunes:author>Gus Class</itunes:author>
      <slash:comments>5</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-210-GPU-Optimizations-and-Performance/RSS</wfw:commentRss>
      <category>C9 Lectures</category>
      <category>compute shader</category>
      <category>D3D</category>
      <category>Direct 3D</category>
      <category>DirectCompute</category>
      <category>DirectCompute Lecture Series</category>
      <category>DirectX</category>
      <category>GPGPU</category>
      <category>GPU</category>
      <category>HLSL</category>
    </item>
  <item>
      <title>DirectCompute Lecture Series 120: Basics of DirectCompute Application Development</title>
      <description><![CDATA[ <p>In this lecture, Jason Yang (a technical lead from AMD) goes over the basics of creating a DirectCompute application that performs matrix multiplication. Specifically, he covers:<br><br></p><ul><li>Instantiating a DirectCompute Device </li><li>Writing and compiling DirectCompute Code </li><li>Executing code on the GPU </li><li>Retrieving resulting data from the GPU and passing it to the CPU </li></ul><p>The Roundtable discussion for DirectCompute can be found <a href="http://channel9.msdn.com/posts/gclassy/DirectCompute-Expert-Roundtable-Discussion/">here</a>, the <a href="http://go.microsoft.com/fwlink/?LinkId=194362">full DirectCompute lecture series is here</a>,&nbsp;and the slides for this lecture are available from <a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=DirectComputeLecture&amp;DownloadId=12909">here</a>.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:ed8aa7f237544b5f966b9dea00a70368">]]></description>
      <comments>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-120-Basics-of-DirectCompute-Application-Development</comments>
      <itunes:summary> In this lecture, Jason Yang (a technical lead from AMD) goes over the basics of creating a DirectCompute application that performs matrix multiplication. Specifically, he covers: Instantiating a DirectCompute Device Writing and compiling DirectCompute Code Executing code on the GPU Retrieving resulting data from the GPU and passing it to the CPU The Roundtable discussion for DirectCompute can be found here, the full DirectCompute lecture series is here,&amp;nbsp;and the slides for this lecture are available from here. </itunes:summary>
      <itunes:duration>1069</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-120-Basics-of-DirectCompute-Application-Development</link>
      <pubDate>Wed, 28 Jul 2010 10:18:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-120-Basics-of-DirectCompute-Application-Development</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/2/0/1/7/5/5/DirectComputeBasics_512_ch9.png" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/2/0/1/7/5/5/DirectComputeBasics_2MB_ch9.wmv" expression="full" duration="1069" fileSize="38066697" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/2/0/1/7/5/5/DirectComputeBasics_ch9.mp3" expression="full" duration="1069" fileSize="8559364" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/2/0/1/7/5/5/DirectComputeBasics_ch9.mp4" expression="full" duration="1069" fileSize="56878388" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/2/0/1/7/5/5/DirectComputeBasics_ch9.wma" expression="full" duration="1069" fileSize="8659501" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/2/0/1/7/5/5/DirectComputeBasics_ch9.wmv" expression="full" duration="1069" fileSize="53252499" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/2/0/1/7/5/5/DirectComputeBasics_ch9.wmv" length="53252499" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Gus Class</dc:creator>
      <itunes:author>Gus Class</itunes:author>
      <slash:comments>13</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-120-Basics-of-DirectCompute-Application-Development/RSS</wfw:commentRss>
      <category>C9 Lectures</category>
      <category>compute shader</category>
      <category>D3D</category>
      <category>Direct 3D</category>
      <category>DirectCompute</category>
      <category>DirectCompute Lecture Series</category>
      <category>DirectX</category>
      <category>GPGPU</category>
      <category>GPU</category>
      <category>HLSL</category>
    </item>
  <item>
      <title>DirectCompute Lecture Series 110: Memory Patterns</title>
      <description><![CDATA[ <p>In this video, Matt Sandy, a Program Manager on the DirectX team, provides an in-depth look at memory usage patterns in DirectCompute.<br><br>In this lecture, you will learn how to most effectively use memory in DirectCompute. Topics include an overview of how memory resources are used within a DirectCompute application, methods for identifying execution threads, data I/O patterns for various resource types, and how to utilize groupshared memory to improve application performance.<br><br>Slides for this lecture are available from <a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=DirectComputeLecture&amp;DownloadId=12824">here</a>.<br><br>This video is a follow up video for:<br><a href="http://channel9.msdn.com/posts/gclassy/DirectCompute-Expert-Roundtable-Discussion/">The DirectCompute Expert Roundtable Discussion</a><br>and<br>the <a href="http://channel9.msdn.com/posts/gclassy/DirectCompute-Lecture-Series-101-Introduction-to-DirectCompute/">Introduction to DirectCompute</a>&nbsp;video.<br><br>For more information about DirectCompute, download the <a href="http://code.msdn.microsoft.com/directcomputehol">PDC 2009 DirectCompute Hands on Lab</a>.<br><br>For more information about DirectX, check the <a href="http://msdn.microsoft.com/en-us/directx/default.aspx">DirectX Developer Center</a>&nbsp;and the <a href="http://msdn.com/windows">Windows Developer Center</a>.<br><br>You can also <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba">download the Direct X SDK</a>.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:2a30b5f5a8c643d2b6b19dea00a7063d">]]></description>
      <comments>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-110-Memory-Patterns</comments>
      <itunes:summary> In this video, Matt Sandy, a Program Manager on the DirectX team, provides an in-depth look at memory usage patterns in DirectCompute.In this lecture, you will learn how to most effectively use memory in DirectCompute. Topics include an overview of how memory resources are used within a DirectCompute application, methods for identifying execution threads, data I/O patterns for various resource types, and how to utilize groupshared memory to improve application performance.Slides for this lecture are available from here.This video is a follow up video for:The DirectCompute Expert Roundtable Discussionandthe Introduction to DirectCompute&amp;nbsp;video.For more information about DirectCompute, download the PDC 2009 DirectCompute Hands on Lab.For more information about DirectX, check the DirectX Developer Center&amp;nbsp;and the Windows Developer Center.You can also download the Direct X SDK. </itunes:summary>
      <itunes:duration>1065</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-110-Memory-Patterns</link>
      <pubDate>Wed, 21 Jul 2010 16:43:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-110-Memory-Patterns</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/3/2/9/6/5/5/DirectComputeMemoryPatterns_512_ch9.png" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/3/2/9/6/5/5/DirectComputeMemoryPatterns_2MB_ch9.wmv" expression="full" duration="1065" fileSize="49671753" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/3/2/9/6/5/5/DirectComputeMemoryPatterns_ch9.mp3" expression="full" duration="1065" fileSize="8525266" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/3/2/9/6/5/5/DirectComputeMemoryPatterns_ch9.mp4" expression="full" duration="1065" fileSize="58583707" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/3/2/9/6/5/5/DirectComputeMemoryPatterns_ch9.wma" expression="full" duration="1065" fileSize="8623453" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/3/2/9/6/5/5/DirectComputeMemoryPatterns_ch9.wmv" expression="full" duration="1065" fileSize="52084443" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/3/2/9/6/5/5/DirectComputeMemoryPatterns_ch9.wmv" length="52084443" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Gus Class</dc:creator>
      <itunes:author>Gus Class</itunes:author>
      <slash:comments>5</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-110-Memory-Patterns/RSS</wfw:commentRss>
      <category>C9 Lectures</category>
      <category>compute shader</category>
      <category>D3D</category>
      <category>Direct 3D</category>
      <category>DirectCompute</category>
      <category>DirectCompute Lecture Series</category>
      <category>DirectX</category>
      <category>GPGPU</category>
      <category>GPU</category>
      <category>HLSL</category>
    </item>
  <item>
      <title>DirectCompute Lecture Series 101:  Introduction to DirectCompute</title>
      <description><![CDATA[ <p>In this lecture, Chas Boyd, the Program Manager&nbsp;Architect of&nbsp;Windows Graphics,&nbsp;gives you an introduction to DirectCompute. He covers some background on DirectCompute, gives examples of applications, gives an overview of the DirectCompute API, and then covers the principles of basic usage.<br><br>The Roundtable discussion for DirectCompute can be found <a href="http://channel9.msdn.com/posts/gclassy/DirectCompute-Expert-Roundtable-Discussion/">here</a>&nbsp;and the slides are available from <a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=DirectComputeLecture&amp;DownloadId=12810">here</a>.<br><br>For more information about DirectX, check the <a href="http://msdn.microsoft.com/en-us/directx/default.aspx">DirectX Developer Center</a>&nbsp;and the <a href="http://msdn.com/windows">Windows Developer Center</a>.<br><br>You can also <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba">download the Direct X SDK</a>. <br><br>The following videos continue the series:</p><p>·&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://channel9.msdn.com/posts/gclassy/DirectCompute-Lecture-Series-110-Memory-Patterns/">DirectCompute 110: Memory Patterns</a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:277178fb5e5f4042b4769dea00a708df">]]></description>
      <comments>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-101-Introduction-to-DirectCompute</comments>
      <itunes:summary> In this lecture, Chas Boyd, the Program Manager&amp;nbsp;Architect of&amp;nbsp;Windows Graphics,&amp;nbsp;gives you an introduction to DirectCompute. He covers some background on DirectCompute, gives examples of applications, gives an overview of the DirectCompute API, and then covers the principles of basic usage.The Roundtable discussion for DirectCompute can be found here&amp;nbsp;and the slides are available from here.For more information about DirectX, check the DirectX Developer Center&amp;nbsp;and the Windows Developer Center.You can also download the Direct X SDK. The following videos continue the series: &#183;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DirectCompute 110: Memory Patterns </itunes:summary>
      <itunes:duration>1487</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-101-Introduction-to-DirectCompute</link>
      <pubDate>Wed, 14 Jul 2010 17:51:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-101-Introduction-to-DirectCompute</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/1/4/3/6/5/5/DirectComputeIntroduction_512_ch9.png" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1/4/3/6/5/5/DirectComputeIntroduction_2MB_ch9.wmv" expression="full" duration="1487" fileSize="44955247" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1/4/3/6/5/5/DirectComputeIntroduction_ch9.mp3" expression="full" duration="1487" fileSize="11900525" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1/4/3/6/5/5/DirectComputeIntroduction_ch9.mp4" expression="full" duration="1487" fileSize="73906734" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1/4/3/6/5/5/DirectComputeIntroduction_ch9.wma" expression="full" duration="1487" fileSize="12032993" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1/4/3/6/5/5/DirectComputeIntroduction_ch9.wmv" expression="full" duration="1487" fileSize="63002351" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/1/4/3/6/5/5/DirectComputeIntroduction_ch9.wmv" length="63002351" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Gus Class</dc:creator>
      <itunes:author>Gus Class</itunes:author>
      <slash:comments>9</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Lecture-Series-101-Introduction-to-DirectCompute/RSS</wfw:commentRss>
      <category>C9 Lectures</category>
      <category>compute shader</category>
      <category>D3D</category>
      <category>Direct 3D</category>
      <category>DirectCompute</category>
      <category>DirectCompute Lecture Series</category>
      <category>DirectX</category>
      <category>GPGPU</category>
      <category>GPU</category>
      <category>HLSL</category>
    </item>
  <item>
      <title>DirectCompute Expert Roundtable Discussion</title>
      <description><![CDATA[ <p>In this video, Robert Hess has a roundtable discussion with industry experts&nbsp;to help you understand exactly what DirectCompute is and the kinds of software problems to which you can apply DirectCompute in order to leverage the GPU for computation.<br><br>This video features:</p><p>Eric Young (Manager of Developer Technology, NVIDIA Corporation)<br>Chas Boyd (Program Manager Architect&nbsp; Windows Graphics, &nbsp;Microsoft Corporation)<br>Justin Hensley (Senior MTS, AMD Office of CTO, ATI/AMD) </p><p>The first demo can be found here: <a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=DirectComputeLecture&amp;DownloadId=12774">Video Stabilization</a>.<br>The second demo can be found here:&nbsp;&nbsp;<a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=DirectComputeLecture&amp;DownloadId=12773">DirectCompute FFT Sample (Color Grid Wide).</a><br>For more information about DirectX, check the <a href="http://msdn.microsoft.com/en-us/directx/default.aspx">DirectX Developer Center</a>&nbsp;and the <a href="http://msdn.com/windows">Windows Developer Center</a>.<br><br>You can also <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba">download the Direct X SDK</a>.</p><p>The&nbsp;<a href="http://go.microsoft.com/fwlink/?LinkId=194362">DirectCompute lecture series</a> will receive updates from June 14th through July 5th, so keep checking back on the link. </p><p>The following videos continue the series:<br><a href="http://channel9.msdn.com/posts/gclassy/DirectCompute-Lecture-Series-101-Introduction-to-DirectCompute/">DirectCompute 101: Introduction</a><br><a href="http://channel9.msdn.com/posts/gclassy/DirectCompute-Lecture-Series-110-Memory-Patterns/">DirectCompute 110: Memory Patterns</a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:66f53ef0ee904dfaae7e9dea00a70cd1">]]></description>
      <comments>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Expert-Roundtable-Discussion</comments>
      <itunes:summary> In this video, Robert Hess has a roundtable discussion with industry experts&amp;nbsp;to help you understand exactly what DirectCompute is and the kinds of software problems to which you can apply DirectCompute in order to leverage the GPU for computation.This video features: Eric Young (Manager of Developer Technology, NVIDIA Corporation)Chas Boyd (Program Manager Architect&amp;nbsp; Windows Graphics, &amp;nbsp;Microsoft Corporation)Justin Hensley (Senior MTS, AMD Office of CTO, ATI/AMD)  The first demo can be found here: Video Stabilization.The second demo can be found here:&amp;nbsp;&amp;nbsp;DirectCompute FFT Sample (Color Grid Wide).For more information about DirectX, check the DirectX Developer Center&amp;nbsp;and the Windows Developer Center.You can also download the Direct X SDK. The&amp;nbsp;DirectCompute lecture series will receive updates from June 14th through July 5th, so keep checking back on the link.  The following videos continue the series:DirectCompute 101: IntroductionDirectCompute 110: Memory Patterns </itunes:summary>
      <itunes:duration>2663</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Expert-Roundtable-Discussion</link>
      <pubDate>Wed, 07 Jul 2010 16:52:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Expert-Roundtable-Discussion</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/ch9/1/1/9/5/5/5/DirectComputeExpertRoundtable_512_ch9.png" height="384" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1/1/9/5/5/5/DirectComputeExpertRoundtable_2MB_ch9.wmv" expression="full" duration="2663" fileSize="662757125" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1/1/9/5/5/5/DirectComputeExpertRoundtable_ch9.mp3" expression="full" duration="2663" fileSize="21310623" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1/1/9/5/5/5/DirectComputeExpertRoundtable_ch9.mp4" expression="full" duration="2663" fileSize="293131179" type="video/mp4" medium="video"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1/1/9/5/5/5/DirectComputeExpertRoundtable_ch9.wma" expression="full" duration="2663" fileSize="21549665" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://ecn.channel9.msdn.com/o9/ch9/1/1/9/5/5/5/DirectComputeExpertRoundtable_ch9.wmv" expression="full" duration="2663" fileSize="415482815" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://ecn.channel9.msdn.com/o9/ch9/1/1/9/5/5/5/DirectComputeExpertRoundtable_ch9.wmv" length="415482815" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Gus Class</dc:creator>
      <itunes:author>Gus Class</itunes:author>
      <slash:comments>11</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/gclassy/DirectCompute-Expert-Roundtable-Discussion/RSS</wfw:commentRss>
      <category>compute shader</category>
      <category>D3D</category>
      <category>Direct 3D</category>
      <category>DirectCompute</category>
      <category>DirectCompute Lecture Series</category>
      <category>DirectX</category>
      <category>GPGPU</category>
      <category>GPU</category>
      <category>HLSL</category>
    </item>
  <item>
      <title>SilverShader – Introduction to Silverlight and WPF Pixel Shaders</title>
      <description><![CDATA[
<p>This article explains how to write pixel shaders for the Microsoft Silverlight and WPF platform with HLSL, as well as how to write an extensible Silverlight application for shader demos.

</p>
<h3>Introduction</h3>
<p>Almost 10 years ago, <a href="http://www.microsoft.com/Presspass/press/2000/nov00/directxlaunchpr.mspx">
Microsoft announced DirectX 8.0</a>, including the huge real-time computer graphics milestone, Direct3D 8.0. Direct3D 8.0 introduced programmable
<a href="http://en.wikipedia.org/wiki/Shader_(computer_science)">shaders</a> and gave the developers a chance to create never-before-seen effects and experiences apart from the fixed-function graphics pipeline. With Direct3D 8.0's new shader capabilities, it
 became possible to compute neat custom-rendering effects on mainstream graphics hardware. Today's graphics hardware is capable of running hundreds of shaders in parallel and modern games make heavy use of this technology t to achieve stunning effects.
</p>
<p>A shader is a rather small program, a so-called kernel function, typically executed in parallel for each data element.
<a href="http://en.wikipedia.org/wiki/Pixel_shader">Pixel shaders</a>, for example, are executed for each pixel of a bitmap, and therefore used to implement per-pixel effects.
</p>
<p>This introductory article will explain how to write pixel shaders for Silverlight and WPF, what tools should be used, and how to work with the tools. Furthermore, it will show how to build an extensible Silverlight shader application.</p>
<h3>Demo Application</h3>
<p>The demo application makes it possible to apply different shaders to an image or to the live stream from the webcam. The application not only comes with the two shaders that will be implemented in this article, it also contains three other shaders I've written
 before. The complete source code is licensed under the <a href="http://www.opensource.org/licenses/ms-pl.html">
Ms-PL</a> and can be downloaded from the <a href="http://silvershader.codeplex.com">
CodePlex site</a>.</p>
<p>You need at least the Silverlight 4 runtime installed to run the sample and a webcam is needed in order to exploit the full functionality. The runtime is available for
<a href="http://go.microsoft.com/fwlink/?LinkID=149156">Windows</a> and <a href="http://go.microsoft.com/fwlink/?LinkId=107365">
Mac</a>. </p>
<p><a href="http://dl.dropbox.com/u/2681028/CodeplexData/SilverShader/Sample/SilverShaderTestPage.html">Open the sample</a></p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/5428.clip_5F00_image002_5F00_3589A3B6.jpg"><strong><img title="clip_image002" border="0" alt="clip_image002" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/5444.clip_5F00_image002_5F00_thumb_5F00_5DF85FFD.jpg" width="500" height="526"></strong></a></p>
<p align="center"><strong>Figure 1: Screenshot of the demo application</strong></p>
<h4>How To Use?</h4>
<p>You can start and stop the webcam with the <a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/6014.clip_5F00_image004_5F00_7B8A3AFC.gif">
<img title="clip_image004" border="0" alt="clip_image004" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/5037.clip_5F00_image004_5F00_thumb_5F00_467DABCC.gif" width="21" height="21"></a>
 Button, or you can load an image from disk with the <a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/2311.clip_5F00_image006_5F00_023D4480.gif">
<img title="clip_image006" border="0" alt="clip_image006" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/8662.clip_5F00_image006_5F00_thumb_5F00_3AE7EE8D.gif" width="20" height="20"></a>
 Button. Use the ComboBox to change the pixel shader that is applied to the source. Each shader has its own controls to change the used parameters. The controls should be pretty much self-explaining. Just try them out.
</p>
<p>When you click the <a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/3465.clip_5F00_image007_5F00_4CC4825A.gif">
<img title="clip_image007" border="0" alt="clip_image007" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/4035.clip_5F00_image007_5F00_thumb_5F00_217FEB53.gif" width="20" height="20"></a>
 Button for the first time, you'll need to give permission for the capturing. This application uses the default Silverlight capture device. You can specify default video and audio devices with the Silverlight Configuration. Just press the right mouse button
 over the application, click &quot;Silverlight&quot; in the context menu, and select the &quot;Webcam / Mic&quot; tab to set them.</p>
<h3>Where do start?</h3>
<h4>What do we have in Silverlight and WPF? </h4>
<p>Pixel shaders were introduced with WPF 3.5 SP1, and later with Silverlight 3, as so-called
<a href="http://msdn.microsoft.com/en-us/library/system.windows.media.effects.shadereffect.aspx">
ShaderEffects</a>. <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.effects.shadereffect.aspx">
ShaderEffects</a> can be applied to any control to create both nice visual effects and new user experiences. WPF 3.5 SP1 and Silverlight support the
<a href="http://msdn.microsoft.com/en-us/library/bb219843%28v=VS.85%29.aspx">Shader Model 2</a>, which is limited to a total of 96 instructions (64 arithmetic and 32 texture instructions). Modern DirectX 11 graphics cards already support
<a href="http://msdn.microsoft.com/en-us/library/ff471356(v=VS.85).aspx">Shader Model 5</a>, which doesn't have such limits. Silverlight pixel shaders, however, are executed on the
<a href="http://en.wikipedia.org/wiki/Central_processing_unit">CPU</a> and not on the specialized
<a href="http://en.wikipedia.org/wiki/Graphics_processing_unit">GPU</a>. Since the software rendering pipelines make use of modern CPU capabilities like
<a href="http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions">SSE</a> and multi-core execution, they still
<a href="http://kodierer.blogspot.com/2009/08/silverlight-3-writeablebitmap.html">
run pretty fast and are the right way to implement effects</a> in Silverlight. </p>
<p>WPF renders the shaders slightly different. If the shader is applied to an element which is rendered on the graphics card, the shader will also be executed on the GPU. But if the element is being rendered for printing, certain
<a href="http://msdn.microsoft.com/en-us/library/system.windows.media.tilebrush.aspx">
TileBrushs</a> are used or any other reason <a href="http://msdn.microsoft.com/en-us/library/ms742196.aspx">
prevents hardware acceleration</a>, the element and the shader will be rendered in software. This rendering is done on WPF's render thread and the software shader unit also uses fast SSE instructions like Silverlight's renderer, but does not take advantage
 of multiple CPU cores.</p>
<p>WPF 4 supports <a href="http://msdn.microsoft.com/en-us/library/bb509656(v=VS.85).aspx">
Shader Model 3</a> with a much <a href="http://msdn.microsoft.com/en-us/library/bb219845(v=VS.85).aspx">
higher instruction count limit</a> and these pixel shaders are only executed on the GPU. Due to the more complex computation there's no software rendering fallback. The shader will simply be ignored if it's applied to an element being rendered in software or
 the graphics hardware doesn't support Shader Model 3.</p>
<p>This article targets Silverlight and WPF and therefore stays within the bounds of the
<a href="http://msdn.microsoft.com/en-us/library/bb219843%28v=VS.85%29.aspx">Shader Model 2</a>.</p>
<p></p>
<p></p>
<p></p>
<h4>How to program shaders?</h4>
<p>There are several ways to write and compile shader programs. Nowadays, the most common method used in the
<a href="http://en.wikipedia.org/wiki/Direct3D">Direct3D</a> and Windows world is a language called High Level Shading Language (<a href="http://en.wikipedia.org/wiki/High_Level_Shader_Language">HLSL</a>). The Direct3D shader compiler
<a href="http://msdn.microsoft.com/en-us/library/bb232919(VS.85).aspx">fxc.exe</a> compiles the HLSL code into byte-code, which is then executed by the runtime.
</p>
<p>HLSL is a C-style language with some special data types and intrinsic functions, but without pointers. If you know how to write code in a C-style language like C#, you will quickly learn how to write a shader with HLSL. By the way, if you know HLSL, you
 also know NVIDIA's shading language <a href="http://en.wikipedia.org/wiki/Cg_(programming_language)">
Cg</a>. Cg and HLSL have the same root and are very similar.</p>
<p>HLSL defines scalar and various vector / matrix <a href="http://msdn.microsoft.com/en-us/library/bb509587(v=VS.85).aspx">
data types</a> for integer and floating point operations. The <a href="http://msdn.microsoft.com/en-us/library/ff471376(v=VS.85).aspx">
built-in intrinsic functions</a> support scalar and vector data types. <a href="http://msdn.microsoft.com/en-us/library/bb509600(v=VS.85).aspx">
Flow-control statements</a>—such as if, switch, for, and while—are also possible. Of course, the curly brace is used for code blocks and most of the C
<a href="http://msdn.microsoft.com/en-us/library/bb509631(v=VS.85).aspx">operators</a> are also supported. The compiler uses
<a href="http://msdn.microsoft.com/en-us/library/bb509647(v=VS.85).aspx#PS">semantics</a> to both determine the intended usage of a parameter and provide the right data for it. The
<a href="http://msdn.microsoft.com/en-us/library/dd607359(v=VS.85).aspx">register</a> keyword is typically used to pass a parameter into the shader program. The elements of the vector types can be accessed through various aliases, such as x, y, z, w; r, g,
 b, a; u, v; etc. It's also possible to combine these and write nice and short statements by using swizzling:</p>
<p><b>HLSL <br>
</b></p>
<pre class="csharpcode"><span class="rem">// Create 3D float vector a and b with different syntax</span>
float3 a = float3(1, 2, 3);
float3 b = {5, 6, 7};

<span class="rem">// Calculate cross product of vector a and b using swizzling</span>
float3 crossProduct = a.yzx * b.zxy - a.zxy * b.yzx;</pre>
<style type="text/css">
<!--
.csharpcode, .csharpcode 
	{font-size:small;
	color:black;
	font-family:consolas,"Courier New",courier,monospace;
	background-color:#ffffff}
.csharpcode 
	{margin:0em}
.csharpcode .rem
	{color:#008000}
.csharpcode .kwrd
	{color:#0000ff}
.csharpcode .str
	{color:#006080}
.csharpcode .op
	{color:#0000c0}
.csharpcode .preproc
	{color:#cc6633}
.csharpcode .asp
	{background-color:#ffff00}
.csharpcode .html
	{color:#800000}
.csharpcode .attr
	{color:#ff0000}
.csharpcode .alt
	{background-color:#f4f4f4;
	width:100%;
	margin:0em}
.csharpcode .lnum
	{color:#606060}
-->
</style>
<p>The <a href="http://msdn.microsoft.com/en-us/library/bb509638(v=VS.85).aspx">MSDN</a> is a great resource for HLSL and provides detailed explanations of the syntax and functions. The following examples will make it clearer and the explanations should help
 to get you started.</p>
<h4>What tools to use?</h4>
<p>Of course, it's possible to write a pixel shader with a simple text editor and compile it with the command line tool
<a href="http://msdn.microsoft.com/en-us/library/bb232919(VS.85).aspx">fxc.exe</a>, but there's a great tool available that makes the process a lot easier. The
<a href="http://shazzam-tool.com/">Shazzam Tool</a> by <a href="http://blog.waltritscher.com">
Walt Ritscher</a> is THE utility for Silverlight and WPF shader development. It comes with an HLSL editor, which includes syntax highlighting, that compiles the shader and applies it right away to a sample input. It also generates controls for each parameter,
 which may be used to change the shader settings on the fly, and it creates the needed C# or VB source code file with a class that is derived from
<a href="http://msdn.microsoft.com/en-us/library/system.windows.media.effects.shadereffect.aspx">
ShaderEffect</a>. </p>
<p>Here's what you need to get started:</p>
<ol>
<li><a href="http://msdn.microsoft.com/en-us/directx/aa937788.aspx">Download the DirectX SDK</a> and install it.
</li><li><a href="http://shazzam-tool.com/publish.htm">Download the Shazzam Tool</a> and install it.
</li><li>After the Shazzam Tool is started, verify that the path to the <i>DirectX FX compiler</i> is set (Figure 2). The fxc.exe is normally located in the DirectX SDK installation folder under Utilities\bin\x86. Also make sure the right
<i>Target framework</i> is selected and a <i>Generated namespace</i> is set. </li><li>To see if everything works, open a <i>Sample Shader</i> with the <i>Shader Loader</i>, select a sample tab page, and try the controls on the
<i>Change Shader Settings</i> page (Figure 3). </li></ol>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/5037.clip_5F00_image009_5F00_6C735C22.jpg"><strong><img title="clip_image009" border="0" alt="clip_image009" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/3872.clip_5F00_image009_5F00_thumb_5F00_32F04C2B.jpg" width="271" height="536"></strong></a></p>
<p align="center"><strong>Figure 2: Shazzam Tool Settings</strong></p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/5543.clip_5F00_image011_5F00_796D3C33.jpg"><strong><img title="clip_image011" border="0" alt="clip_image011" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/1323.clip_5F00_image011_5F00_thumb_5F00_1124739A.jpg" width="500" height="429"></strong></a></p>
<p align="center"><strong>Figure 3: Shazzam Tool Overview</strong></p>
<h3>How to write a pixel shader?</h3>
<p>Now that we have the right tools installed and configured, we are ready to write the first pixel shader and the Silverlight application that will use it.</p>
<h4>Example 1: The Tint Shader</h4>
<p>The first pixel shader we're writing is a rather simple tint shader that converts the pixel into gray and tints it with a parameterized color.</p>
<p>In the Shazzam Tool, select <i>File </i>à<i> New Shader File</i>,<i> </i>choose a location for the HLSL FX file, and name it TintShader. Shazzam will automatically create the basic pixel shader code, including a
<b>float</b> parameter SampleI. Hit the F5 key to compile and apply the shader to the selected sample image.</p>
<p><b>HLSL <br>
</b></p>
<pre class="csharpcode">sampler2D input : register(s0);

<span class="rem">/// &lt;summary&gt;Explain the purpose of this variable.&lt;/summary&gt;</span>
<span class="rem">/// &lt;minValue&gt;05/minValue&gt;</span>
<span class="rem">/// &lt;maxValue&gt;10&lt;/maxValue&gt;</span>
<span class="rem">/// &lt;defaultValue&gt;3.5&lt;/defaultValue&gt;</span>
<span class="kwrd">float</span> SampleI : register(C0);

float4 main(float2 uv : TEXCOORD) : COLOR 
{
    float4 Color; 
    Color = tex2D(input, uv.xy);
    <span class="kwrd">return</span> Color; 
}</pre>
<p>The input register is the actual bitmap / texture that holds the pixels and is sampled inside the pixel shader. This pixel shader
<b>main</b> function is the entry point and is executed for each pixel of the input bitmap. The coordinate of the current pixel that is processed is passed as the<b> float2</b> parameter uv. This coordinate is normalized to the range [0, 1]. The color of the
 pixel at the passed uv coordinate is sampled as <b>float4 </b>with the built-in <a href="http://msdn.microsoft.com/en-us/library/bb509677(v=VS.85).aspx">
<b>tex2D</b> intrinsic function</a>. A <b>float4</b> <b>COLOR</b> value is expected as the return value of the pixel shader.</p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/7178.clip_5F00_image013_5F00_0ADF78AA.jpg"><strong></strong></a><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/5100.clip_5F00_image013_5F00_236F15FA.jpg"><img title="clip_image013" border="0" alt="clip_image013" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/7026.clip_5F00_image013_5F00_thumb_5F00_14E2186A.jpg" width="398" height="262"></a></p>
<p align="center"><strong>Figure 4: Output of the initial shader code (original image)</strong></p>
<p>The initial pixel shader code returns the original color for each pixel and we use this as the starter for our gray scale conversion.</p>
<h4>Gray Conversion</h4>
<p><b>HLSL <br>
</b></p>
<pre class="csharpcode">sampler2D input : register(s0);

float4 main(float2 uv : TEXCOORD) : COLOR 
{
   <span class="rem">// Sample the original color at the coordinate</span>
   float4 color = tex2D(input, uv);
    
   <span class="rem">// Convert the color to gray</span>
  <span class="kwrd">float</span> gray = dot(color.rgb, float3(0.2126, 0.7152, 0.0722));
    
   <span class="rem">// Return gray with the original alpha value</span>
   <span class="kwrd">return</span> float4(gray, gray, gray, color.a); 
}</pre>
<p></p>
<p>The original color is sampled and then converted to gray using the <a href="http://msdn.microsoft.com/en-us/library/bb509594(v=VS.85).aspx">
<b>dot</b></a> product of the <b>r</b>ed, <b>g</b>reen, and <b>b</b>lue values with a constant
<b>float3</b> vector. The result actually represents the <a href="http://en.wikipedia.org/wiki/Luminance_(relative)">
luminance</a> of the pixel. The <a href="http://en.wikipedia.org/wiki/Dot_product">
dot product</a> multiplies the elements of the color vector with the elements of constant vector and adds the three products, thus resulting in a scalar
<b>float</b> value. The return value of the pixel shader is a new color made up of the gray value for RGB and the original alpha (transparency) of the sampled pixel.</p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/5826.clip_5F00_image015_5F00_5C19C007.jpg"><strong></strong></a><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/3365.clip_5F00_image015_5F00_709F0F85.jpg"><img title="clip_image015" border="0" alt="clip_image015" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/4073.clip_5F00_image015_5F00_thumb_5F00_79C9495B.jpg" width="398" height="268"></a></p>
<p align="center"><strong>Figure 5: Output of the gray conversion shader</strong></p>
<h4>Parametric Tinting </h4>
<p>The gray conversion shader can now be extended to tint the output in a color that is passed as a parameter through a shader
<b>register</b>.</p>
<p><b>HLSL <br>
</b></p>
<pre class="csharpcode"><span class="rem">/// &lt;summary&gt;The tint color.&lt;/summary&gt;</span>
<span class="rem">/// &lt;type&gt;Color&lt;/type&gt;</span>
<span class="rem">/// &lt;defaultValue&gt;0.9,0.7,0.3,1&lt;/defaultValue&gt;</span>
float4 TintColor : register(C0);

sampler2D Input : register(s0);

float4 main(float2 uv : TEXCOORD) : COLOR 
{
   <span class="rem">// Sample the original color at the coordinate</span>
   float4 color = tex2D(Input, uv);
    
   <span class="rem">// Convert the color to gray</span>
   <span class="kwrd">float</span> gray = dot(color.rgb, float3(0.2126, 0.7152, 0.0722)); 
    
   <span class="rem">// Create the gray color with the original alpha value</span>
   float4 grayColor = float4(gray, gray, gray, color.a); 
   
   <span class="rem">// Return the tinted pixel</span>
   <span class="kwrd">return</span> grayColor * TintColor;
}</pre>
<p>The color used to tint every pixel is passed as a parameter and therefore defined as the first
<b>register</b> C0 (the next parameter should then be in the <b>register</b> C1). The XML comment is used by Shazzam to both create convenient controls and initialize the generated code. Shazzam creates the appropriate controls for the data type and uses the
 defaultValue, minValue and maxValue (Figure 6). The changed value of the control is applied directly to the Sample image, which allows a quick and easy shader development.
</p>
<p>Each element (RGBA) of the passed TintColor parameter is then multiplied with the
<b>float4</b> gray color and returned. The result of the default TintColor values is a
<a href="http://en.wikipedia.org/wiki/Sepia_tone">sepia-toned</a> image (Figure 7).</p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/5481.clip_5F00_image017_5F00_7D676438.jpg"><img title="clip_image017" border="0" alt="clip_image017" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/5700.clip_5F00_image017_5F00_thumb_5F00_4378214C.jpg" width="528" height="344"></a></p>
<p align="center"><strong>Figure 6: Shazzam Tool Shader Settings</strong></p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/2744.clip_5F00_image019_5F00_62BAC81F.jpg"><img title="clip_image019" border="0" alt="clip_image019" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/1754.clip_5F00_image019_5F00_thumb_5F00_624E952A.jpg" width="398" height="268"></a></p>
<p align="center"><strong>Figure 7: Output of the tint shader</strong></p>
<h4>Wiring it together with Silverlight </h4>
<p>Now it's time to use the shader in a Silverlight application and apply it to an Image, MediaElement, or whatever
<a href="http://msdn.microsoft.com/en-us/library/system.windows.uielement(VS.95).aspx">
UIElement</a> you like.</p>
<ol>
<li>Start Visual Studio, create a new <i>Silverlight Application</i> project, and select at least Silverlight 3 as the target framework.
</li><li>In the Shazzam Tool, click on <i>Compile Shader</i> in the<i> Tools</i> menu and then on
<i>Explore Compiled Shaders</i>. Make sure the <i>Generated namespace</i> setting (Figure 2) matches the assembly name of the Silverlight application.
</li><li>Copy the compiled shader file TintShader.ps and the corresponding C# or VB TintShaderEffect.cs|vb file from the
<i>GeneratedShaders</i> folder and the CS|VB subfolder into the Silverlight project directory.
</li><li>In Visual Studio, add the TintShaderEffect.cs|vb and the TintShader.ps file to the project. The property
<i>Build Action</i> of the TintShader.ps file must be set to <i>Resource</i>. Rebuild the solution.
</li><li>Open the MainPage.xaml file and add the namespace declaration and a Button or any other control that has the TintShaderEffect class applied (see below).
</li><li>Hit the F5 key and see your Silverlight shader application in action (Figure 8).
</li></ol>
<p><b>XAML </b></p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">UserControl</span> <span class="attr">x:Class</span><span class="kwrd">=&quot;ShaderDemoApp.MainPage&quot;</span>
    <span class="attr">xmlns</span><span class="kwrd">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span>
    <span class="attr">xmlns:x</span><span class="kwrd">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span>
    <span class="attr">xmlns:d</span><span class="kwrd">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span>
    <span class="attr">xmlns:mc</span><span class="kwrd">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span>
    <span class="attr">mc:Ignorable</span><span class="kwrd">=&quot;d&quot;</span>
    <span class="attr">d:DesignHeight</span><span class="kwrd">=&quot;300&quot;</span> <span class="attr">d:DesignWidth</span><span class="kwrd">=&quot;400&quot;</span>
    <span class="attr">xmlns:local</span><span class="kwrd">=&quot;clr-namespace:ShaderDemoApp&quot;</span><span class="kwrd">&gt;</span>

    <span class="kwrd">&lt;</span><span class="html">Grid</span> <span class="attr">x:Name</span><span class="kwrd">=&quot;LayoutRoot&quot;</span> <span class="attr">Background</span><span class="kwrd">=&quot;Gray&quot;</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">Button</span> <span class="attr">Content</span><span class="kwrd">=&quot;Big Tinted Button&quot;</span> <span class="attr">Width</span><span class="kwrd">=&quot;200&quot;</span> 
                <span class="attr">Height</span><span class="kwrd">=&quot;200&quot;</span> <span class="attr">Background</span><span class="kwrd">=&quot;Blue&quot;</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">Button.Effect</span><span class="kwrd">&gt;</span>
                <span class="kwrd">&lt;</span><span class="html">local:TintShaderEffect</span> <span class="kwrd">/&gt;</span>
            <span class="kwrd">&lt;/</span><span class="html">Button.Effect</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">Button</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">Grid</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">UserControl</span><span class="kwrd">&gt;</span></pre>
<p>&nbsp;</p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/1667.clip_5F00_image021_5F00_41C75578.jpg"><strong><img title="clip_image021" border="0" alt="clip_image021" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/6064.clip_5F00_image021_5F00_thumb_5F00_61762F40.jpg" width="398" height="296"></strong></a></p>
<p align="center"><strong>Figure 8: The TintShader applied to the Button</strong></p>
<p>That's all that's needed to get a pixel shader working inside a Silverlight application. Please note that no manual C# or VB code-behind was written.</p>
<h4>Example 2: The Mosaic Shader aka The Donut Shader</h4>
<p>The second post process shader effect we'll write is a bit more advanced. It starts with pixelating the image before rounding the blocks until we've the final Mosaic-like result.
</p>
<p>For the development of this shader, we can use a different image. To do so, click the
<i>Open Image File</i> menu item in Shazzam's <i>File</i> menu. I used a famous test picture for image processing algorithms:
<a href="http://en.wikipedia.org/wiki/Lenna">Lenna</a>. By the way, there's an interesting
<a href="http://ndevilla.free.fr/lena/">story</a> behind this picture of Lena Söderberg.</p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/7127.clip_5F00_image023_5F00_0EF74F04.jpg"><strong><img title="clip_image023" border="0" alt="clip_image023" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/7633.clip_5F00_image023_5F00_thumb_5F00_3F3E23BA.jpg" width="284" height="284"></strong></a></p>
<p align="center"><strong>Figure 9: Original Lenna test image</strong></p>
<h4>Pixelating the Input</h4>
<p><b>HLSL <br>
</b></p>
<pre class="csharpcode"><span class="rem">/// &lt;summary&gt;The number of pixel blocks.&lt;/summary&gt;</span>
<span class="rem">/// &lt;type&gt;Single&lt;/type&gt;</span>
<span class="rem">/// &lt;defaultValue&gt;25&lt;/defaultValue&gt;</span>
<span class="kwrd">float</span> BlockCount : register(C0);

sampler2D input : register(S0);

<span class="rem">// Static computed vars for optimization</span>
<span class="kwrd">static</span> <span class="kwrd">float</span> BlockSize = 1.0f / BlockCount; 

float4 main(float2 uv : TEXCOORD) : COLOR
{
   <span class="rem">// Calculate block center</span>
   float2 blockPos = floor(uv * BlockCount);
   float2 blockCenter = blockPos * BlockSize &#43; BlockSize * 0.5;
            
   <span class="rem">// Sample color at the calculated coordinate</span>
   <span class="kwrd">return</span> tex2D(input, blockCenter);
}</pre>
<p>The <b>float </b>BlockCount parameter defines into the number of blocks (large pixels) into which the resulting image will be divided (pixelated). The size of a block (BlockSize) is the inverse of the BlockCount and calculated as
<b>static </b><b>float</b> to save some clock cycles. The coordinate of the current pixel (uv) is then used to determine the block to which it belongs. This determination depends on the BlockCount and is a result of the built-in
<a href="http://msdn.microsoft.com/en-us/library/bb509599(v=VS.85).aspx">floor</a> function. To get the color of the output pixel, the center coordinate of each block is sampled for all the pixels that are part of the block.</p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/4745.clip_5F00_image025_5F00_6CBF437D.jpg"><strong><img title="clip_image025" border="0" alt="clip_image025" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/6557.clip_5F00_image025_5F00_thumb_5F00_6C531088.jpg" width="284" height="284"></strong></a></p>
<p align="center"><strong>Figure 10: Output of the pixelation step</strong></p>
<h4>Rounding the Pixels </h4>
<p><b>HLSL </b></p>
<pre class="csharpcode"><span class="rem">/// &lt;summary&gt;The number of pixel blocks.&lt;/summary&gt;</span>
<span class="rem">/// &lt;type&gt;Single&lt;/type&gt;</span>
<span class="rem">/// &lt;defaultValue&gt;25&lt;/defaultValue&gt;</span>
<span class="kwrd">float</span> BlockCount : register(C0);

<span class="rem">/// &lt;summary&gt;The rounding of a pixel block.&lt;/summary&gt;</span>
<span class="rem">/// &lt;type&gt;Single&lt;/type&gt;</span>
<span class="rem">/// &lt;defaultValue&gt;0.45&lt;/defaultValue&gt;</span>
<span class="kwrd">float</span> Max : register(C2);

sampler2D input : register(S0);

<span class="rem">// Static computed vars for optimization</span>
<span class="kwrd">static</span> <span class="kwrd">float</span> BlockSize = 1.0f / BlockCount; 

float4 main(float2 uv : TEXCOORD) : COLOR
{
   <span class="rem">// Calculate block center</span>
   float2 blockPos = floor(uv * BlockCount);
   float2 blockCenter = blockPos * BlockSize &#43; BlockSize * 0.5;
        
   <span class="rem">// Round the block by testing the distance </span>
   <span class="rem">// of the pixel coordinate to the center</span>
   <span class="kwrd">float</span> dist = length(uv - blockCenter) * BlockCount;
   <span class="kwrd">if</span>(dist &gt; Max)
   {
      <span class="kwrd">return</span> 0;
   }
    
   <span class="rem">// Sample color at the calculated coordinate</span>
   <span class="kwrd">return</span> tex2D(input, blockCenter);
}</pre>
<b></b>
<p>The Max parameter defines the maximum distance of a pixel to its block center and, therefore, the rounding of a pixel block. If the length of the vector between the current pixel coordinate (uv) and its block center is greater than the Max parameter, a transparent
 pixel (0) is returned. The built-in <a href="http://msdn.microsoft.com/en-us/library/bb509617(v=VS.85).aspx">
<b>length</b></a> function is used to calculate the scalar length of the distance vector.</p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/0310.clip_5F00_image027_5F00_424589D8.jpg"><strong></strong></a><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/6082.clip_5F00_image027_5F00_6FC6A99B.jpg"><img title="clip_image027" border="0" alt="clip_image027" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/6560.clip_5F00_image027_5F00_thumb_5F00_6A3611BF.jpg" width="284" height="284"></a></p>
<p align="center"><strong>Figure 11: Output of the rounding step (Max = 0.45)</strong></p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/6507.clip_5F00_image029_5F00_683B3A2E.jpg"><strong></strong></a><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/0333.clip_5F00_image029_5F00_15BC59F2.jpg"><img title="clip_image029" border="0" alt="clip_image029" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/6406.clip_5F00_image029_5F00_thumb_5F00_27E2F97C.jpg" width="284" height="284"></a></p>
<p align="center"><strong>Figure 12: Output of the rounding step (Max = 0.60)</strong></p>
<h4>Baking Donuts </h4>
<p><b>HLSL</b></p>
<pre class="csharpcode"><span class="rem">/// &lt;summary&gt;The number of pixel blocks.&lt;/summary&gt;</span>
<span class="rem">/// &lt;type&gt;Single&lt;/type&gt;</span>
<span class="rem">/// &lt;defaultValue&gt;25&lt;/defaultValue&gt;</span>
<span class="kwrd">float</span> BlockCount : register(C0);

<span class="rem">/// &lt;summary&gt;The rounding of a pixel block.&lt;/summary&gt;</span>
<span class="rem">/// &lt;type&gt;Single&lt;/type&gt;</span>
<span class="rem">/// &lt;defaultValue&gt;0.2&lt;/defaultValue&gt;</span>
<span class="kwrd">float</span> Min : register(C1);

<span class="rem">/// &lt;summary&gt;The rounding of a pixel block.&lt;/summary&gt;</span>
<span class="rem">/// &lt;type&gt;Single&lt;/type&gt;</span>
<span class="rem">/// &lt;defaultValue&gt;0.45&lt;/defaultValue&gt;</span>
<span class="kwrd">float</span> Max : register(C2);

sampler2D input : register(S0);

<span class="rem">// Static computed vars for optimization</span>
<span class="kwrd">static</span> <span class="kwrd">float</span> BlockSize = 1.0f / BlockCount; 

float4 main(float2 uv : TEXCOORD) : COLOR
{
   <span class="rem">// Calculate block center</span>
   float2 blockPos = floor(uv * BlockCount);
   float2 blockCenter = blockPos * BlockSize &#43; BlockSize * 0.5;
        
   <span class="rem">// Round the block by testing the distance </span>
   <span class="rem">// of the pixel coordinate to the center</span>
   <span class="kwrd">float</span> dist = length(uv - blockCenter) * BlockCount;
   <span class="kwrd">if</span>(dist &lt; Min || dist &gt; Max)
   {
      <span class="kwrd">return</span> 0;
   }
    
   <span class="rem">// Sample color at the calculated coordinate</span>
   <span class="kwrd">return</span> tex2D(input, blockCenter);
} </pre>
<b></b>
<p>The last thing left to do in order to get some nice rings (donuts) is to add a test for the minimum distance. This is pretty easy and done with the additional Min parameter.</p>
<p align="center"><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/4861.clip_5F00_image031_5F00_4747C787.jpg"><strong></strong></a><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/8640.clip_5F00_image031_5F00_3492CDD0.jpg"><img title="clip_image031" border="0" alt="clip_image031" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/2625.clip_5F00_image031_5F00_thumb_5F00_48C64656.jpg" width="284" height="284"></a></p>
<p align="center"><strong>Figure 13: Output of the ring step (Min = 0.20, Max = 0.45)</strong></p>
<p>Please note that all of the parameters can be animated, which could result in a nice (transition) effect when two images are overlaid. The Shazzam Tool also supports animation with the generated Shader Settings controls.</p>
<h3>How does the Demo Application work? </h3>
<p>The Silverlight demo application is quite flexible and can be used for many different shader effects without touching the core functionality. This last part of the article will show how this extensibility was achieved. Explanations of how to use the webcam
 with Silverlight and how to load an image from disk were detailed in my last <a href="http://blogs.msdn.com/coding4fun/archive/2010/03/24/9984015.aspx">
Silverlight Face Detection</a> article.</p>
<p>The application's extensibility was mainly accomplished by using the <a href="http://en.wikipedia.org/wiki/Managed_Extensibility_Framework">
Managed Extensibility Framework (MEF)</a> and a <a href="http://en.wikipedia.org/wiki/Model_View_ViewModel">
View-ViewModel approach</a> for the shader parameters. MEF is a great way to make decoupled and flexible applications and has been part of the Silverlight framework since version 4. MEF is like
<a href="http://www.drugabuse.gov/drugpages/methamphetamine.html">Meth</a> for .Net and Silverlight developers, but without all the undesirable side effects.
</p>
<p>The beauty of MEF is best illustrated using source code. As you can see in the demo application (Figure 1), it's possible to select a pixel shader with a ComboBox. The items in the MainPage's shader ComboBox are populated through
<a href="http://msdn.microsoft.com/en-us/library/cc278072(VS.95).aspx">data binding</a> an
<a href="http://msdn.microsoft.com/en-us/library/ms668604(VS.95).aspx">ObservableCollection &lt;T&gt;</a> and MEF is used to build this collection.</p>
<p><b>C# <br>
</b></p>
<pre class="csharpcode"><span class="rem">/// &lt;summary&gt;</span>
<span class="rem">/// The main Page of the application.</span>
<span class="rem">/// &lt;/summary&gt;</span>
<span class="kwrd">public</span> <span class="kwrd">partial</span> <span class="kwrd">class</span> MainPage : UserControl
{
   [ImportMany(AllowRecomposition = <span class="kwrd">true</span>)]
   <span class="kwrd">public</span> ObservableCollection&lt;IShaderViewModel&gt; Shaders;

   <span class="kwrd">public</span> MainPage()
   {
      InitializeComponent();
   }

   <span class="kwrd">private</span> <span class="kwrd">void</span> Initialize()
   {
      <span class="rem">// Compose the parts with MEF</span>
      var container = <span class="kwrd">new</span> CompositionContainer(
            <span class="kwrd">new</span> AssemblyCatalog(GetType().Assembly));
      container.ComposeParts(<span class="kwrd">this</span>);

      <span class="rem">// Fill ComboBox</span>
      CmbShaders.ItemsSource = Shaders;
      CmbShaders.DisplayMemberPath = <span class="str">&quot;Name&quot;</span>;
      CmbShaders.SelectedIndex = 0;

      <span class="rem">// ...</span>
   }

   <span class="rem">// ...</span>
}

<span class="rem">/// &lt;summary&gt;</span>
<span class="rem">/// Interface of a ViewModel for a shader effect.</span>
<span class="rem">/// &lt;/summary&gt;</span>
[InheritedExport]
<span class="kwrd">public</span> <span class="kwrd">interface</span> IShaderViewModel
{
   <span class="kwrd">string</span> Name { get; }
   ShaderEffect Shader { get; }
   UserControl View { get; }
}</pre>
<p>The MainPage has a Shaders collection property containing items that implement the IShaderViewModel interface. This collection is initialized by using MEF's CompositionContainer with an AssemblyCatalog and the ComposeParts method. ComposeParts analyses all
 types in the provided Catalog (here, the assembly), checks if they have certain <a href="http://msdn.microsoft.com/en-us/library/e8kc3626(v=VS.100).aspx">
attributes</a> attached, and wires these so-called parts together. To put it simply, an instance of a type decorated with an
<a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.exportattribute(VS.95).aspx">
Export attribute</a> is created and assigned to each field / property / parameter of the type that has an
<a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.importattribute(v=VS.95).aspx">
Import attribute</a> attached.</p>
<p>The IShaderViewModel interface has the <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.inheritedexportattribute(v=VS.95).aspx">
InheritedExport attribute</a> attached, which means that implementations of this interface will automatically provide that export. The Shaders collection in turn uses the
<a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.importmanyattribute(v=VS.95).aspx">
ImportMany attribute</a>, telling MEF to populate the list with all matching exports (here, all classes that implement the IShaderViewModel interface).</p>
<p>After MEF fills the collection, it is data bound to the ItemsSource property of the ComboBox. The Name property of the IShaderViewModel interface is used as DisplayMember.</p>
<p>The advantage of MEF should be pretty obvious here: you have to implement an IShaderViewModel and maybe a View
<a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.usercontrol(VS.95).aspx">
UserControl</a> for the shader's parameters, but you don't need to add an instance of the shader ViewModel to the Shaders collection manually. Since the IShaderViewModel has the
<a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.inheritedexportattribute(v=VS.95).aspx">
InheritedExport attribute</a> attached, it's not even necessary to add a special MEF attribute to the new shader ViewModel type. Additionally, it's possible to load an extra assembly asynchronously and let MEF compose the parts and update the collection afterwards.
 By setting the AllowRecomposition parameter of the <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.importmanyattribute(v=VS.95).aspx">
ImportMany attribute</a> to true we're asking MEF to allow dynamic updates.</p>
<p>As you can see, MEF is pretty easy but also very powerful. But we have just scratched the surface—this
<a href="http://blogs.msdn.com/mcsuksoldev/archive/2010/04/28/managed-extensibility-framework-overview.aspx">
blog post</a> and the MSDN are good starters if you want to <a href="http://msdn.microsoft.com/en-us/library/ee155691(v=VS.100).aspx">
learn more about MEF</a>. </p>
<h3>Further Resources </h3>
<p>There are many great HLSL shader development resources available on the web. The following list contains some sites focused on Silverlight / WPF pixel shaders. If I forgot a great resource, please post it in a comment.
</p>
<ul>
<li>The open source <a href="http://wpffx.codeplex.com">WPF Pixel Shader Effects Library at CodePlex</a> contains a lot of common pixel shader effects.
</li><li>Nikola Mihaylov (aka Nokola) wrote a <a href="http://nokola.com/EasyPainter">
great online image editor</a> in Silverlight that uses pixel shaders for the effects. He
<a href="http://nokola.com/blog/?tag=/Pixel&#43;Shader">released the pixel shaders</a> that are used in EasyPainter as open source. And he also released the custom controls from his tool. The Slider and the ColorPicker used in the demo application are from
<a href="http://nokola.com/blog/post/2010/03/11/EasyPainter-Source-Pack-1-Refresh-(Bug-Fixes).aspx">
there</a>. I just changed some properties to <a href="http://msdn.microsoft.com/en-us/library/cc221408(VS.95).aspx">
Dependency Properties</a> to make the controls bindable. So Kudos to Nikola! </li><li>Walt Ritscher's amazing <a href="http://shazzam-tool.com/">Shazzam Tool</a> also comes with many cool pixel shaders as samples. Kudos to Walt for making such a great tool!
</li><li>Additionally, from time to time I write some shaders and put them <a href="http://kodierer.blogspot.com/search/label/Shader">
up on my blog</a>. Now that we have an extensible Silverlight shader demo application, I will surely integrate my upcoming shaders directly into it.
</li></ul>
<p>While I was writing this article, an open source project called <a href="http://wpfmetaeffects.codeplex.com">
WPF Meta-Effects</a> was released on CodePlex. The WPF Meta-Effects framework makes it possible to write Shaders for WPF in C# by using attributes, delegates, and dynamic HLSL compilation. It's a neat idea, but due to its dynamic compilation of shaders it's
 limited to WPF and can't be used with Silverlight. Additionally, I much prefer the simplicity of HLSL to C# when writing shaders. There's a reason why HLSL was invented:
<a href="http://wpfmetaeffects.codeplex.com/">see the examples yourself</a>.</p>
<h3>Conclusion</h3>
<p>This article explained what shaders and HLSL are, as well as how to write pixel shaders for Silverlight and WPF. It also showed what tools / frameworks to use for the best developer experience and gave an introduction on how to write an extensible application
 with MEF. </p>
<p>I hope it diminished any fear of the HLSL language and the shader development. I also hope it both inspires and helps you to write your own shaders. I'm eager to see what you come up with. Have fun!</p>
<p>The links to the live demo app and source code are at the top of the article.</p>
<h3>About The Author</h3>
<p><a href="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/8463.clip_5F00_image033_5F00_60E9B0B1.jpg"><img title="clip_image033" border="0" hspace="12" alt="clip_image033" align="right" src="http://ecn.channel9.msdn.com/o9/c4fcontent/migration/10014965/7506.clip_5F00_image033_5F00_thumb_5F00_192827CA.jpg" width="140" height="140"></a>René
 Schulte is a .Net / Silverlight developer and Microsoft <a href="http://mvp.support.microsoft.com/profile/Rene.Schulte">
Silverlight MVP</a> passionate about real-time computer graphics, physics, AI, and algorithms. He loves C#, Shaders, Augmented Reality, and computer vision. He started the
<a href="http://SLARToolkit.codeplex.com">SLARToolkit</a>, the <a href="http://WriteableBitmapEx.codeplex.com">
WriteableBitmapEx</a>, and the <a href="http://Matrix3DEx.codeplex.com">Matrix3DEx</a> Silverlight open source projects, and he has a
<a href="http://rene-schulte.info">Silverlight website</a> powered by real time soft body physics. He is also a regular author for Microsoft's Coding4Fun. Contact information can be found on his
<a href="http://rene-schulte.info">Silverlight website</a>, his <a href="http://blog.rene-schulte.info">
blog</a>, or via <a href="http://twitter.com/rschu">Twitter</a>.</p>
 <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:db33c6aa6ce24903b5059e7600c94b7c">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/articles/SilverShader--Introduction-to-Silverlight-and-WPF-Pixel-Shaders</comments>
      <itunes:summary>
This article explains how to write pixel shaders for the Microsoft Silverlight and WPF platform with HLSL, as well as how to write an extensible Silverlight application for shader demos.

 
Introduction
Almost 10 years ago, 
Microsoft announced DirectX 8.0, including the huge real-time computer graphics milestone, Direct3D 8.0. Direct3D 8.0 introduced programmable
shaders and gave the developers a chance to create never-before-seen effects and experiences apart from the fixed-function graphics pipeline. With Direct3D 8.0&#39;s new shader capabilities, it
 became possible to compute neat custom-rendering effects on mainstream graphics hardware. Today&#39;s graphics hardware is capable of running hundreds of shaders in parallel and modern games make heavy use of this technology t to achieve stunning effects.
 
A shader is a rather small program, a so-called kernel function, typically executed in parallel for each data element.
Pixel shaders, for example, are executed for each pixel of a bitmap, and therefore used to implement per-pixel effects.
 
This introductory article will explain how to write pixel shaders for Silverlight and WPF, what tools should be used, and how to work with the tools. Furthermore, it will show how to build an extensible Silverlight shader application. 
Demo Application
The demo application makes it possible to apply different shaders to an image or to the live stream from the webcam. The application not only comes with the two shaders that will be implemented in this article, it also contains three other shaders I&#39;ve written
 before. The complete source code is licensed under the 
Ms-PL and can be downloaded from the 
CodePlex site. 
You need at least the Silverlight 4 runtime installed to run the sample and a webcam is needed in order to exploit the full functionality. The runtime is available for
Windows and 
Mac.  
Open the sample 
 
Figure 1: Screenshot of the demo application 
How To Use?
You can start and stop the webcam with the 

 Button, or</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/articles/SilverShader--Introduction-to-Silverlight-and-WPF-Pixel-Shaders</link>
      <pubDate>Tue, 25 May 2010 15:51:14 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/articles/SilverShader--Introduction-to-Silverlight-and-WPF-Pixel-Shaders</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/c4f/images/10014965_100.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/c4f/images/10014965_220.jpg" height="165" width="220"></media:thumbnail>      
      <dc:creator>Rene Schulte</dc:creator>
      <itunes:author>Rene Schulte</itunes:author>
      <slash:comments>10</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/articles/SilverShader--Introduction-to-Silverlight-and-WPF-Pixel-Shaders/RSS</wfw:commentRss>
      <category>HLSL</category>
      <category>Media</category>
      <category>Silverlight</category>
      <category>WebCam</category>
      <category>WPF</category>
      <category>Pixel Shaders</category>
    </item>
  <item>
      <title>Photoshop style Blend Modes for WPF with Shaders</title>
      <description><![CDATA[Cory Plotts has taken on <a shape="rect" href="http://blog.nerdplusart.com/archives/blend-modes-youre-soaking-in-it" shape="rect">
Robby Ingebretsen's original challenge </a>and has created a <a shape="rect" href="http://www.cplotts.com/2009/06/16/blend-modes-part-i/" shape="rect">
Photoshop style blend modes library for WPF</a>.&nbsp; This means that using Cory's library you can use Blend modes you are familiar with from Photoshop while developing a WPF Application.&nbsp;Familiar&nbsp;modes like Linear Burn, Hard Light, Overlay are all executed using
 pixel shaders and specifically multi-input shader effects.&nbsp; The source code and binaries are available on
<a shape="rect" href="http://www.cplotts.com/2009/06/16/blend-modes-part-ii/" shape="rect">
Cory's blog</a>.  <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:9b3adf2c1c4445b4b8289deb0021a77c">]]></description>
      <comments>http://channel9.msdn.com/Blogs/ContinuumNews/Photoshop-style-Blend-Modes-for-WPF-with-Shaders</comments>
      <itunes:summary>Cory Plotts has taken on 
Robby Ingebretsen&#39;s original challenge and has created a 
Photoshop style blend modes library for WPF.&amp;nbsp; This means that using Cory&#39;s library you can use Blend modes you are familiar with from Photoshop while developing a WPF Application.&amp;nbsp;Familiar&amp;nbsp;modes like Linear Burn, Hard Light, Overlay are all executed using
 pixel shaders and specifically multi-input shader effects.&amp;nbsp; The source code and binaries are available on

Cory&#39;s blog. </itunes:summary>
      <link>http://channel9.msdn.com/Blogs/ContinuumNews/Photoshop-style-Blend-Modes-for-WPF-with-Shaders</link>
      <pubDate>Wed, 17 Jun 2009 18:24:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/ContinuumNews/Photoshop-style-Blend-Modes-for-WPF-with-Shaders</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/474221_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/474221_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/320/14f6b2a1-3468-4c67-83e4-db06f3c13a2a.jpg" height="210" width="280"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/85/c5e80e48-14ea-464b-b60e-7d0d2435c5cb.jpg" height="64" width="85"></media:thumbnail>      
      <dc:creator>Adam Kinney</dc:creator>
      <itunes:author>Adam Kinney</itunes:author>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/ContinuumNews/Photoshop-style-Blend-Modes-for-WPF-with-Shaders/RSS</wfw:commentRss>
      <category>HLSL</category>
      <category>Pixel Shader</category>
      <category>Windows</category>
      <category>WPF</category>
    </item>
  <item>
      <title>WPFFX running in the Silverlight 3 Beta</title>
      <description><![CDATA[Jaime Rodriguez came back from MIX09 and thought &quot;Hey, I bet my WPFFX library could run in the new Silverlight 3 beta&quot;.&nbsp; So he added a few #ifdefs, compiled and waa-laa!&nbsp; The&nbsp;<a shape="rect" href="http://www.codeplex.com/wpffx" shape="rect">WPFFX library</a>
 is running in the&nbsp;Silverlight 3 beta and we have video to prove it.<br>
<br>
Jaime has all of the details in his <a shape="rect" href="http://blogs.msdn.com/jaimer/archive/2009/03/25/wpf-effects-library-running-in-silverlight-3.aspx" shape="rect">
blog post about the success</a>.  <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:cca25967ddcf48f7a8829deb001c9d50">]]></description>
      <comments>http://channel9.msdn.com/Shows/Continuum/WPFFX-in-Silverlight</comments>
      <itunes:summary>Jaime Rodriguez came back from MIX09 and thought &amp;quot;Hey, I bet my WPFFX library could run in the new Silverlight 3 beta&amp;quot;.&amp;nbsp; So he added a few #ifdefs, compiled and waa-laa!&amp;nbsp; The&amp;nbsp;WPFFX library
 is running in the&amp;nbsp;Silverlight 3 beta and we have video to prove it.

Jaime has all of the details in his 
blog post about the success. </itunes:summary>
      <itunes:duration>323</itunes:duration>
      <link>http://channel9.msdn.com/Shows/Continuum/WPFFX-in-Silverlight</link>
      <pubDate>Thu, 26 Mar 2009 17:58:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/Continuum/WPFFX-in-Silverlight</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/462321_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/462321_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/2/3/2/6/4/TCSWPFFXinSilverlight_large_ch9.png" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/2/3/2/6/4/TCSWPFFXinSilverlight_small_ch9.png" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/2/3/2/6/4/TCSWPFFXinSilverlight_2MB_ch9.wmv" expression="full" duration="323" fileSize="94815903" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/2/3/2/6/4/TCSWPFFXinSilverlight_ch9.mp3" expression="full" duration="323" fileSize="2584578" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/2/3/2/6/4/TCSWPFFXinSilverlight_ch9.mp4" expression="full" duration="323" fileSize="26064430" type="video/mp4" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/2/3/2/6/4/TCSWPFFXinSilverlight_ch9.wma" expression="full" duration="323" fileSize="5237957" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/2/3/2/6/4/TCSWPFFXinSilverlight_ch9.wmv" expression="full" duration="323" fileSize="19479375" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/2/3/2/6/4/TCSWPFFXinSilverlight_Zune_ch9.wmv" expression="full" duration="323" fileSize="25287355" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="mms://mschnlnine.wmod.llnwd.net/a1809/d1/ch9/1/2/3/2/6/4/TCSWPFFXinSilverlight_s_ch9.wmv" expression="full" duration="323" fileSize="222" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/1/2/3/2/6/4/TCSWPFFXinSilverlight_ch9.wmv" length="19479375" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Adam Kinney</dc:creator>
      <itunes:author>Adam Kinney</itunes:author>
      <slash:comments>5</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/Continuum/WPFFX-in-Silverlight/RSS</wfw:commentRss>
      <category>Graphics</category>
      <category>HLSL</category>
      <category>Pixel Shader</category>
      <category>Silverlight</category>
      <category>WPF</category>
    </item>
  <item>
      <title>Shazzam - A Tool for Creating WPF Pixel Shader Effects</title>
      <description><![CDATA[<a href="http://wpfwonderland.wordpress.com/">Walt Ritscher</a>&nbsp;walks us through&nbsp;building a custom&nbsp;WPF Pixel Shader Effect using&nbsp;<a href="http://shazzam-tool.com/">Shazzam</a>, his latest creation.&nbsp; Along the lines of other useful tools mentioned,&nbsp;<a href="http://www.kaxaml.com/">Kaxaml</a>
 and <a href="http://www.linqpad.net/">LINQPad</a>, Shazzam is free to download and use.&nbsp; Props to Walt for generating both C#
<em>and</em> VB code for your Shader Effect.  <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:4c56cfe1b45540a7bdd19deb001d3421">]]></description>
      <comments>http://channel9.msdn.com/Shows/Continuum/Shazzam</comments>
      <itunes:summary>Walt Ritscher&amp;nbsp;walks us through&amp;nbsp;building a custom&amp;nbsp;WPF Pixel Shader Effect using&amp;nbsp;Shazzam, his latest creation.&amp;nbsp; Along the lines of other useful tools mentioned,&amp;nbsp;Kaxaml
 and LINQPad, Shazzam is free to download and use.&amp;nbsp; Props to Walt for generating both C#
and VB code for your Shader Effect. </itunes:summary>
      <itunes:duration>437</itunes:duration>
      <link>http://channel9.msdn.com/Shows/Continuum/Shazzam</link>
      <pubDate>Mon, 10 Nov 2008 19:25:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/Continuum/Shazzam</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/442082_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/442082_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/8/0/2/4/4/TCSShazzam_large_ch9.jpg" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/8/0/2/4/4/TCSShazzam_small_ch9.jpg" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/8/0/2/4/4/TCSShazzam_2MB_ch9.wmv" expression="full" duration="437" fileSize="135463834" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/8/0/2/4/4/TCSShazzam_ch9.mp3" expression="full" duration="437" fileSize="3494057" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/8/0/2/4/4/TCSShazzam_ch9.mp4" expression="full" duration="437" fileSize="24582961" type="video/mp4" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/8/0/2/4/4/TCSShazzam_ch9.wma" expression="full" duration="437" fileSize="3538017" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/8/0/2/4/4/TCSShazzam_ch9.wmv" expression="full" duration="437" fileSize="27556079" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/8/0/2/4/4/TCSShazzam_Zune_ch9.wmv" expression="full" duration="437" fileSize="34600379" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="mms://mschnlnine.wmod.llnwd.net/a1809/d1/ch9/2/8/0/2/4/4/TCSShazzam_s_ch9.wmv" expression="full" duration="437" fileSize="200" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/2/8/0/2/4/4/TCSShazzam_ch9.wmv" length="27556079" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Adam Kinney</dc:creator>
      <itunes:author>Adam Kinney</itunes:author>
      <slash:comments>2</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/Continuum/Shazzam/RSS</wfw:commentRss>
      <category>Graphics</category>
      <category>HLSL</category>
      <category>Pixel Shader</category>
      <category>Tools</category>
      <category>Walt Ritscher</category>
      <category>WPF</category>
    </item>
  <item>
      <title>WPF Effects Library</title>
      <description><![CDATA[
<p>WPF 3.5 SP1 offers killer graphic&nbsp;capabilities&nbsp;that were&nbsp;demonstrated&nbsp;in the <a shape="rect" href="http://channel9.msdn.com/posts/AdamKinney/WPF-35-SP1-Graphics-with-David-Teitlebaum/" shape="rect">
last video with David Teitlebaum</a>.&nbsp; In this video, David has dropped by to help us announce the
<a shape="rect" href="http://www.codeplex.com/wpffx" shape="rect">WPF Pixel Shader Effects Library</a>.&nbsp; The library includes 23 Effects and 26 Transitions and is available with source code at
<a shape="rect" href="http://codeplex.com/wpffx" shape="rect">http://codeplex.com/wpffx</a>.</p>
<p>After shooting the video, we realized we didn't show&nbsp;all of the&nbsp;effects and&nbsp;any of the transitions.&nbsp; To see the library in action check out the
<a shape="rect" href="http://channel9.msdn.com/shows/Continuum/WPFFXDemo/" shape="rect">
WPF Effects Library Demo video</a>.</p>
 <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:c073f94536ef4fc78f249deb001d8d77">]]></description>
      <comments>http://channel9.msdn.com/Shows/Continuum/WPFFX</comments>
      <itunes:summary>
WPF 3.5 SP1 offers killer graphic&amp;nbsp;capabilities&amp;nbsp;that were&amp;nbsp;demonstrated&amp;nbsp;in the 
last video with David Teitlebaum.&amp;nbsp; In this video, David has dropped by to help us announce the
WPF Pixel Shader Effects Library.&amp;nbsp; The library includes 23 Effects and 26 Transitions and is available with source code at
http://codeplex.com/wpffx. 
After shooting the video, we realized we didn&#39;t show&amp;nbsp;all of the&amp;nbsp;effects and&amp;nbsp;any of the transitions.&amp;nbsp; To see the library in action check out the

WPF Effects Library Demo video. 
</itunes:summary>
      <itunes:duration>526</itunes:duration>
      <link>http://channel9.msdn.com/Shows/Continuum/WPFFX</link>
      <pubDate>Sat, 04 Oct 2008 22:37:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/Continuum/WPFFX</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/427719_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/427719_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/1/7/7/2/4/TCSWPFEffectsLibrary_large_ch9.jpg" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/1/7/7/2/4/TCSWPFEffectsLibrary_small_ch9.jpg" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/1/7/7/2/4/TCSWPFEffectsLibrary_2MB_ch9.wmv" expression="full" duration="526" fileSize="145958551" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/1/7/7/2/4/TCSWPFEffectsLibrary_ch9.mp3" expression="full" duration="526" fileSize="4209893" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/1/7/7/2/4/TCSWPFEffectsLibrary_ch9.mp4" expression="full" duration="526" fileSize="28040000" type="video/mp4" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/1/7/7/2/4/TCSWPFEffectsLibrary_ch9.wma" expression="full" duration="526" fileSize="4261729" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/1/7/7/2/4/TCSWPFEffectsLibrary_ch9.wmv" expression="full" duration="526" fileSize="31285151" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/1/7/7/2/4/TCSWPFEffectsLibrary_Zune_ch9.wmv" expression="full" duration="526" fileSize="41704667" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="mms://mschnlnine.wmod.llnwd.net/a1809/d1/ch9/9/1/7/7/2/4/TCSWPFEffectsLibrary_s_ch9.wmv" expression="full" duration="526" fileSize="220" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/9/1/7/7/2/4/TCSWPFEffectsLibrary_ch9.wmv" length="31285151" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Adam Kinney</dc:creator>
      <itunes:author>Adam Kinney</itunes:author>
      <slash:comments>4</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/Continuum/WPFFX/RSS</wfw:commentRss>
      <category>David Teitlebaum</category>
      <category>Graphics</category>
      <category>HLSL</category>
      <category>Pixel Shader</category>
      <category>WPF</category>
    </item>
  <item>
      <title>WPF Effects Library Demo</title>
      <description><![CDATA[After shooting the&nbsp;<a href="http://channel9.msdn.com/shows/Continuum/WPFFX/">WPF Effects Library&nbsp;interview&nbsp;with David Teitlebaum</a>&nbsp;and realizing we didn't show&nbsp;all of the&nbsp;effects and&nbsp;any of the transitions, we put together this short video.&nbsp; Very little
 dialogue here to distract from the beauty of the Effects and Transitions.&nbsp; Cue the music...
<br>
<br>
Download the WPF&nbsp;Effects Library at <a href="http://codeplex.com/wpffx">http://codeplex.com/wpffx</a>
 <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:d36549d252564d939b769deb001d76d4">]]></description>
      <comments>http://channel9.msdn.com/Shows/Continuum/WPFFXDemo</comments>
      <itunes:summary>After shooting the&amp;nbsp;WPF Effects Library&amp;nbsp;interview&amp;nbsp;with David Teitlebaum&amp;nbsp;and realizing we didn&#39;t show&amp;nbsp;all of the&amp;nbsp;effects and&amp;nbsp;any of the transitions, we put together this short video.&amp;nbsp; Very little
 dialogue here to distract from the beauty of the Effects and Transitions.&amp;nbsp; Cue the music...


Download the WPF&amp;nbsp;Effects Library at http://codeplex.com/wpffx
</itunes:summary>
      <itunes:duration>335</itunes:duration>
      <link>http://channel9.msdn.com/Shows/Continuum/WPFFXDemo</link>
      <pubDate>Sat, 04 Oct 2008 22:36:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/Continuum/WPFFXDemo</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/431116_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/431116_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/6/1/1/1/3/4/TCSWPFFXDemo_large_ch9.jpg" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/6/1/1/1/3/4/TCSWPFFXDemo_small_ch9.jpg" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/6/1/1/1/3/4/TCSWPFFXDemo_2MB_ch9.wmv" expression="full" duration="335" fileSize="91453990" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/6/1/1/1/3/4/TCSWPFFXDemo_ch9.mp3" expression="full" duration="335" fileSize="2679246" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/6/1/1/1/3/4/TCSWPFFXDemo_ch9.mp4" expression="full" duration="335" fileSize="18740382" type="video/mp4" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/6/1/1/1/3/4/TCSWPFFXDemo_ch9.wma" expression="full" duration="335" fileSize="2714839" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/6/1/1/1/3/4/TCSWPFFXDemo_ch9.wmv" expression="full" duration="335" fileSize="20487673" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/6/1/1/1/3/4/TCSWPFFXDemo_Zune_ch9.wmv" expression="full" duration="335" fileSize="26567685" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="mms://mschnlnine.wmod.llnwd.net/a1809/d1/ch9/6/1/1/1/3/4/TCSWPFFXDemo_s_ch9.wmv" expression="full" duration="335" fileSize="204" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/6/1/1/1/3/4/TCSWPFFXDemo_ch9.wmv" length="20487673" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Adam Kinney</dc:creator>
      <itunes:author>Adam Kinney</itunes:author>
      <slash:comments>8</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/Continuum/WPFFXDemo/RSS</wfw:commentRss>
      <category>Graphics</category>
      <category>HLSL</category>
      <category>Pixel Shader</category>
      <category>Transitions</category>
      <category>WPF</category>
    </item>
  <item>
      <title>WPF Pixel Shader Parts</title>
      <description><![CDATA[
<p><a href="http://blogs.msdn.com/nikola/">Nikola Mihaylov</a>&nbsp;came by the studio to explain what a WPF Pixel Shader really is and the code involved and making one.&nbsp; He has a great post on his blog explaining how to
<a href="http://blogs.msdn.com/nikola/archive/2008/09/04/beginner-s-wpf-pixel-shaders-template-project-samples-light-blobs-twirl-and-other-presentation.aspx">
get started with Pixel Shaders along with a custom VS project template</a> to make it even easier.</p>
<p>In his demonstration Nikola shows off his own effects along with&nbsp;<a href="http://bursjootech.blogspot.com/2008/06/grayscale-effect-pixel-shader-effect-in.html">Anders Bursjöö’s Grayscale Effect</a>&nbsp;and
<a href="http://rakeshravuri.blogspot.com/2008/07/wave-reflection-shader-effect-in-wpf.html">
Rakesh Ravuri's Wave Reflection Effect</a>.</p>
 <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/hlsl/RSS&WT.dl=0&WT.entryid=Entry:RSSView:9a8f2ace5eec4e0abf439deb001d86f5">]]></description>
      <comments>http://channel9.msdn.com/Shows/Continuum/PixelShaderParts</comments>
      <itunes:summary>
Nikola Mihaylov&amp;nbsp;came by the studio to explain what a WPF Pixel Shader really is and the code involved and making one.&amp;nbsp; He has a great post on his blog explaining how to

get started with Pixel Shaders along with a custom VS project template to make it even easier. 
In his demonstration Nikola shows off his own effects along with&amp;nbsp;Anders Bursj&#246;&#246;’s Grayscale Effect&amp;nbsp;and

Rakesh Ravuri&#39;s Wave Reflection Effect. 
</itunes:summary>
      <itunes:duration>761</itunes:duration>
      <link>http://channel9.msdn.com/Shows/Continuum/PixelShaderParts</link>
      <pubDate>Fri, 19 Sep 2008 17:29:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Shows/Continuum/PixelShaderParts</guid>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/100/427773_100x75.jpg" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://ecn.channel9.msdn.com/o9/previewImages/220/427773_220x165.jpg" height="165" width="220"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/7/7/2/4/TCSPixelShaderParts_large_ch9.jpg" height="240" width="320"></media:thumbnail>
      <media:thumbnail url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/7/7/2/4/TCSPixelShaderParts_small_ch9.jpg" height="64" width="85"></media:thumbnail>
      <media:group>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/7/7/2/4/TCSPixelShaderParts_2MB_ch9.wmv" expression="full" duration="761" fileSize="159234045" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/7/7/2/4/TCSPixelShaderParts_ch9.mp3" expression="full" duration="761" fileSize="6084986" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/7/7/2/4/TCSPixelShaderParts_ch9.mp4" expression="full" duration="761" fileSize="33469434" type="video/mp4" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/7/7/2/4/TCSPixelShaderParts_ch9.wma" expression="full" duration="761" fileSize="6157407" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/7/7/2/4/TCSPixelShaderParts_ch9.wmv" expression="full" duration="761" fileSize="36254229" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/7/7/2/4/TCSPixelShaderParts_Zune_ch9.wmv" expression="full" duration="761" fileSize="60362225" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="mms://mschnlnine.wmod.llnwd.net/a1809/d1/ch9/3/7/7/7/2/4/TCSPixelShaderParts_s_ch9.wmv" expression="full" duration="761" fileSize="218" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://mschnlnine.vo.llnwd.net/d1/ch9/3/7/7/7/2/4/TCSPixelShaderParts_ch9.wmv" length="36254229" type="video/x-ms-wmv"></enclosure>
      <dc:creator>Adam Kinney</dc:creator>
      <itunes:author>Adam Kinney</itunes:author>
      <slash:comments>5</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Shows/Continuum/PixelShaderParts/RSS</wfw:commentRss>
      <category>HLSL</category>
      <category>Nikola Mihaylov</category>
      <category>Pixel Shader</category>
      <category>WPF</category>
    </item>    
</channel>
</rss>