<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Need Help with my Chroma Key Pixel Shader Algorithm</title><link>http://blogs.msdn.com/synergist/archive/2009/05/15/need-help-with-my-chroma-key-pixel-shader-algorithm.aspx</link><description>I’ve just uploaded a simple demo application that shows the Silverlight 3 Chroma Key Effect in action.&amp;#160; If you don’t have the Silverlight 3 beta installed you will need to install it from here (the install link in the application will not work).&amp;#160;</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Need Help with my Chroma Key Pixel Shader Algorithm | Microsoft Share Point</title><link>http://blogs.msdn.com/synergist/archive/2009/05/15/need-help-with-my-chroma-key-pixel-shader-algorithm.aspx#9620169</link><pubDate>Sat, 16 May 2009 02:01:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9620169</guid><dc:creator>Need Help with my Chroma Key Pixel Shader Algorithm | Microsoft Share Point</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://microsoft-sharepoint.simplynetdev.com/need-help-with-my-chroma-key-pixel-shader-algorithm/"&gt;http://microsoft-sharepoint.simplynetdev.com/need-help-with-my-chroma-key-pixel-shader-algorithm/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Need Help with my Chroma Key Pixel Shader Algorithm</title><link>http://blogs.msdn.com/synergist/archive/2009/05/15/need-help-with-my-chroma-key-pixel-shader-algorithm.aspx#9622214</link><pubDate>Sat, 16 May 2009 13:31:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9622214</guid><dc:creator>Ted Howard</dc:creator><description>&lt;p&gt;I would try converting to HSV color space in the pixel shader and having a separate tolerance for each component (use a float3 constant and there's no perf diff). You can either calculate it or use a texture as a lookup table (not sure about Silverlight 3's texture/shader compat). HSV is more intuitive and should give a better distance function. There are other color spaces you could try. YUV might work well but it's designed to deemphasize chrominance.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://en.wikipedia.org/wiki/HSV_color_space"&gt;http://en.wikipedia.org/wiki/HSV_color_space&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You should probably use a continuous function for alpha. Anything but a step should give a nice improvement.&lt;/p&gt;</description></item><item><title>Silverlight Cream for May 18, 2009 -- #595</title><link>http://blogs.msdn.com/synergist/archive/2009/05/15/need-help-with-my-chroma-key-pixel-shader-algorithm.aspx#9626879</link><pubDate>Tue, 19 May 2009 07:34:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9626879</guid><dc:creator>Community Blogs</dc:creator><description>&lt;p&gt;In this Issue: Erik Mork , Mark Monster , Steve Strong , Rishi , Kirupa Chinnathambi ( 2 ), Timmy Kokke&lt;/p&gt;
</description></item><item><title>re: Need Help with my Chroma Key Pixel Shader Algorithm</title><link>http://blogs.msdn.com/synergist/archive/2009/05/15/need-help-with-my-chroma-key-pixel-shader-algorithm.aspx#9627046</link><pubDate>Tue, 19 May 2009 09:21:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9627046</guid><dc:creator>Chris Cavanagh</dc:creator><description>&lt;p&gt;Very very nice! :) &amp;nbsp;I attempted a WPF version a while ago, but HLSL / shader model 2.0 didn't allow enough statements to accomplish RGB -&amp;gt; HSV -&amp;gt; RGB conversion. &amp;nbsp;Wonder if it could be done with multiple shaders + inputs somehow? (or maybe some close approximation of HSV?). &amp;nbsp;I'll be watching this with great interest :)&lt;/p&gt;</description></item><item><title>re: Need Help with my Chroma Key Pixel Shader Algorithm</title><link>http://blogs.msdn.com/synergist/archive/2009/05/15/need-help-with-my-chroma-key-pixel-shader-algorithm.aspx#9631919</link><pubDate>Wed, 20 May 2009 12:21:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9631919</guid><dc:creator>Mark</dc:creator><description>&lt;p&gt;Interesting boko here on Chroma:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://books.google.co.nz/books?id=IpSRykrRamgC&amp;amp;pg=PA22&amp;amp;lpg=PA22&amp;amp;dq=HSV+chroma+tolerance&amp;amp;source=bl&amp;amp;ots=ptiPVPtJyC&amp;amp;sig=ryfxFXqnx4Epu45HBYb1fGk3mPs&amp;amp;hl=en&amp;amp;ei=RMcTSpveKovW6gOR-s28Dg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1#PPA23,M1"&gt;http://books.google.co.nz/books?id=IpSRykrRamgC&amp;amp;pg=PA22&amp;amp;lpg=PA22&amp;amp;dq=HSV+chroma+tolerance&amp;amp;source=bl&amp;amp;ots=ptiPVPtJyC&amp;amp;sig=ryfxFXqnx4Epu45HBYb1fGk3mPs&amp;amp;hl=en&amp;amp;ei=RMcTSpveKovW6gOR-s28Dg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=1#PPA23,M1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Definitely worth trying HSV&lt;/p&gt;
&lt;p&gt;There is a great HSV -&amp;gt; RGB library here:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.markbetz.net/2009/01/21/color-tools-for-silverlight-2/"&gt;http://www.markbetz.net/2009/01/21/color-tools-for-silverlight-2/&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: Need Help with my Chroma Key Pixel Shader Algorithm</title><link>http://blogs.msdn.com/synergist/archive/2009/05/15/need-help-with-my-chroma-key-pixel-shader-algorithm.aspx#9640774</link><pubDate>Mon, 25 May 2009 22:18:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9640774</guid><dc:creator>Ted Howard</dc:creator><description>&lt;p&gt;Relative luminance (&lt;a rel="nofollow" target="_new" href="http://en.wikipedia.org/wiki/Luminance_%28relative%29"&gt;http://en.wikipedia.org/wiki/Luminance_%28relative%29&lt;/a&gt;) is a linear conversion from RGB, but it just makes the threshold more intuitive. &lt;/p&gt;
&lt;p&gt;Preprocessing is the way to go ideally, but I'm sure that's not an option. In general, for big calculations in shaders, you try using a texture as a look-up-table for parts of the calculations that won't fit in shader limits, but I don't think that helps here.&lt;/p&gt;</description></item><item><title>re: Need Help with my Chroma Key Pixel Shader Algorithm</title><link>http://blogs.msdn.com/synergist/archive/2009/05/15/need-help-with-my-chroma-key-pixel-shader-algorithm.aspx#9845465</link><pubDate>Thu, 23 Jul 2009 03:30:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9845465</guid><dc:creator>slyi</dc:creator><description>&lt;p&gt;Is this any better? &amp;nbsp;&lt;a rel="nofollow" target="_new" href="http://daron.yondem.com/tr/PermaLink.aspx?guid=84d6a965-6c16-453f-be33-d89fd49fad1d"&gt;http://daron.yondem.com/tr/PermaLink.aspx?guid=84d6a965-6c16-453f-be33-d89fd49fad1d&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>