<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shazzam News &#187; Help</title>
	<atom:link href="http://blog.shazzam-tool.com/index.php/category/help/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.shazzam-tool.com</link>
	<description>A place to talk about upcoming changes, new features, bug fixes</description>
	<lastBuildDate>Mon, 09 Aug 2010 23:58:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Morphing Images with Texture Map Pixel Shader</title>
		<link>http://blog.shazzam-tool.com/index.php/2010/07/morphing-images-with-texture-map-pixel-shader/</link>
		<comments>http://blog.shazzam-tool.com/index.php/2010/07/morphing-images-with-texture-map-pixel-shader/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 18:38:46 +0000</pubDate>
		<dc:creator>waltritscher</dc:creator>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[Help]]></category>
		<category><![CDATA[Shazzam]]></category>

		<guid isPermaLink="false">http://blog.shazzam-tool.com/index.php/2010/07/morphing-images-with-texture-map-pixel-shader/</guid>
		<description><![CDATA[.NET pixel shaders support up to 4 input textures.&#160; In the jargon of GPU shaders, a texture is the input (image, Silverlight Ui, etc) that is sampled before returning the new pixel color value.
One common effect used in shaders it to alter the look of the main image by using a second texture as a [...]]]></description>
			<content:encoded><![CDATA[<p>.NET pixel shaders support up to 4 input textures.&#160; In the jargon of GPU shaders, a <strong>texture</strong> is the input (image, Silverlight Ui, etc) that is sampled before returning the new pixel color value.</p>
<p>One common effect used in shaders it to alter the look of the main image by using a second texture as a bump map.</p>
<h3>Multi-Shader support</h3>
<p>Shazzam has supported multi-input shaders since version 1.2&#160; I’m pleased to announce that version 1.3 contains some useful sample shader that mix 2 to 4 textures for interesting effects.</p>
<p>For this article I’m going to use the new ApplyTextureMap.fx shader.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image1.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb1.png" width="300" height="424" /></a> </p>
<p>Figure 1 – Load ApplyTextureMap with Shader loader.</p>
<p>This shader expects two inputs:</p>
<pre class="code"><span style="color: green">/// &lt;class&gt;ApplyTextureMap&lt;/class&gt;

</span><span style="color: blue">sampler2D </span><span style="color: black">Texture1 : </span><span style="color: blue">register</span><span style="color: #006400">(</span><span style="color: black">s0</span><span style="color: #006400">);
</span><span style="color: blue">sampler2D </span><span style="color: black">TextureMap : </span><span style="color: blue">register</span><span style="color: #006400">(</span><span style="color: black">s2</span><span style="color: #006400">);</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<h3>Applying and adjusting the TextureMap</h3>
<p>When Shazzam loads the shader the first time it picks the Cactus.jpg file as the ‘TextureMap’ image.&#160; </p>
<p>Here are the two images I will use for this demo.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image2.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb2.png" width="450" height="305" /></a> </p>
<p>Figure 2 – Texture1</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image3.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb3.png" width="450" height="335" /></a> </p>
<p>Figure 3 – TextureMap (the default Cactus image).</p>
<p>Press F5 to compile the shader, then choose the cactus image. You will see the original image morphed with the cactus.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image4.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb4.png" width="450" height="310" /></a> </p>
<p>Figure 4 – Morphed image.</p>
<h3>Choose different Texture</h3>
<p>Next, I will swap out the default TextureMap. </p>
<p>Click the Tryout (adjust settings) tab in Shazzam.&#160; Then click the ‘Choose Texture button.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image5.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb5.png" width="450" height="222" /></a> </p>
<p>Figure 6 – Change Texture.</p>
<p>Now I can choose from a list of included shaders,&#160; If you’d rather use your own image file, click the Open File… button instead.</p>
<p>This is the UI the pops up.&#160; </p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image6.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb6.png" width="450" height="329" /></a> </p>
<p>Figure 7. -&#160; Texture chooser.</p>
<p>If you hover over an item in the list you will see an enlarged version of the thumbnail.&#160; I’m choosing the glassblocks_medium texture.</p>
<h3>Results</h3>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image7.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb7.png" width="450" height="302" /></a> </p>
<p>Figure 8. – GlassBlocks applied, strength= .3.</p>
<p>&#160;</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image8.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb8.png" width="450" height="308" /></a> </p>
<p>Figure 9. – GlassBlocks applied, strength= 2.5.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image9.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb9.png" width="450" height="308" /></a> </p>
<p>Figure 10 – Whirlpool applied.</p>
<h3>Included Texture Maps</h3>
<p>There are over forty texture map files included in Shazzam 1.3!&#160; Note that most of the included textures include full color spectrum.&#160; By providing images that contain a full range of colors, you get a more affective mix of the pixels values in the final output.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image10.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb10.png" width="450" height="286" /></a> </p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image11.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb11.png" width="450" height="282" /></a> </p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image12.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb12.png" width="450" height="288" /></a> </p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image13.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb13.png" width="450" height="280" /></a> </p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image14.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb14.png" width="450" height="288" /></a> </p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image15.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb15.png" width="450" height="291" /></a> </p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image16.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb16.png" width="450" height="286" /></a> </p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image17.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/07/image_thumb17.png" width="450" height="146" /></a> </p>
<p>&#160;</p>
<p>Version 1.3 release date:&#160; July 14, 2010</p>
<hr />
<p>Do you know about the Shazzam twitter feed?</p>
<p><a href="http://twitter.com/shazzamtool">http://twitter.com/shazzamtool</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shazzam-tool.com/index.php/2010/07/morphing-images-with-texture-map-pixel-shader/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Shazzam 1.2  &#8211; Image Stretch</title>
		<link>http://blog.shazzam-tool.com/index.php/2010/04/shazzam-1-2-image-stretch/</link>
		<comments>http://blog.shazzam-tool.com/index.php/2010/04/shazzam-1-2-image-stretch/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 18:53:06 +0000</pubDate>
		<dc:creator>waltritscher</dc:creator>
				<category><![CDATA[Help]]></category>
		<category><![CDATA[Shazzam]]></category>

		<guid isPermaLink="false">http://blog.shazzam-tool.com/index.php/2010/04/shazzam-1-2-image-stretch/</guid>
		<description><![CDATA[Shazzam 1.2 offers four ways to stretch the view of your samples.&#160; 
 
Figure 1.&#160; the new Image Stretch menu.
&#160;
Examples of each of the Image Stretch modes.
 
Figure 2: Original Image
&#160;
In the following screenshots the work area is deliberately sized to a narrow width in order to show the differences in the stretch modes.
 
Figure [...]]]></description>
			<content:encoded><![CDATA[<p>Shazzam 1.2 offers four ways to stretch the view of your samples.&#160; </p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image_thumb.png" width="400" height="256" /></a> </p>
<p>Figure 1.&#160; the new Image Stretch menu.</p>
<p>&#160;</p>
<h3>Examples of each of the Image Stretch modes.</h3>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image1.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image_thumb1.png" width="400" height="267" /></a> </p>
<p>Figure 2: Original Image</p>
<p>&#160;</p>
<p>In the following screenshots the work area is deliberately sized to a narrow width in order to show the differences in the stretch modes.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image2.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image_thumb2.png" width="400" height="911" /></a> </p>
<p>Figure 3: Image Stretch None.</p>
<p>&#160;</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image3.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image_thumb3.png" width="400" height="886" /></a> </p>
<p>Figure 4: Image Stretch Fill.</p>
<p>&#160;</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image4.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image_thumb4.png" width="400" height="911" /></a> </p>
<p>Figure 5: Image Stretch Uniform</p>
<p>&#160;</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image5.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2010/04/image_thumb5.png" width="400" height="911" /></a> </p>
<p>Figure 6: Image Stretch UniformToFill</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shazzam-tool.com/index.php/2010/04/shazzam-1-2-image-stretch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What&#8217;s New in Shazzam 1.1 &#8211; Better Silverlight Support</title>
		<link>http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-better-silverlight-support/</link>
		<comments>http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-better-silverlight-support/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 18:41:05 +0000</pubDate>
		<dc:creator>waltritscher</dc:creator>
				<category><![CDATA[Help]]></category>
		<category><![CDATA[Shazzam]]></category>

		<guid isPermaLink="false">http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-better-silverlight-support/</guid>
		<description><![CDATA[Silverlight and WPF are different beasts.&#160; The similarities between the two is high, but there are enough differences to foul you up now and then.
Choose your platform preference
There is a new addition to the Settings pane.&#160; The code generation engine will consider your desired platform when generating the .NET classes.
 
Figure 1:&#160; Target Framework setting.
As [...]]]></description>
			<content:encoded><![CDATA[<p>Silverlight and WPF are different beasts.&#160; The similarities between the two is high, but there are enough differences to foul you up now and then.</p>
<h3>Choose your platform preference</h3>
<p>There is a new addition to the Settings pane.&#160; The code generation engine will consider your desired platform when generating the .NET classes.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image20.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image_thumb11.png" width="350" height="342" /></a> </p>
<p>Figure 1:&#160; Target Framework setting.</p>
<p>As you can see from the following code examples Shazzam creates slightly different versions of the DependencyProperty registration code depending on your framework choice.&#160; Shazzam also ignores Point3D, Vector3D, or Point4D property types when creating Silverlight classes as Silverlight 3 doesn’t support these types yet.</p>
<p>&#160;</p>
<pre class="code"><span style="color: green">// Use UIPropertyMetaData for WPF</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="color: blue"> public </span><span style="color: brown">static readonly </span><span style="color: black">DependencyProperty AspectRatioProperty </span></pre>
<pre class="code"><span style="color: black">      </span><span style="color: #006400">= </span><span style="color: black">DependencyProperty</span><span style="color: #006400">.</span><span style="color: #191970">Register</span><span style="color: #006400">(</span><span style="color: blue">&quot;AspectRatio&quot;</span><span style="color: #006400">, </span><span style="color: #008b8b">typeof</span><span style="color: #006400">(</span><span style="color: red">double</span><span style="color: #006400">), </span></pre>
<pre class="code"><span style="color: #006400">       </span><span style="color: #008b8b">typeof</span><span style="color: #006400">(</span><span style="color: black">BandedSwirlEffect</span><span style="color: #006400">), </span><span style="color: #008b8b">new </span><span style="color: #191970"><strong>UIPropertyMetadata</strong></span><span style="color: #006400">(((</span><span style="color: red">double</span><span style="color: #006400">)(</span><span style="color: #00008b">1.5</span><span style="color: #006400">)), </span></pre>
<pre class="code"><span style="color: #006400">       </span><span style="color: #191970">PixelShaderConstantCallback</span><span style="color: #006400">(</span><span style="color: #00008b">3</span><span style="color: #006400">)));</span></pre>
<pre class="code"><span style="color: #006400">
</span></pre>
<pre class="code"><span style="color: green">// Use PropertyMetaData for Silverlight</span></pre>
<pre class="code"><span style="color: blue">public </span><span style="color: brown">static readonly </span><span style="color: black">DependencyProperty AspectRatioProperty </span></pre>
<pre class="code"><span style="color: black">   </span><span style="color: #006400">= </span><span style="color: black">DependencyProperty</span><span style="color: #006400">.</span><span style="color: #191970">Register</span><span style="color: #006400">(</span><span style="color: blue">&quot;AspectRatio&quot;</span><span style="color: #006400">, </span><span style="color: #008b8b">typeof</span><span style="color: #006400">(</span><span style="color: red">double</span><span style="color: #006400">), </span></pre>
<pre class="code"><span style="color: #006400">   </span><span style="color: #008b8b">typeof</span><span style="color: #006400">(</span><span style="color: black">BandedSwirlEffect</span><span style="color: #006400">), </span><span style="color: #008b8b">new </span><span style="color: #191970"><strong>PropertyMetadata</strong></span><span style="color: #006400">(((</span><span style="color: red">double</span><span style="color: #006400">)(</span><span style="color: #00008b">1.5</span><span style="color: #006400">)),</span></pre>
<pre class="code"><span style="color: #006400">   </span><span style="color: #191970">PixelShaderConstantCallback</span><span style="color: #006400">(</span><span style="color: #00008b">3</span><span style="color: #006400">)));</span></pre>
<pre class="code"><span style="color: #006400"></span><font color="#006400"></font></pre>
<h3><span style="color: #006400">Constructor</span></h3>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<p>Shazzam now generates a parameterless constructor that automatically loads the compiled pixel shader from an assembly resource.&#160; If the name of your assembly is different from the name of your namespace, you&#8217;ll need to hand-edit the URI in the constructor.&quot;</p>
<p>The resource URI can be relative, taking the form &quot;/AssemblyName;component/ShaderName.ps&quot; – this new syntax works in both WPF and Silverlight.</p>
<h3><span style="color: #006400">Summary</span></h3>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<p>[Shazzam 1.1 was released on October 11, 2009]</p>
<p>See a list of <a href="http://blog.shazzam-tool.com/index.php/2009/10/shazzam-1-1-topic-list/">additional help pages here</a>.</p>
<p>Install your own copy of the free <a href="http://shazzam-tool.com/publish.htm">Shazzam Pixel Shader Utility here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-better-silverlight-support/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Shazzam 1.1 &#8211; Topic List</title>
		<link>http://blog.shazzam-tool.com/index.php/2009/10/shazzam-1-1-topic-list/</link>
		<comments>http://blog.shazzam-tool.com/index.php/2009/10/shazzam-1-1-topic-list/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 14:27:41 +0000</pubDate>
		<dc:creator>waltritscher</dc:creator>
				<category><![CDATA[Help]]></category>
		<category><![CDATA[Shazzam]]></category>

		<guid isPermaLink="false">http://blog.shazzam-tool.com/index.php/2009/10/shazzam-1-1-topic-list/</guid>
		<description><![CDATA[Learn more about the features available in Shazzam 1.1.
&#160;

HLSL Meta Tags – Controlling defaults 
Better Edit Controls 
Animation 
Better Silverlight Support 

Install your own copy of the free Shazzam Pixel Shader Utility here.
Some video tutorials are available also.
]]></description>
			<content:encoded><![CDATA[<p>Learn more about the features available in Shazzam 1.1.</p>
<p>&#160;</p>
<ul>
<li><a href="http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-metatags-2/">HLSL Meta Tags – Controlling defaults</a> </li>
<li><a href="http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-better-edit-controls/">Better Edit Controls</a> </li>
<li><a href="http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-animation/">Animation</a> </li>
<li><a href="http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-better-silverlight-support/">Better Silverlight Support</a> </li>
</ul>
<p>Install your own copy of the free <a href="http://shazzam-tool.com/publish.htm">Shazzam Pixel Shader Utility here</a>.</p>
<p>Some <a href="http://shazzam-tool.com/">video tutorials</a> are available also.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shazzam-tool.com/index.php/2009/10/shazzam-1-1-topic-list/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>What&#8217;s New in Shazzam 1.1 &#8211; Animation</title>
		<link>http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-animation/</link>
		<comments>http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-animation/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 14:21:45 +0000</pubDate>
		<dc:creator>waltritscher</dc:creator>
				<category><![CDATA[Help]]></category>
		<category><![CDATA[Shazzam]]></category>

		<guid isPermaLink="false">http://blog.shazzam-tool.com/?p=40</guid>
		<description><![CDATA[Creating shaders is fun.&#160; But it’s more thrilling to see what your new shader can do.&#160;&#160; Shazzam has a testing screen for just that purpose, giving you a place to experiment with your effect, just choose the ‘Change Shader Settings’ tab.
 
Figure1 : Change Shader Settings tab.
The Edit Shader Property control
What happens when you compile [...]]]></description>
			<content:encoded><![CDATA[<p>Creating shaders is fun.&#160; But it’s more thrilling to see what your new shader can do.&#160;&#160; Shazzam has a testing screen for just that purpose, giving you a place to experiment with your effect, just choose the ‘Change Shader Settings’ tab.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image14.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image_thumb5.png" width="450" height="225" /></a> </p>
<p>Figure1 : Change Shader Settings tab.</p>
<h3>The Edit Shader Property control</h3>
<p>What happens when you compile your HLSL code? Each input parameter in your HLSL code is converted to a DependencyProperty in the generated C#/VB code. </p>
<pre class="code"><span style="color: green">/// The HLSL</span></pre>
<pre class="code"><span style="color: green">/// &lt;summary&gt;The aspect ratio (width / height) of the input.&lt;/summary&gt;
/// &lt;minValue&gt;0.5&lt;/minValue&gt;
/// &lt;maxValue&gt;2&lt;/maxValue&gt;
/// &lt;defaultValue&gt;1.5&lt;/defaultValue&gt;
</span><span style="color: maroon">float </span><span style="color: black">AspectRatio : </span><span style="color: blue">register</span><span style="color: #006400">(</span><span style="color: black">C3</span><span style="color: #006400">);</span></pre>
<pre class="code"><span style="color: #006400"></span></pre>
<pre class="code"><span style="color: gray">/// The C# Dependency Property</span></pre>
<pre class="code"><span style="color: gray"></span><span style="color: blue">public </span><span style="color: brown">static readonly </span><span style="color: black">DependencyProperty AspectRatioProperty </span></pre>
<pre class="code"><span style="color: black"></span><span style="color: #006400">   = </span><span style="color: black">DependencyProperty</span><span style="color: #006400">.</span><span style="color: #191970">Register</span><span style="color: #006400">(</span><span style="color: blue">&quot;AspectRatio&quot;</span><span style="color: #006400">, </span><span style="color: #008b8b">typeof</span><span style="color: #006400">(</span><span style="color: red">double</span><span style="color: #006400">), </span></pre>
<pre class="code"><span style="color: #006400"></span><span style="color: #008b8b">   typeof</span><span style="color: #006400">(</span><span style="color: black">BandedSwirlEffect</span><span style="color: #006400">), </span><span style="color: #008b8b">new </span><span style="color: #191970">UIPropertyMetadata</span><span style="color: #006400">(((</span><span style="color: red">double</span><span style="color: #006400">)(</span><span style="color: #00008b">1.5</span><span style="color: #006400">)), </span></pre>
<pre class="code"><span style="color: #006400"></span><span style="color: #191970">   PixelShaderConstantCallback</span><span style="color: #006400">(</span><span style="color: #00008b">3</span><span style="color: #006400">)));
    </span></pre>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<p>In turn, each DependencyProperty in your generated class is assigned an editor on the test page.&#160; See Figure 2 for an example.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image15.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image_thumb6.png" width="450" height="103" /></a> </p>
<p>Figure 2:&#160; AspectRatio editor.</p>
<p>The Min and Max textboxes on the editor set the range for the value slider.&#160; Move the slider to set the current value for the property (AspectRatio in this example).</p>
<h3>Animating the Property</h3>
<p>Manually changing the slider value is useful to see what happens to the image when a particular test value is applied.&#160; When you find a interesting version of your effect you can jot down the detail&#160; and use it in your Silverlight/WPF application.&#160; But sometimes you just want to play with the settings and see what happens.&#160; That’s why there is an animation section on the edit control.&#160; There are several buttons (exact number depends on the property type) available for controlling the animation.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image16.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image_thumb7.png" width="450" height="456" /></a> </p>
<p>Figure 3: Animation controls.</p>
<p>When the animation is running the value slider is replaced with a status textbox.&#160; This way you can see the current values as the animation runs and not be distracted by the slider racing dizzily back and forth on the screen. </p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image17.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image_thumb8.png" width="450" height="123" /></a> </p>
<p>Figure 4:&#160; Current animation value as text.</p>
<h3>Multi-value Animations</h3>
<p>Some properties like Point and 3DPoint have multiple values in each property. The editor provides more controls for editing and adds another animation button (Circular animation).</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image18.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image_thumb9.png" width="450" height="112" /></a> </p>
<p>Figure 5: Multiple editors and circular animation button.</p>
<h3>Set Default Animation Duration</h3>
<p>The Settings pane has a number of improvements in versions 1.1.&#160; The one you are interested in for today is the Default Animation Duration setting. This specifies the default duration for all animations.&#160; Your default is loaded in to the test page the next time you compile the shader. You can always modify the animation duration on the test screen, the default value is only used as the initial setting.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image19.png"><img style="display: inline" title="image" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image_thumb10.png" width="350" height="624" /></a> </p>
<p>Figure 6:&#160; Setting pane – Default Animation Length.</p>
<h3>Summary</h3>
</p>
</p>
</p>
<p>[Shazzam 1.1 was released on October 11, 2009]</p>
<p>See a list of <a href="http://blog.shazzam-tool.com/index.php/2009/10/shazzam-1-1-topic-list/">additional help pages here</a>.</p>
<p>Install your own copy of the free <a href="http://shazzam-tool.com/publish.htm">Shazzam Pixel Shader Utility here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-animation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What&#8217;s New in Shazzam 1.1 &#8211; Better Edit Controls</title>
		<link>http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-better-edit-controls/</link>
		<comments>http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-better-edit-controls/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 06:17:53 +0000</pubDate>
		<dc:creator>waltritscher</dc:creator>
				<category><![CDATA[Help]]></category>
		<category><![CDATA[Shazzam]]></category>

		<guid isPermaLink="false">http://blog.shazzam-tool.com/?p=24</guid>
		<description><![CDATA[In HLSL code you can create input parameters of various datatypes.&#160; Here’s one of the simplest scalar types, the float.
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; float &#8211; 32-bit floating point value.
There are a number of vector types too.&#160; 
&#160;&#160;&#160;&#160;&#160;&#160;&#160; float2 – two dimensional float vector.    &#160;&#160;&#160;&#160;&#160;&#160;&#160; float3 – three dimensional float vector.     &#160;&#160;&#160;&#160;&#160;&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>In HLSL code you can create input parameters of various datatypes.&#160; Here’s one of the simplest scalar types, the float.</p>
<p><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; float</em> &#8211; 32-bit floating point value.</p>
<p>There are a number of vector types too.&#160; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; float2 – two dimensional float vector.    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; float3 – three dimensional float vector.     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; float4 – four dimensional float vector.</p>
<p>When you need two float values stored in a type (think WPF Point and Size types) use a float2 in your HLSL.&#160; float3 is used for types like 3DPoint and float4 is handy for storing the four color values (Alpha, Red, Green, Blue) together.</p>
<h3>Shazzam test controls</h3>
<p>In Shazzam 1.0 float2&#160; and other vector values were shown in the test UI with a single textbox.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image10.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image_thumb1.png" width="344" height="80" /></a> </p>
<p>Figure 1:&#160; Shazzam 1.0 UI</p>
<p>Simple but not the most intuitive interface ever to grace an application.&#160; Plus the point values were not animatable in V1.0. In Shazzam 1.1 the test UI has been changed to support animation and updated to handle float2, float3 and float4 values in a smarter way.</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image11.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image_thumb2.png" width="344" height="338" /></a> </p>
<p>Figure 2:&#160; Shazzam 1.1 UI</p>
<p>There is a better use of color in the UI labeling too, which helps differentiate between labels and data. </p>
<h3>Forcing data type</h3>
<p>There is a new Meta Tag, the &lt;type&gt; tag,&#160; available for decorating your HLSL.&#160; This tag tells the compiler which .NET type to use for a given HLSL variable.</p>
<p><strong>float </strong>can be Double or Single.</p>
<p><strong>float2</strong> can be a Point, Size or Vector.</p>
<p><strong>float3</strong> can be Point3D (not available for Silverlight).</p>
<p><strong>float4</strong> can be Point4D or Color.</p>
<p><strong>Example HLSL</strong></p>
<pre class="code"><span style="color: green">//--------------------------------------------------------------------------------------
// float4
//--------------------------------------------------------------------------------------

// float4 map to Color or Point4D

/// &lt;type&gt;Color&lt;/type&gt;
</span><span style="color: maroon">float4 </span><span style="color: black">SampleColor: </span><span style="color: blue">register</span><span style="color: #006400">(</span><span style="color: black">C4</span><span style="color: #006400">);

</span><span style="color: green">/// &lt;type&gt;Point4D&lt;/type&gt;
</span><span style="color: maroon">float4 </span><span style="color: black">SamplePoint4D : </span><span style="color: blue">register</span><span style="color: #006400">(</span><span style="color: black">C5</span><span style="color: #006400">);</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>&#160;</p>
</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image12.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image_thumb3.png" width="344" height="226" /></a> </p>
<p>Figure 3:&#160; Shazzam 1.1 Color and Point4D</p>
<p>The result is that the Point4D gets four data entry controls.&#160; You still have to enter a color value (Red, Orange, #Ff4455FF) in a textbox however.&#160; In a future version of&#160; Shazzam this will be replaced with a color picker.&#160; In the meantime you can use the Color Picker in the side pane (thanks <a href="http://nerdplusart.com/">Robby</a>).</p>
<p><a href="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image13.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.shazzam-tool.com/wp-content/uploads/2009/10/image_thumb4.png" width="344" height="524" /></a> </p>
<p>Figure 4: Robby’s Color Picker</p>
<h3>Summary</h3>
<p>[Shazzam 1.1 was released on October 11, 2009]</p>
<p>See a list of <a href="http://blog.shazzam-tool.com/index.php/2009/10/shazzam-1-1-topic-list/">additional help pages here</a>.</p>
<p>Install your own copy of the free <a href="http://shazzam-tool.com/publish.htm">Shazzam Pixel Shader Utility here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shazzam-tool.com/index.php/2009/10/whats-new-in-shazzam-1-1-better-edit-controls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
